A theory of monte carlo visibility sampling

Soft shadows from area lights are one of the most crucial effects in high-quality and production rendering, but Monte-Carlo sampling of visibility is often the main source of noise in rendered images. Indeed, it is common to use deterministic uniform sampling for the smoother shading effects in direct lighting, so that all of the Monte Carlo noise arises from visibility sampling alone. In this article, we analyze theoretically and empirically, using both statistical and Fourier methods, the effectiveness of different nonadaptive Monte Carlo sampling patterns for rendering soft shadows. We start with a single image scanline and a linear light source, and gradually consider more complex visibility functions at a pixel. We show analytically that the lowest expected variance is in fact achieved by uniform sampling (albeit at the cost of visual banding artifacts). Surprisingly, we show that for two or more discontinuities in the visibility function, a comparable error to uniform sampling is obtained by “uniform jitter” sampling, where a constant jitter is applied to all samples in a uniform pattern (as opposed to jittering each stratum as in standard stratified sampling). The variance can be reduced by up to a factor of two, compared to stratified or quasi-Monte Carlo techniques, without the banding in uniform sampling. We augment our statistical analysis with a novel 2D Fourier analysis across the pixel-light space. This allows us to characterize the banding frequencies in uniform sampling, and gives insights into the behavior of uniform jitter and stratified sampling. We next extend these results to planar area light sources. We show that the best sampling method can vary, depending on the type of light source (circular, Gaussian, or square/rectangular). The correlation of adjacent “light scanlines” in square light sources can reduce the effectiveness of uniform jitter sampling, while the smoother shape of circular and Gaussian-modulated sources preserves its benefits—these findings are also exposed through our frequency analysis. In practical terms, the theory in this article provides guidelines for selecting visibility sampling strategies, which can reduce the number of shadow samples by 20--40%, with simple modifications to existing rendering code.

[1]  R. Ramamoorthi,et al.  Adaptive wavelet rendering , 2009, SIGGRAPH 2009.

[2]  Don P. Mitchell,et al.  Spectrally optimal sampling for distribution ray tracing , 1991, SIGGRAPH.

[3]  Douglas Lanman,et al.  Shield fields: modeling and capturing 3D occluders , 2008, ACM Trans. Graph..

[4]  Peter Shirley,et al.  A Low Distortion Map Between Disk and Square , 1997, J. Graphics, GPU, & Game Tools.

[5]  François X. Sillion,et al.  Fast calculation of soft shadow textures using convolution , 1998, SIGGRAPH.

[6]  F. Durand,et al.  A frequency analysis of light transport , 2005, ACM Trans. Graph..

[7]  Samuel P. Uselton,et al.  Statistically optimized sampling for distributed ray tracing , 1985, SIGGRAPH.

[8]  Frédo Durand,et al.  A frequency analysis of light transport , 2005, SIGGRAPH '05.

[9]  Soheil Darabi,et al.  Eurographics Symposium on Rendering 2010 Compressive Estimation for Signal Integration in Rendering , 2022 .

[10]  J. Yellott Spectral consequences of photoreceptor sampling in the rhesus retina. , 1983, Science.

[11]  LEXANDER K ELLER Quasi-Monte Carlo Methods in Computer Graphics , 1994 .

[12]  Harald Niederreiter,et al.  Random number generation and Quasi-Monte Carlo methods , 1992, CBMS-NSF regional conference series in applied mathematics.

[13]  Li-yi Wei Multi-class blue noise sampling , 2010 .

[14]  E. Candès,et al.  Stable signal recovery from incomplete and inaccurate measurements , 2005, math/0503066.

[15]  Frédo Durand,et al.  Frequency analysis and sheared filtering for shadow light fields of complex occluders , 2011, TOGS.

[16]  Li-Yi Wei,et al.  Parallel Poisson disk sampling , 2008, ACM Trans. Graph..

[17]  E.J. Candes Compressive Sampling , 2022 .

[18]  Li-Yi Wei Parallel Poisson disk sampling , 2008, SIGGRAPH 2008.

[19]  Matthias Zwicker,et al.  Multidimensional adaptive sampling and reconstruction for ray tracing , 2008, ACM Trans. Graph..

[20]  Frédo Durand,et al.  The visibility skeleton: a powerful and efficient multi-purpose global visibility tool , 1997, SIGGRAPH.

[21]  Li-Yi Wei Multi-class blue noise sampling , 2010, ACM Trans. Graph..

[22]  Pat Hanrahan,et al.  Triple product wavelet integrals for all-frequency relighting , 2004, ACM Trans. Graph..

[23]  Laurent Moll,et al.  Efficient image-based methods for rendering soft shadows , 2000, SIGGRAPH.

[24]  Greg Humphreys,et al.  A spatial data structure for fast Poisson-disk sample generation , 2006, ACM Trans. Graph..

[25]  Richard Peter Weistroffer,et al.  Multidimensional adaptive sampling and reconstruction for ray tracing , 2008, SIGGRAPH 2008.

[26]  Alexander Keller,et al.  Instant radiosity , 1997, SIGGRAPH.

[27]  Alexander Keller Quasi-Monte Carlo methods in computer graphics , 1996 .

[28]  Baining Guo,et al.  Progressive radiance evaluation using directional coherence maps , 1998, SIGGRAPH.

[29]  Ares Lagae,et al.  A Comparison of Methods for Generating Poisson Disk Distributions , 2008, Comput. Graph. Forum.

[30]  Don P. Mitchell,et al.  Generating antialiased images at low sampling densities , 1987, SIGGRAPH.

[31]  John Hart,et al.  ACM Transactions on Graphics , 2004, SIGGRAPH 2004.

[32]  Robert L. Cook,et al.  Stochastic sampling in computer graphics , 1988, TOGS.

[33]  Ravi Ramamoorthi,et al.  A first-order analysis of lighting, shading, and shadows , 2007, TOGS.

[34]  Mark A. Z. Dippé,et al.  Antialiasing through stochastic sampling , 1985, SIGGRAPH.

[35]  Eugene Fiume,et al.  On numerical solutions to one-dimensional integration problems with applications to linear light sources , 2001, TOGS.

[36]  Frédo Durand,et al.  A Frequency Analysis of Monte-Carlo and other Numerical Integration Schemes , 2011 .

[37]  Emmanuel J. Candès,et al.  Near-Optimal Signal Recovery From Random Projections: Universal Encoding Strategies? , 2004, IEEE Transactions on Information Theory.

[38]  Ravi Ramamoorthi,et al.  A Fourier theory for cast shadows , 2004, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[39]  Maneesh Agrawala,et al.  Efficient Shadows for Sampled Environment Maps , 2006, J. Graph. Tools.

[40]  Don P. Mitchell,et al.  Consequences of stratified sampling in graphics , 1996, SIGGRAPH.