Jump to content
  • Advertisement
Sign in to follow this  
darknova

OpenGL problems with shadow volumes

This topic is 4864 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

I have a problem implementing the shadow volume technique. When i use more complex objects seems like the stencil test is not working and i get strange results like this one: All scene When i use simple objects(eg: a sphere) the algorithm work perfectly. here are some closeups with the wrong portions of shadows : Pic 1 and the edges that I detect: Pic 2 the shadow volume is created by extruding these edges, and it seems to me that it works ok (i could't make a good screenshot). Are there any limitations to this alg? (not working on all meshes) or do you have any clue about what may go wrong? Implementation is done using OpenGL with double stencil buffer. updated picture links [Edited by - darknova on April 26, 2005 12:21:17 PM]

Share this post


Link to post
Share on other sites
Advertisement
Hi,

the screenshots seem broken ^^
but I think your problem might comes from an unclosed mesh. For exemple, your algo should work on a cube. Now, delete 1 face of your cube, and it should work any more (ugly artifacts appear)
This is beacause the standard shadow volume algorithm only work with closed meshes. If you want to be able to use it on more complex meshes, 2 solutions :

1) graphist job : close the meshes ^^
2) programmer job : handle the case where an edge is connected to only 1 face (this hapens with non-closed meshes and is what cause the artifacts) but it's quite complicated and not really efficient compared to the first method.

hope I helped a bit

.:: Paic Citron ::.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!