Upcoming Events
GDC 2010
3/9 - 3/13 @ San Francisco, CA

SXSW Interactive Festival
3/12 - 3/16 @ Austin, TX

IEEE Virtual Reality 2010
3/20 - 3/26 @ Waltham, MA

Women in Games
3/25 - 3/26 @ Bradford, United Kingdom

More events...


Quick Stats
3211 people currently visiting GDNet.
2375 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!



Link to us

Events 4 Gamers

  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