skip to main content
research-article

A theory of monte carlo visibility sampling

Published:07 September 2012Publication History
Skip Abstract Section

Abstract

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.

Skip Supplemental Material Section

Supplemental Material

tp139_12.mp4

mp4

13.4 MB

References

  1. Agrawala, M., Ramamoorthi, R., Heirich, A., and Moll, L. 2000. Efficient image-based methods for rendering soft shadows. In Proceedings of the ACM SIGGRAPH 00 Conferrence. 375--384. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ben-Artzi, A., Ramamoorthi, R., and Agrawala, M. 2006. Efficient shadows for sampled environment maps. J. Graph. Tools 11, 1, 13--36.Google ScholarGoogle ScholarCross RefCross Ref
  3. Candes, E. 2006. Compressive sampling. In Proceedings of the International Congress of Mathematics. Number 3, 1433--1452.Google ScholarGoogle Scholar
  4. Candes, E., Romberg, J., and Tao, T. 2006. Stable signal recovery from incomplete and inaccurate measurements. Comm. Pure Appl. Math. 59, 8, 1207--1223.Google ScholarGoogle ScholarCross RefCross Ref
  5. Candes, E. and Tao, T. 2006. Near optimal signal recovery from random projections: Universal encoding strategies? IEEE Trans. Inf. Theory 52, 12, 5406--5425. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Cook, R. 1986. Stochastic sampling in computer graphics. ACM Trans. Graph. 5, 1, 51--72. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Dippe, M. and Wold, E. 1985. Antialiasing through stochastic sampling. In Proceedings of the ACM SIGGRAPH 85 Conference. 69--78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Dunbar, D. and Humphreys, G. 2006. A spatial data structure for fast poisson-disk sample generation. ACM Trans. Graph. 25, 3, 503--508. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Durand, F. 2011. A frequency analysis of monte-carlo and other numerical integration schemes. Tech. rep. MIT-CSAIL-TR-2011-052 http://hdl.handle.net/1721.1/67677, MIT CSAIL.Google ScholarGoogle Scholar
  10. Durand, F., Drettakis, G., and Puech, C. 1997. The visibility skeleton: A powerful and efficient multi-purpose global visibility tool. In Proceedings of the ACM SIGGRAPH 97 Conference. 89--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Durand, F., Holzschuch, N., Soler, C., Chan, E., and Sillion, F. 2005. A frequency analysis of light transport. ACM Trans. Graph. 25, 3, 1115--1126. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Egan, K., Hecht, F., Durand, F., and Ramamoorthi, R. 2011. Frequency analysis and sheared filtering for shadow light fields of complex occluders. ACM Trans. Graph. 30, 2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Guo, B. 1998. Progressive radiance evaluation using directional coherence maps. In Proceedings of the ACM SIGGRAPH 98 Conference. 255--266. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Hachisuka, T., Jarosz, W., Weistroffer, R., Dale, K., Humphreys, G., Zwicker, M., and Jensen, H. 2008. Multidimensional adaptive sampling and reconstruction for ray tracing. ACM Trans. Graph. 27, 3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Heinrich, S. and Keller, A. 1994. Quasi-Monte carlo methods in computer graphics. Tech. rep. 242/3, University of Kaiserslautern.Google ScholarGoogle Scholar
  16. Keller, A. 1997. Instant radiosity. In Proceedings of the ACM SIGGRAPH 97 Conference. 49--56. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Lagae, A. and Dutre, P. 2008. A comparison of methods for generating poisson disk patterns. Comput. Graph. Forum 27, 1, 114--129.Google ScholarGoogle ScholarCross RefCross Ref
  18. Lanman, D., Raskar, R., Agrawal, A., and Taubin, G. 2008. Shield fields: modeling and capturing 3D occluders. ACM Trans. Graph. 27, 5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Lee, M., Redner, A., and Uselton, S. 1985. Statistically optimized sampling for distributed ray tracing. In Proceedings of the ACM SIGGRAPH 85 Conference. 61--68. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Mitchell, D. 1987. Generating antialiased images at low sampling densities. In Proceedings of the ACM SIGGRAPH 87 Conference. 65--72. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Mitchell, D. 1991. Spectrally optimal sampling for distribution ray tracing. In Proceedings of the ACM SIGGRAPH 91 Conference. 157--164. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Mitchell, D. 1996. Consequences of stratified sampling in graphics. In Proceedings of the ACM SIGGRAPH 96 Conference. 277--280. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ng, R., Ramamoorthi, R., and Hanrahan, P. 2004. Triple product wavelet integrals for all-frequency relighting. ACM Trans. Graph. 23, 3, 475--485. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Niederreiter, H. 1992. Random Number Generation and Quasi-Monte Carlo Methods. SIAM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Ouellette, M. and Fiume, E. 2001. On numerical solutions to one-dimensional integration problems with application to linear light sources. ACM Trans. Graph. 20, 4, 232--279. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Overbeck, R., Donner, C., and Ramamoorthi, R. 2009. Adaptive Wavelet Rendering. ACM Trans. Graph. 28, 5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Purgathofer, W. 1986. A statistical model for adaptive stochastic sampling. In Proceedings of the Eurographics Conference. 145--152.Google ScholarGoogle Scholar
  28. Ramamoorthi, R., Koudelka, M., and Belhumeur, P. 2005. A Fourier theory for cast shadows. IEEE Trans. Pattern Anal. Mach. Intell. 27, 2, 288--295. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Ramamoorthi, R., Mahajan, D., and Belhumeur, P. 2007. A first order analysis of lighting, shading, and shadows. ACM Trans. Graph. 26, 1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Sen, P. and Darabi, S. 2010. Compressive estimation for signal integration in rendering. Comput. Graph. Forum 29, 4, 1355--1363. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Shirley, P. and Chiu, K. 1997. A low distortion map between disk and square. J. Graph. Tools 2, 3, 45--52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Soler, C. and Sillion, F. 1998. Fast calculation of soft shadow textures using convolution. In Proceedings of the ACM SIGGRAPH 98 Conference. 321--332. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Wei, L. 2008. Parallel poisson disk sampling. ACM Trans. Graph. 27, 3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Wei, L. 2010. Multi-Class blue noise sampling. ACM Trans. Graph. 29, 4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Yellot, J. 1983. Spectral consequences of photoreceptor sampling in the rhesus retina. Science 221, 382--385.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. A theory of monte carlo visibility sampling

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Transactions on Graphics
        ACM Transactions on Graphics  Volume 31, Issue 5
        August 2012
        107 pages
        ISSN:0730-0301
        EISSN:1557-7368
        DOI:10.1145/2231816
        Issue’s Table of Contents

        Copyright © 2012 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 7 September 2012
        • Accepted: 1 February 2012
        • Revised: 1 December 2011
        • Received: 1 August 2011
        Published in tog Volume 31, Issue 5

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader