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

    Shadow volumes

    Hi, I have an OpenGL app that I want to add shadows to. I have got it so that at any time I have an array of polygon objects that represent the shadow volumes (calculated for each light) but where do I go from here? How do I draw the scene so that anything whithin one of these volumes is darker? I've looked around the net for info, but haven't found anything that seems to work.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    The Round Table at Camelot
    Posts
    1,537

    Re: Shadow volumes

    Nvidia's dev site has many many docs on this. Take a look at their infinite shadow volume paper. From reading that paper it didn't take me long to understand this technique better and implement.

    -SirKnight
    -SirKnight

  3. #3
    Member Regular Contributor
    Join Date
    Aug 2000
    Location
    Turin
    Posts
    269

    Re: Shadow volumes

    Shadows algho explaination for dummies. :P

    Imagine to have a SPHERE, then the stencil shadows works like :

    1) Pick a paper sheet.
    2) Roll it on the sphere to form a cylinder.
    3) Imagine this cylinder is the extrusion of the silouette of the sphere. (visible borders of the sphere seen from the light source).
    4) Then look at the paper cylinder from the camera point and imagine to draw only the visible side in a buffer (sides facing you).
    5) Now imagine to delete the old buffer using the hidden faces of the same cylinder.
    6) What still remains is in the buffer is exactly the shape of the shadow cast from the sphere.

    Fill that shape with your preferred method...
    using stencil buffer could be helpfull...



    ok, ok, this is just really to have an idea on how it all works....
    [rIO^sPINNING kIDS] - rio@nospam.spinningkids.org

    -/- This is a signature virus. Add it to your signature. Help it spreading! -/-

Posting Permissions

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