Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Shadow Volumes.

  1. #1
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Sydney, NSW, Australia
    Posts
    426

    Shadow Volumes.

    Im having problems with my shadow volume. I get floating point inaccuracies when determining which edges should cast a volume. This is not a problem with models which are like a cube or something, which arent smooth or detailed, but when its like a highly detailed sphere, i get many inaccuracies and as a result the volume is wrong in lot of places. So, does any1 kow how to fix this?
    :: Sleep is a poor substitute for caffeine ::

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,962

    Re: Shadow Volumes.

    How are you determining the silhouette edges?

  3. #3
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Sydney, NSW, Australia
    Posts
    426

    Re: Shadow Volumes.

    Im doing the "standard" way of seeing which faces are facing the light, and then im determining if the face has any edges that should cast a shodow, i do this by seeing the face that shares that edge is visible, and if not then the edge should cast a shadow. FLoating point inaccuracies arise when deciding if a face is facing the light or not, because if you have a very detailed model the normals are very smooth and thus you will be getting an edge casting a shadow when it shouldnt, and vice versa. Basically im using the method used in the NeHe tutorial on shadows, however, in that tutorial, the model used is VERY simple cross, thus floating point inaccuracies wouldnt affect that demo, but im wondering how to do it so i can use very detailed models.
    :: Sleep is a poor substitute for caffeine ::

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •