Fast Soft Self-Shadowing on Dynamic Height Fields
Article first published online: 10 SEP 2008
© 2008 The Author(s) Journal compilation © 2008 The Eurographics Association and Blackwell Publishing Ltd.
Computer Graphics Forum
Volume 27, Issue 4, pages 1275–1283, June 2008
How to Cite
Snydre, J. and Nowrouzezahrai, D. (2008), Fast Soft Self-Shadowing on Dynamic Height Fields. Computer Graphics Forum, 27: 1275–1283. doi: 10.1111/j.1467-8659.2008.01266.x
- Issue published online: 10 SEP 2008
- Article first published online: 10 SEP 2008
- Categories and Subject Descriptors: I.3.7 [Computer Graphics]: Color, shading, shadowing, and texture
We present a new, real-time method for rendering soft shadows from large light sources or lighting environments on dynamic height fields. The method first computes a horizon map for a set of azimuthal directions. To reduce sampling, we compute a multi-resolution pyramid on the height field. Coarser pyramid levels are indexed as the distance from caster to receiver increases. For every receiver point and every azimuthal direction, a smooth function of blocking angle in terms of log distance is reconstructed from a height difference sample at each pyramid level. This function's maximum approximates the horizon angle. We then sum visibility at each receiver point over wedges determined by successive pairs of horizon angles. Each wedge represents a linear transition in blocking angle over its azimuthal extent. It is precomputed in the order-4 spherical harmonic (SH) basis, for a canonical azimuthal origin and fixed extent, resulting in a 2D table. The SH triple product of 16D vectors representing lighting, total visibility, and diffuse reflectance then yields the soft-shadowed result. Two types of light sources are considered; both are distant and low-frequency. Environmental lights require visibility sampling around the complete 360 ° azimuth, while key lights sample visibility within a partial swath. Restricting the swath concentrates samples where the light comes from (e.g. 3 azimuthal directions vs. 16-32 for a full swath) and obtains sharper shadows. Our GPU implementation handles height fields up to 1024 × 1024 in real-time. The computation is simple, local, and parallel, with performance independent of geometric content.