Projected Planar Shadows

Shadows | Monday 13 October 2008 3:55 pm

This is one of the simplest technique to create shadows from an object. It requires two passes, one to draw the scene and one to draw the actual shadows. The shadows are created by projecting the object geometry to a plane and coloring it black with some alpha and blending. The projection is done with a projection matrix that is set up according to the light position and the plane equation. The projection matrix should be put after the object-to-world transformation but before the world-to-eye transformation.

Plane Projected Shadows
This is the projection matrix for projecting shadows to the xz-plane (y=0). The l vector is the light position.
Projection matrix for plane y = 0
Link to one implementation of it in OpenGL:
http://www.devmaster.net/articles/shadowprojection/

Some information about projected shadows and other shadow techniques:
http://www.opengl.org/resources/features/StencilTalk/sld020.htm

More information about the technique, and the transformation matrix and implementation aspects
http://people.freedesktop.org/~idr/2007Q2-VGP353/20070409%20-%20Planar%20shadows.pdf

Please share:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Current
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • StumbleUpon
  • Twitter
  • Reddit
  • Technorati
  • Yahoo! Bookmarks

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment