Computer Graphics

University of California - Berkeley

A Theory of Monte Carlo Visibility Sampling

Download Paper
Download Bibtex



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 paper, we analyze theoretically and empirically, using both statistical and Fourier methods, the effectiveness of different non- adaptive 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 an- alytically 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 paper 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.


Ravi Ramamoorthi, John Anderson, Mark Meyer, and Derek Nowrouzezahrai. "A Theory of Monte Carlo Visibility Sampling". ACM Transactions on Graphics, 2012.

Supplemental Material

Submission Video

Supplementary 1