Download presentation

Presentation is loading. Please wait.

Published byJena Venard Modified over 2 years ago

1
Spherical Harmonic Lighting Jaroslav Křivánek

2
Overview Function approximation Function approximation Spherical harmonics Spherical harmonics Some other time Some other time Illumination from environment maps BRDF representation by spherical harmonics Spherical harmonics rotation Hemispherical harmonics Radiance Caching Precomputed Radiance Transfer Clustered Principal Component Analysis Wavelet Methods

3
I) Function Approximation

4
Function Approximation G(x)... function to approximate G(x)... function to approximate B 1 (x), B 2 (x), … B n (x) … basis functions B 1 (x), B 2 (x), … B n (x) … basis functions We want We want Storing a finite number of coefficients c i gives an approximation of G(x) Storing a finite number of coefficients c i gives an approximation of G(x)

5
Function Approximation How to find coefficients c i ? How to find coefficients c i ? Minimize an error measure What error measure? What error measure? L 2 error

6
Function Approximation Minimizing E L 2 leads to Minimizing E L 2 leads to Where (function scalar product) Where (function scalar product)

7
Function Approximation Orthonormal basis Orthonormal basis If basis is orthonormal then If basis is orthonormal then we want our bases to be orthonormal we want our bases to be orthonormal

8
II) Spherical Harmonics

9
Spherical Harmonics Spherical function approximation Spherical function approximation Domain I = unit sphere S Domain I = unit sphere S = directions in 3D Approximated function: G(θ,φ) Approximated function: G(θ,φ) Basis functions: Y i (θ,φ)= Y l,m (θ,φ) Basis functions: Y i (θ,φ)= Y l,m (θ,φ) indexing: i = l (l+1) + m

10
Spherical Harmonics Y 0,0 Y 1,-1 Y 2,-2 Y 2,-1 Y 2,0 Y 2,1 Y 2,2 Y 1,0 Y 1,1 band 0 (l=0) band 1 (l=1) band 2 (l=2)

11
Spherical Harmonics K … normalization constant K … normalization constant P … Associted Legendre polynomial P … Associted Legendre polynomial Orthonormal polynomial basis on (0,1) In general: In general: Y l,m (θ,φ) = K. Ψ(φ). P l,m (cos θ) Y l,m (θ,φ) is separable in θ and φ

12
Function Approximation with SH n…approximation order n…approximation order There are n 2 harmonics for order n There are n 2 harmonics for order n

13
Function Approximation with SH Spherical harmonics are ORTHONORMAL Spherical harmonics are ORTHONORMAL Function projection Function projection Computing the SH coefficients Usually evaluated by numerical integration Low number of coefficients Low number of coefficients low-frequency signal

14
Product Integral with SH Simplified indexing Simplified indexing Y i = Y l,m i = l (l+1) + m 2 functions represented by SH 2 functions represented by SH Integral of F(ω).G(ω) is the dot product of F’s and G’s SH coefficients Integral of F(ω).G(ω) is the dot product of F’s and G’s SH coefficients

15
Product Integral with SH F(ω) = fifi Yi(ω)Yi(ω) G(ω) = gigi Yi(ω)Yi(ω) G(ω)F(ω)dx = fifi gigi

16
Product Integral with SH Fundamental property for graphics Fundamental property for graphics Proof Proof

17
III) Illumination from environment maps

18
Direct Lighting Illumination integral at a point Illumination integral at a point How it simplifies for a parallel directional light How it simplifies for a parallel directional light Environment maps Environment maps Approximate specular reflection Lighting does not depend on position General illumination integral for an environment map How it simplifies for a specular BRDF What if the BRDF is not perfectly specular?

19
Illumination from environment maps SH representation for lighting & BRDF SH representation for lighting & BRDF Rotation Rotation

20
III) Hemispherical harmonics

21
Hemispherical harmonics New set of basis functions Designed for representing hemispherical functions Definition similar to spherical harmonics

22
Hemispherical harmonics Shifting

23
Hemispherical harmonics (0,0)(1,-1)(2,-2)(2,-1)(2,0)(2,1)(2,2)(1,0)(1,1) SH: Y l,m (θ,φ) = K. Ψ(φ). P l,m (cos θ) HSH: H l,m (θ,φ) = K. Ψ(φ). P l,m (2cos θ-1)

24
Hemispherical Harmonics video video

25
III) Radiance caching

26
Radiance Caching Irradiance caching [Ward88] Irradiance caching [Ward88] Diffuse indirect illumination is smooth Sample only sparsely, cache and interpolate later Low-frequency view BRDF Low-frequency view BRDF Indirect illumination smooth as well But the illumination is view dependent Irradiance does not describe view dependence Cache radiance instead of irradiance RADIANCE CACHING

27
Radiance Caching Incoming radiance representation Incoming radiance representation BRDF representation BRDF representation Interpolation Interpolation Alignment Alignment Gradients Gradients Video Video

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google