Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Petru Soroaga, posted on May 03, 2003




Image Description, by Petru Soroaga



My name is Petru and I'm responsible for this dynamic shadows demo. I created this demo in order to test different ways to generate dynamic shadows. Finally, I stopped at Carmack's reversed method. Basically, all the lighting informations are generated in steps, and in the final step the material information is added (textures).

1. First, all the scene is rendered on ZBuffer and Screen using ambient light.
2. For each light:
2a. Draw shadows volumes using stencil buffer.
2b. For each light draw all static objects with lightmap of current light (or no lightmap, just vertex lighting for dynamic objects) taking care of the stencil buffer.
3. Blend objects materials into scene.

The scene uses an Octree for objects management, shadows volumes are clipped to scene, lightmaps are optimized (are filled up in big textures). In order to run the demo, you need DirectX8 and a 3D card that suport stencil buffers. On mt Radeon 7000 it runns acceptable (due to fill rate limitation on this card).

You can turn on/off lights, disable/enable material rendering and other stuff. This is intended to be just a quick view of how stencil shadows may look. The only disavantage I see to using shadow volumes, is that the shadows are pretty hard in some places. But this can be changed...

The demo can be taken from here: http://www.whiteblobs.com/tech/lightdemo.zip
Some more screen shoots are here: http://www.whiteblobs.com/tech.htm

Thanks.


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Archive Notice: This content is archived, and commenting is no longer active. It is here for reference purposes. This content was added on an older version of flipcode, before the site closed in 2005.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.