Page 1 of 1

Stencil shadow and terrain pieces

Posted: Sat May 15, 2010 1:01 pm
by Veleran
I have some objects on a terrain that i would attach all to a single piece.It is a staticmesh with no collision.

The objects are close together but far enough so the character stencil shadow will be cast to one to three of them at a time.
Lets say there are around 30 objects,stones ,some bones,a tree.

What could be faster for the stencil shadows (1 shadow max ,only one light in scene)
to have all as a single staticmesh or add 30 staticmeshes?

I know the stencil shadows dont have collision ,and they just pass through objects (logically for speed reasons)
but i dont know if the shadow tests anything about the bounding box,i mean if i have many small staticmeshes with small bounding boxes,will be any speed advantage?

Re: Stencil shadow and terrain pieces

Posted: Sun May 16, 2010 7:22 pm
by QuestOfDreams
It doesn't matter at all. There's no collision testing involved with stencil shadows. The main limiting factors are the number of shadow casting actors, the number of the polys of these actors (silhouette detection) and the number of lights that cast shadows. Once the shadow volume is created there is just a comparision between the z values of the volume and the rendered scene.