Upcoming Events
Southwest Gaming Expo
11/20 - 11/22 @ Dallas, TX

Workshop on Network and Systems Support for Games (NetGames 2009)
11/23 - 11/25 @ Paris, France

ICIDS 2009 Interactive Storytelling
12/9 - 12/11 @ Guimarães, Portugal

Global Game Jam
1/29 - 1/31  

More events...


Quick Stats
6593 people currently visiting GDNet.
2341 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!



Link to us

Link to us

  Intel sponsors gamedev.net search:   

Shadow Caster Volumes For The Culling Of Potential Shadow Casters


5.0 Summary

To cull shadow casters that do not affect the visible scene, we have introduced a shadow caster volume. Only objects that intersect both the shadow caster volume and the light source's bounding volume can cast a visible shadow.

For rendering shadow receiving semi-transparent objects, we can calculate a smaller shadow caster volume that only intersects objects that can cast a shadow onto the semi-transparent object, not the entire visible scene.

Once the shadow casters have been determined by using a shadow caster volume, scissor tests and depth tests can be used to reduce the amount of work done per shadow caster [LENG02b] [LENG05] .

Listing 1 is the implementation of the shadow caster volume calculation for a point light source. Listing 2 is a Polyhedron class that includes the calculations for polyhedron vertices and edges, and listing 3 is the LUP decomposition implementation.

References

[CLRS01]
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein.
Introduction to Algorithms, 2nd Ed, (The MIT Press, 2001). ISBN 0-262-03293-7
 
[GOLD91]
David Goldberg. What Every Computer Scientist Should Know About Floating-Point
Arithmetic. http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
[LENG02a]
Eric Lengyel, Mathematics for 3D Game Programming & Computer Graphics,
(Charles River Media, Inc., 2002). ISBN 1-58450-037-9
 
[LENG02b]
Eric Lengyel. The Mechanics of Robust Stencil Shadows, (Gamasutra, 2002).
http://www.gamasutra.com/features/20021011/lengyel_01.htm
 
[LENG05]
Eric Lengyel. Advanced Stencil Shadow and Penumbra Wedge Rendering,
(GDC 2005).
http://www.gdconf.com/
http://www.terathon.com/
 
[PTVF88]
William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery.
Numerical Recipes in C, The Art of Scientific Computing, 2nd Ed,
(Cambridge University Press, 1988). ISBN 0-521-43108-5
http://www.library.cornell.edu/nr/bookcpdf.html




Listings

Contents
  1.0 Introduction
  2.0 Point Light Sources
  2.1 LUP Decomposition
  2.2 Calculating the New Shadow Caster Volume Planes
  3.0 Directional Light Sources
  4.0 Semi-Transparent Objects
  5.0 Summary
  Listings

  Printable version
  Discuss this article