16. Shadow Proxies 221
Figure 16.4. The shadow volume of a proxy. (a) The volume without modulation. (b) The
volume multiplied by the dot product of the surface normal and light direction.
The solution came in the form of a reversed argument: if we cannot globally
model the way the light inﬂuences the objects, why not locally model the way the
objects inﬂuence the light? Given that in a diffusely lit environment, shadows and
reﬂections have limited spatial inﬂuence, some sort of halo around the model could
function as a light subtraction volume (see Figures 16.3 and 16.4). In order to model
directional lighting, the shadow volume could be expanded in the direction away
from the light source and contracted to zero in the opposite direction. The color-
bleeding volume could be expanded toward the light in the same manner. We call
these volumes shadow proxies,
because they serve as a stand-in for the actual geom-
etry. The volume of a proxy covers the maximum spatial extent of the shadow and
color bleeding of the geometry that the proxy represents. The technique is there-
fore limited to ﬁnite shadow volumes and is most useful for diffusely lit environ-
ments. This is similar to the Ambient Occlusion Fields technique by [Kontkanen
and Laine 05], although with ShadowProxies, modeling a nd modulating the shadow
volumes is done on the ﬂy r ather than precalculating the light accessibility of the
geometry into a cubemap.
16.2 Anatomy of a Shadow Proxy
In the current implementation, each shadow proxy can only represent a simple geo-
metrical shape like a sphere, box, or cylinder, allowing quick proximity calculations
in the fragment shader that eventually renders the shadows.
An implementation that uses super-ellipsoids [Barr 81] has also been attempted.
Even though the surface lookup is fast enough to be used in real time, the method
The Shado wProxies technique is implemented in the OpenGL- based cross-platform scenegraph li-
brary called RenderTools, available under the GNU Public License (GPL) which ensures open source
distribution. RenderTools is available on Sourceforge at http://sourceforge.net/projects/rendertools and
through the OpenGL Insights website, www.openglinsights.com