Spherical Harmonic Lighting

// QUESTION: (1) how does standard textbook introduce spherical harmonics. What is its construction? (2) Why are spherical harmonics basis of spherical functions? (3) What is the connection between this video and usual diagram of spherical harmonics? (4) Why do we rotate the nodal line in the video? (5) How do vibrations connect to quantum mechanics and why do l and m correspond to quantumn numbers? (6) What is its relationship between SO(3) and Lie Group? and Laplace's Equation and Homogeneous Polynomial

How Gary Doskas discovered Spherical Harmonics: Youtube

Paper: Spherical Harmonic Lighting: The Gritty Details

Keywords: 3D Spherical Fourier Harmonic Descriptors, Associated Legendre Polynomials, Spherical Harmonics, SO(3) and Lie Group, Laplace's Equation and Harmonics, Homogeneous Polynomial

Typical Lighting Implementation: diffuse Surface Reflection for n light sources is

\text{Intensity} = (r, g, b)_{\text{surface}} \cdot \sum_{i = 1}^n (r, g, b)_{\text{light}} \cdot (\vec{N} \cdot \vec{L})

Total amount of incoming light from all directions and scales it by cosine angle between \vec{N} and \vec{L}. This is standard of PBR, but difficult to compute

Different bidirectional reflectance distribution function (BRDF)

Different bidirectional reflectance distribution function (BRDF)

Rendering Equation

Definition of Rendering Equation

Rendering Equation:

L_0(x, w_0, \lambda, t) = L_e(x, w_0, \lambda, t) + \int_\Omega f_r(x, w_i, w_0, \lambda, t)L_i(x, w_i, \lambda, t)(w_i \cdot n) dw_i

where

Bidirectional Reflectance Distribution Function: a function I = f(\vec{\text{light}}, \vec{\text{camera}}) that encodes the material intensity of the surface. It encodes how the incoming light beam distribute into a 3D beams in spherical coordinates (spectral radiance):

  1. Mirror: output intensity for \vec{\text{camera}} is exact mirror of \vec{\text{light}}
  2. Diffuse: output intensity for \vec{\text{camera}} is independent from \vec{\text{light}}

Approximating Integrals

We approximate integral using Monte Carlo Estimator: where w(x_i) is the a weighting function.

\int f(x) dx \approx \frac{1}{N} \sum_{i = 1}^N f(x_i) w(x_i)

Usually w(x_i) = \frac{1}{Pr\{X = x_i\}}, in the case of a sphere, since the surface of the sphere is 4\pi, the probability density is \frac{1}{4\pi} for any point on sphere. Therefore, (\forall i)(w(x_i) = 4\pi)

To map (\xi_x, \xi_y) \in \text{Uniform}(0, 1)^2 onto uniform sphere, we do

(2 \arccos(\sqrt{1 - \xi_x}), 2 \pi \xi_y) \to (\theta, \varphi)

Examples of sampling designs: (a) simple random, (b) stratified random, (c) two-stage, (d) cluster, (e) systematic, and (f) spatial systematic sampling. (Adapted from De Gruijter 1999)

Examples of sampling designs: (a) simple random, (b) stratified random, (c) two-stage, (d) cluster, (e) systematic, and (f) spatial systematic sampling. (Adapted from De Gruijter 1999)

To lower the variance, we can apply stratified random sapling (b) where we divide the space into grids and pick random points in the grid.

Monte Carlo Stratified Sampling on Sphere with 10,000 samples presented in klzzwxh:0009 angle space and in 3D projection

Monte Carlo Stratified Sampling on Sphere with 10,000 samples presented in (\theta, \phi) angle space and in 3D projection

Orthogonal Basis Functions

Here is a review of basis functions:

Basis Function Visualization

Basis Function Visualization

There are many orthornormal basis that can form polynomials:

2D Associated Legendre Polynomials (Legendre Function)

2D Associated Legendre Polynomials (Legendre Function)

Table of Content