Title: Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics
1Fast, Arbitrary BRDF Shading for Low-Frequency
Lighting Using Spherical Harmonics
- Jan Kautz, MPI Informatik
- Peter-Pike Sloan, Microsoft Research
- John Snyder, Microsoft Research
2Motivation BRDF vs. Light Complexity
Lighting
?
arealights
pointlights
BRDF Complexity
Phong diffuse
arbitraryaniso. BRDFs
3Motivation What we want
- What we want
- Illuminate objects with environment maps
- Use arbitrary BRDFs
- Change lighting on-the-fly
- Possibly include self-shadowing
andinterreflections - At real-time rates
4Related Work Interactive Techniques
Lighting
high-frequencyarea lighting
low-frequencyarea lighting
BRDF Complexity
point lights
diffuse
Phong
isotropic
anisotropic
Phong/Diffuse Prefiltered Environment
MapsMiller84 Greene86 Heidrich99
Arbitrary BRDFs with Point LightsKautz99
McCool01
BRDF Approximation for Environment MapsKautz99
Reflection Space RenderingCabral99
Diffuse Environment Maps using Spherical
HarmonicsRamamoorthi01
Homomorphic Factorization of Environment
MapsLatta02
Frequency Space Environment MappingRamamoorthi02
Precomputed Radiance TransferSloan02
Our Technique
5Related Work
- Previous use of Spherical Harmonics
- Cabral87 Bidirectional Reflection Functions
from Surface Bump Maps - Westin92 Predicting Reflectance Functions from
Complex Surfaces
6Background Spherical Harmonics
- Spherical Harmonics
- Orthonormal basis over the sphere
- Analogous to Fourier transform over 1D circle
- Important properties
- Rotational invariance ? no aliasing artifacts
- Projection
- Integration
- Rotation linear xform on coefficients
7Background Spherical Harmonics
- Basis functions (examples)
i 1
i 2
i 3
i 4
i 8
i 12
i 15
i 19
8Background Spherical Harmonics
- Example projection of environment
n4
n9
n25
n262
original
9Environment Mapping Spherical Harmonics
- Rendering Equation (no shadows)
- Rewrite with
- Project Lighting and BRDF
10Evaluating the Integral
- The integralbecomes
- But BRDF defined in local frameRotate lighting
(or BRDF) to match
11Preprocessing BRDF Texture
- Project BRDF into SH
- Put coefficients in texture map
- Use parabolic parameterization for
i1
i3
i4
i5
i6
i7
12Rendering
Project lighting
per object
per pixel/vertex
13Examples
Phong
Anisotropicbrushed in X
Anisotropicbrushed in Y
14Rendering Fixed Light
Project lighting
ONCE
Rotate lighting (local)
Compute integral
15Rendering Fixed View
Project lighting
Rotate BRDF (to global)
ONCE
Compute integral
16Example
- Bird model
- 48K vert.
- Measured Vinyl
- FPS
- 6.04 free light/view
- 28.4 fixed light
- 128 fixed view
17Precomputed Radiance Transfer
SIG02
Without PRT
PRT ShadowsInterrefl.SIG02 Phong only
18Precomputed Radiance Transfer Transfer Matrix
Precompute how global incident lighting ? local
incident
p1
p1
lighting
p2
p2
transfer matrices
transferred radiance
19Arbitrary BRDF with PRT
Project lighting
per object
Transfer rotate light
per pixel/vertex
Compute integral
20Example
- Stanfordbuddha
- 50K vert.
- Ashikhmin-BRDF
- FPS
- 4.05 no xfer
- 3.22 xfer
- 15.6 fixed light
- 127 fixed view
21Example 2PRT with different BRDFs
Measured Vinyl
Phong SIG02
22Results Different BRDFs
23Results Brushed Metal-Patch
Anisotropic ASbrushed radially
Anisotropic ASbrushed tangentally
24Results Spatially Varying BRDF
Varying Exponent
Varying Anisotropy
25Comparison of SH order vs. Glossiness
26Conclusions
- Pros
- Fast, arbitrary dynamic lighting
- Works for arbitrary BRDFs
- Combined with PRT includes shadows and
interreflections - Cons
- Works only for low-frequency lighting
- Not real-time (yet)
27- Thank you!
- Questions?
- Please visit us at www.mpi-sb.mpg.de
28Glossy Transfer Rendering
29Precomputation Transfer Matrix
- Glossy Transfer
- More difficult, but works similarly
- Have to compute matrix instead of vector
- Update matrices for interreflections
- Neighborhood Transfer
- Same as for glossy, just for points not on
surface
30Precomputation Diffuse Transfer
illuminate
result
31Rendering
- Project lighting into SH
- Per-vertex
- Project into local tangent frame
- Lookup
- Rotate lighting
- Compute dot-product
32Results
No Shadows/Inter Shadows
ShadowsInter
- Glossy object, 50K mesh
- Runs at 3.6/16/125fps on 2.2Ghz P4, ATI Radeon
8500
33Dynamic Lighting
- Sample incident lighting on-the-fly
- Precompute textures for SH basis functions in
cube map parameterization - Render 6 cube map faces around p
- Read them back
- Projection simple dot-product between cube maps
- Results
- Low-resolution cube maps sufficient
6x16x16Average error 0.2, worst-case 0.5 - Takes 1.16 ms on P3-933Mhz, ATI 8500
34Introduction Light Integration
- Integrate over all incoming light
Emitter 1
Emitter 2
Diffuse cosltn, sgt Glossy f(v, s)
cosltn, sgt
Receiver
35Background Spherical Harmonics
- Projection
- Reconstruction
- Integration
- Convolution/Rotation
- Simple and efficient formulas
36Overview
- Previous Work
- Background
- Environment Mapping
- Spherical Harmonics
- Fast Environment Mapping with SH
- Theory
- Rendering
- Combine with Precomputed Radiance Transfer
- Results
- Conclusions
37Comparison Size Light vs. SH Order
0
20
40
n2 n3 n4 n5
n6 n26 n26 RT
linear quadratic cubic quartic
quintic windowed
38Introduction Filtered Environment Maps
Environment map over sphere
Source
Target
- BRDF maps to
- Shift-variant radially symmetric kernel? 2D
filtered environment map - But
- General anisotropic BRDF? 5D filtered
environment map
apply filter
Filter kernel
39Precomputed Radiance Transfer
- Precompute how global incident radiance is
transferred to local incident radiance at points
- For self-shadowing and interreflections
- Transfer is represented as a
- Transfer Matrix
40Introduction Environment Maps
- Environment Map
- Approximate incident light field with a single
sample at objects center
- Assumptions
- Environment at infinity
- No self-shadowing orinterreflections (concave
object)
41Motivation BRDF Complexity
- HW rendering Increased BRDF complexity
- But only for point light sources!
Heidrich98
Kautz00
42Results Head in Various Environments
- Max Planck head
- 50K vertices
- Ashikhmin-BRDF
- FPS
- 5.24 no xfer
- 4.18 xfer
- 25.3 fixed light
- 130 fixed view
43Results Different BRDFs
44Motivation Environment Maps
- Environment Maps
- Store light incident at single position
- Prefilter to get glossy reflections
- Only limited Phong-like BRDFs
- Complex BRDFs require up to 5D table
- Dynamic lighting difficult, no self-shadowing
Miller Hoffmann84
filter