Accurate Shadows by Depth Complexity Sampling

Vincent Forest, Loïc Barthe and Mathias Paulin

Eurographics 2008, Crete, Greece

[bibtex] [pdf] [video] [slide Lyon GDC 07]

Abstract

The accurate generation of soft shadows is a particularly computationally intensive task. In order to reduce rendering time, most real-time and offline applications decorrelate the generation of shadows from the computation of lighting. In addition to such approximations, they generate shadows using some restrictive assumptions only correct in very specific cases, leading to penumbra over-estimation or light-leaking artifacts. In this paper we present an algorithm that produces soft shadows without exhibiting the previous drawbacks. Using a new efficient evaluation of the number of occluders between two points (i.e. the depth complexity) we either modulate direct lighting or numerically solve the rendering equation for direct illumination. Our approach approximates shadows cast by semi-opaque occluders and naturally handles lights with spatially varying luminance. Furthermore, depending on the desired performance and quality, the resulting shadows are either very close to, or as accurate as, a ray-traced reference. As a result, the presented method is well suited to many domains, ranging from quality-sensitive to performance-critical applications.

DCS japan DCS japan DCS japan

High quality shadows produced by our algorithm. The images are computed on a traditional Japanese scene composed of 501,650 visible triangles, semi-opaque occluders and 4 omni-directional area lights.

DCS japan2 DCS kitchen DCS doom

Three test scenes. From left to right: traditionnal Japanese scene (501,650 visible polygons - semi-opaque occluders - 4 omni-directional lights); kitchen scene (146,161 visible triangles - semi-opaque occluders - 2 omni-directional lights); game scene including animated skinned characters (17,693 visible polygons - 2 omni-directional lights).

Penumbra-wedges algorithm Depth Complexity Sampling Ray-traced reference

Shadow comparison - Comparison of the shadows generated by the penumbra wedge algorithm (left), our Depth Complexity Sampling (middle) and a Ray-Traced reference (right). In addition of the overlapping penumbrae artifact, the penumbra wedge algorithm produces an incorrect lighting due to the single light sample direct lighting computation.

top