• Advertisement
Sign in to follow this  

Shadow VOlume Math Problem! help! :(

This topic is 4825 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello people! I have a problem with some math when rendering shadow volumes. First I calculate the silhuette edges and the I render the shadow volume like this: http://rafb.net/paste/results/ksqbmI23.html The problem is that the shadow direction is always the same for every object (the objects is not at the same position). Take a look at this screen: http://bekengine.periergoi.gr/Screenshots/SV_problem.JPG any idea what is going on? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
looks like you are calculating the volumes in object space, where the light is in world space?

for each mesh, either move the light to object space (faster) or move the objects verticies to world space before calculating the volumne.

Share this post


Link to post
Share on other sites
I move the light in object space with this:

CVector shdvec = !primitive->prMatrix * lightPosition;
/* the shdvector is now the light in Object Space */
or I am wrong?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement