Category Archives: Shadows

Description

Variance Shadow Mapping

An different approach to store the shadow map to gain softer shadows with less artifacts. The abstracts says the following:

“Shadow maps are a widely used shadowing technique in real time graphics. One major drawback of their use is that they cannot be filtered in the same way as color textures, typically leading to severe aliasing. This paper introduces variance shadow maps, a new real time shadowing algorithm. Instead of storing a single depth value, we store the mean and mean squared of a distribution of depths, from which we can efficiently compute the variance over any filter region. Using the variance, we derive an upper bound on the fraction of a shaded fragment that is occluded. We show that this bound often provides a good approximation to the true occlusion, and can be used as an approximate value for rendering. Our algorithm is simple to implement on current graphics processors and solves the problem of shadow map aliasing with minimal additional storage and computation.”

Variance Shadow Mapping

The original paper and demo with source code:
http://www.punkuser.net/vsm/

Nvidias implementation and description of the algorithm (source code for DirectX10 can also be found on the same page):
http://developer.download.nvidia.com/SDK/10.5/direct3d/Source/
VarianceShadowMapping/Doc/VarianceShadowMapping.pdf

Some more info from the author:
http://forum.beyond3d.com/showthread.php?t=40805

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

Projected Planar Shadows

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