is there any way to have a mesh with no backface cast a shadow? ive got a bunch of wall pieces that are meant for an interior, and light just goes right through them. a small fix ive got for that is to just build up a BSP wall around the inside of the walls.. but thats a bit tedious. any suggestions?
Replies
It's actually better not to add a backface in the modelling program, doing it through the shader culls it if it's not visible anyway, so you don't need to worry about performance loss.
It's better to have a two-sided shader than more faces on a mesh ? For the GPU it's not too much hard ?
Two sided shader turns OFF backface culling forcing the GPU to render all triangles (might even be 2 draw calls...).
Actual geometry backfaces get culled by default resulting in less triangles drawn.
So as cholden says avoid the two sided material hack like the plague.
EDIT:
On a side note, why are so many people trying this two sided material thing lately? Is it being taught somewhere as a good way to do things?
one post and another from the Terrible Advice/Myth Thread.
and just to add my input to the whole argument.. ive NEVER found geometry to be an issue in UDK. for the most part since ive seen the FoliageMap that has just simple rubble pieces over 4k, i figured that UDK can handle geometry pretty well (which it does), and ive never concerned myself with geometry since. all my lag/gpu issues come into play with materials and/or lighting.
The lighting/normal calculations were reversed on the backsides and it really made things look strange.
That was back with UE3 though and not with UDK/lightmass maybe it has been "fixed"?
Even then though double sided is probably not good for performance reasons.