Importance Sampling Spherical Harmonics

In this paper we present the first practical method for importance sampling functions represented as spherical harmonics (SH). Given a spherical probability density function (PDF) represented as a vector of SH coefficients, our method warps an input point set to match the target PDF using hierarchical sample warping. Our approach is efficient and produces high quality sample distributions. As a by‐product of the sampling procedure we produce a multi‐resolution representation of the density function as either a spherical mip‐map or Haar wavelet. By exploiting this implicit conversion we can extend the method to distribute samples according to the product of an SH function with a spherical mip‐map or Haar wavelet. This generalization has immediate applicability in rendering, e.g., importance sampling the product of a BRDF and an environment map where the lighting is stored as a single high‐resolution wavelet and the BRDF is represented in spherical harmonics. Since spherical harmonics can be efficiently rotated, this product can be computed on‐the‐fly even if the BRDF is stored in local‐space. Our sampling approach generates over 6 million samples per second while significantly reducing precomputation time and storage requirements compared to previous techniques.

[1]  Paul Lalonde,et al.  Representations and uses of light distribution functions , 1998 .

[2]  Szymon Rusinkiewicz,et al.  Efficient BRDF importance sampling using a factored representation , 2004, SIGGRAPH 2004.

[3]  Robert L. Cook,et al.  A Reflectance Model for Computer Graphics , 1987, TOGS.

[4]  Tomas Akenine-Möller,et al.  Wavelet importance sampling: efficiently evaluating products of complex functions , 2005, ACM Trans. Graph..

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

[6]  Weifeng Sun,et al.  Generalized wavelet product integral for rendering dynamic glossy objects , 2006, SIGGRAPH '06.

[7]  K. Ruedenberg,et al.  Rotation Matrices for Real Spherical Harmonics. Direct Determination by Recursion , 1998 .

[8]  Peter Shirley,et al.  The halfway vector disk for BRDF modeling , 2006, TOGS.

[9]  K. Torrance,et al.  Theory for off-specular reflection from roughened surfaces , 1967 .

[10]  M. K. Paul Recurrence relations for integrals of Associated Legendre functions , 1978 .

[11]  Donald P. Greenberg,et al.  Non-linear approximation of reflectance functions , 1997, SIGGRAPH.

[12]  Tomas Akenine-Möller,et al.  Practical Product Importance Sampling for Direct Illumination , 2008, Comput. Graph. Forum.

[13]  Peter Shirley,et al.  Discrepancy as a Quality Measure for Sample Distributions , 1991, Eurographics.

[14]  Pat Hanrahan,et al.  All-frequency shadows using non-linear wavelet lighting approximation , 2003, ACM Trans. Graph..

[15]  V. Ostromoukhov Sampling with polyominoes , 2007, SIGGRAPH 2007.

[16]  Jan Kautz,et al.  Precomputed radiance transfer for real-time rendering in dynamic, low-frequency lighting environments , 2002 .

[17]  Serge J. Belongie,et al.  Structured importance sampling of environment maps , 2003, ACM Trans. Graph..

[18]  L. M. M.-T. Spherical Harmonics: an Elementary Treatise on Harmonic Functions, with Applications , 1928, Nature.

[19]  A. R. DiDonato Recurrence relations for the indefinite integrals of the associated Legendre functions , 1982 .

[20]  Leonidas J. Guibas,et al.  Optimally combining sampling techniques for Monte Carlo rendering , 1995, SIGGRAPH.

[21]  Jan Kautz,et al.  Fast Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics , 2002, Rendering Techniques.

[22]  Parris K. Egbert,et al.  Two Stage Importance Sampling for Direct Lighting , 2006, Rendering Techniques.

[23]  Pat Hanrahan,et al.  Frequency space environment map rendering , 2002, SIGGRAPH.

[24]  Pat Hanrahan,et al.  Wavelet radiosity , 1993, SIGGRAPH.

[25]  Kadi Bouatouch,et al.  Radiance caching for efficient global illumination computation , 2005 .

[26]  Nelson L. Max,et al.  Bidirectional reflection functions from surface bump maps , 1987, SIGGRAPH.

[27]  Gregory J. Ward,et al.  Measuring and modeling anisotropic reflection , 1992, SIGGRAPH.

[28]  G. Rybicki Radiative transfer , 2019, Climate Change and Terrestrial Ecosystem Modeling.

[29]  Yannick Boucher,et al.  Wavelet-based modeling of spectral bidirectional reflectance distribution function data , 2004 .

[30]  Raphaëlle Chaine,et al.  Direct Spherical Harmonic Transform of a Triangulated Mesh , 2006, J. Graph. Tools.

[31]  V. Ostromoukhov,et al.  Fast hierarchical importance sampling with blue noise properties , 2004, SIGGRAPH 2004.

[32]  K. Subr,et al.  Steerable Importance Sampling , 2007, 2007 IEEE Symposium on Interactive Ray Tracing.

[33]  Peter Shirley,et al.  An Anisotropic Phong BRDF Model , 2000, J. Graphics, GPU, & Game Tools.

[34]  Wojciech Matusik,et al.  A data-driven reflectance model , 2003, ACM Trans. Graph..

[35]  Wolfgang Heidrich,et al.  Bidirectional importance sampling for direct illumination , 2005, EGSR '05.

[36]  Peter Shirley,et al.  Physically based lighting calculations for computer graphics , 1991 .

[37]  Robin Green,et al.  Spherical Harmonic Lighting: The Gritty Details , 2003 .

[38]  D. Pinchon,et al.  Rotation matrices for real spherical harmonics: general rotations of atomic orbitals in space-fixed axes , 2007 .

[39]  Parris K. Egbert,et al.  Importance resampling for global illumination , 2005, EGSR '05.

[40]  Greg Humphreys,et al.  Physically Based Rendering: From Theory to Implementation , 2004 .

[41]  Harry Shum,et al.  Eurographics Symposium on Rendering (2004) All-frequency Precomputed Radiance Transfer for Glossy Objects , 2022 .

[42]  Mark S. Gordon,et al.  Rapid and stable determination of rotation matrices between spherical harmonics by direct recursion , 1999 .

[43]  Mathias Paulin,et al.  BRDF Measurement Modelling using Wavelets for Efficient Path Tracing , 2003, Comput. Graph. Forum.

[44]  Alexander Keller,et al.  Efficient Illumination by High Dynamic Range Images , 2003, Rendering Techniques.

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

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

[47]  Rui Wang,et al.  Efficient wavelet rotation for environment map rendering , 2006, EGSR '06.

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

[49]  P. Hanrahan,et al.  Triple product wavelet integrals for all-frequency relighting , 2004, SIGGRAPH 2004.

[50]  Peter Shirley,et al.  Physically Based Lighting Calculations for Computer Graphics: A Modern Perspective , 1992 .