stencil shadow problem

Posted By: noobeez

stencil shadow problem - 08/04/09 12:47

Im facing a problem while using stencil shadows for a ball.The shadow is cast on multiple objects at the same time.There is only one source of light(sun).

for shadows im using the following code.

set(ball,SHADOW|POLYGON|CAST);

Checkout the following screenshot.


Posted By: fogman

Re: stencil shadow problem - 08/04/09 13:07

"Stencil shadows are not clipped by walls.
A shadow can be cast on a wall, at the back side of the wall,
and on the floor behind the wall at the same time."

http://www.conitec.net/beta/shadow_stencil.htm



Posted By: Machinery_Frank

Re: stencil shadow problem - 08/04/09 13:12

I found this in another engine tutorial:

Objects receiving shadows should cast shadows themselves. Consider the following case:



When a caster mesh is provided for both the ball and the wall (left), the visual effect is always proper. But when a caster isn't provided for the wall (right), chances are that the ball shadow is also cast on the dark side of a the wall. It also isn't properly cast onto the ground either.
Posted By: Machinery_Frank

Re: stencil shadow problem - 08/04/09 13:14

Originally Posted By: fogman
"Stencil shadows are not clipped by walls.


This counts probably only for blocks. A wall made from a mesh casting shadows itself will not have this (visual) problem. Though it still will not actually clip the shadow. But the shadows of the wall and of the ball will merge just fine.
© 2024 lite-C Forums