Efficient Shadows from Sampled Environment Maps

Aner Ben-Artzi, Ravi Ramamoorthi, Maneesh Agrawala


This paper addresses the problem of efficiently calculating shadows from environment maps in the context of ray-tracing. Since accurate rendering of shadows from environment maps requires hundreds of lights, the expensive computation is determining visibility from each pixel to each light direction. We show that coherence in both spatial and angular domains can be used to reduce the number of shadow-rays that need to be traced. Specifically, we use a coarseto- fine evaluation of the image, predicting visibility by reusing visibility calculations from 4 nearby pixels that have already been evaluated. This simple method allows us to explicitly mark regions of uncertainty in the prediction. By only tracing rays in these and neighboring directions, we are able to reduce the number of shadow-rays traced by up to a factor of 20 while maintaining error rates below 0.01%. For many scenes, our algorithm can add shadowing from hundreds of lights at only twice the cost of rendering without shadows. Sample source code is available online.

A scene illuminated by a sampled environment map. The left image is rendered in POVRay using shadow-ray tracing to determine light-source visibility for the 400 lights in the scene, as sampled from the environment according to [Agarwal et al. 2003]. The center image uses our Coherence-Based Sampling to render the same scene with a 90% reduction in shadow-rays traced. The right image is again traced in POV Ray, but with a reduced sampling of the environment map (50 lights, again using [Agarwal et al. 2003]) to approximate the number of shadow-rays traced using our method. Note that the lower sampling of the environment map in the right image does not faithfully reproduce the soft shadows.

Research Paper

PDF (1.3M)


PPT (1.7M)

More Details

Project Website

Efficient Shadows from Sampled Environment Maps
Journal of Graphics Tools, Volume 11, Number 1. 2006. pp. 13-36.