Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jan Kautz, MPI Informatik Peter-Pike Sloan, Microsoft Research

Similar presentations

Presentation on theme: "Jan Kautz, MPI Informatik Peter-Pike Sloan, Microsoft Research"— Presentation transcript:

1 Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics
Jan Kautz, MPI Informatik Peter-Pike Sloan, Microsoft Research John Snyder, Microsoft Research

2 Motivation – BRDF vs. Light Complexity
Lighting ? area lights point lights Initially HW accelerated rendering was only able to render objects with point light sources and the Phong model. In recent years, research tried on the one hand to allow for arbitrary BRDFs with point lights and on the other hand limited BRDFs (Phong again) but with area lights (often given as an environment map). Our work tries to fill in the last gap, i.e. arbitrary BRDFs and area lights BRDF Complexity Phong + diffuse arbitrary aniso. BRDFs

3 Motivation – What we want
Illuminate objects with environment maps Use arbitrary BRDFs Change lighting on-the-fly Possibly include self-shadowing and interreflections At real-time rates Phong Anisotropic

4 Related Work – Interactive Techniques
Lighting DiffSH RefSpace high-frequency area lighting PhoDiff FreqSpace ApproxEnv HomEnv low-frequency area lighting PRT Our Technique ArbBRDF point lights BRDF Complexity diffuse Phong isotropic anisotropic Our Technique Phong/Diffuse Prefiltered Environment Maps [Miller84] [Greene86] [Heidrich99] Precomputed Radiance Transfer [Sloan02] Frequency Space Environment Mapping [Ramamoorthi02] BRDF Approximation for Environment Maps [Kautz99] Reflection Space Rendering [Cabral99] Diffuse Environment Maps using Spherical Harmonics [Ramamoorthi01] Homomorphic Factorization of Environment Maps [Latta02] Arbitrary BRDFs with Point Lights [Kautz99] [McCool01]

5 Related Work Previous use of Spherical Harmonics
[Cabral87] Bidirectional Reflection Functions from Surface Bump Maps [Westin92] Predicting Reflectance Functions from Complex Surfaces

6 Background – 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

7 Background – Spherical Harmonics
Basis functions (examples) i = 1 i = 2 i = 3 i = 4 i = 8 i = 12 i = 15 i = 19

8 Background – Spherical Harmonics
Example: projection of environment n=4 n=9 n=25 n=262 original

9 Environment Mapping + Spherical Harmonics
Rendering Equation (no shadows): Rewrite with Project Lighting and BRDF Mention cosine explicitly as important Rewrite: mention tabulate light function: into SH BRDF:

10 Evaluating the Integral
The integral becomes But BRDF defined in local frame Rotate lighting (or BRDF) to match:

11 Preprocessing – BRDF Texture
Project BRDF into SH: Put coefficients in texture map Use parabolic parameterization for Project the BRDF into Spherical Harmonics for every (local) view direction v individually and tabulate the results in a texture map. One texture map here shows the coefficients for some basis function i, but for all view direction v. i=1 i=3 i=4 i=5 i=6 i=7

12 Rendering Lookup (local ) Project lighting per object * =
Lookup (local ) Project lighting per object * = Rotate lighting (to local) = Compute integral per pixel/vertex

13 Anisotropic brushed in X Anisotropic brushed in Y
Examples Phong Anisotropic brushed in X Anisotropic brushed in Y

14 Rendering – Fixed Light
Lookup (local ) Project lighting ONCE Rotate lighting (local) * = Compute integral =

15 Rendering – Fixed View Lookup (local ) Project lighting
Rotate BRDF (to global) * = ONCE Compute integral =

16 Example Bird model 48K vert. Measured Vinyl FPS: 6.04 free light/view
28.4 fixed light 128 fixed view

17 Precomputed Radiance Transfer
[SIG02] Tell cosine again Without PRT PRT: Shadows+Interrefl. SIG02: Phong only

18 Precomputed Radiance Transfer – Transfer Matrix
Precompute how global incident lighting  local incident * p1 p1 lighting p2 p2 * transfer matrices transferred radiance

19 Arbitrary BRDF with PRT
Lookup (local ) Project lighting per object Transfer & rotate light per pixel/vertex * * = Compute integral =

20 Example Stanford buddha 50K vert. Ashikhmin- BRDF FPS: 4.05 no xfer
15.6 fixed light 127 fixed view

21 Example 2: PRT with different BRDFs
Phong [SIG02] Measured Vinyl

22 Results – Different BRDFs

23 Results – Brushed Metal-Patch
Anisotropic AS brushed radially Anisotropic AS brushed tangentally

24 Results – Spatially Varying BRDF
Varying Exponent Varying Anisotropy

25 Comparison of SH order vs. Glossiness

26 Conclusions 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

28 Glossy Transfer – Rendering
transfer matrix lighting coefficients transferred radiance exiting radiance * BRDF kernel evaluate at R convolution transfer computation lookup

29 Precomputation – 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

30 Precomputation – Diffuse Transfer
Visually: . Basis 16 Basis 17 Basis 18 illuminate result

31 Rendering Project lighting into SH Per-vertex:
Project into local tangent frame Lookup : Rotate lighting: Compute dot-product: * = =

32 Results Glossy object, 50K mesh
No Shadows/Inter Shadows Shadows+Inter Glossy object, 50K mesh Runs at 3.6/16/125fps on 2.2Ghz P4, ATI Radeon 8500

33 Dynamic Lighting Sample incident lighting on-the-fly Results
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: 6x16x16 Average error: 0.2%, worst-case: 0.5% Takes 1.16 ms on P3-933Mhz, ATI 8500

34 Introduction – Light Integration
Integrate over all incoming light Emitter 1 Emitter 2 Diffuse: * cos<n, s> Glossy: * f(v, s) * cos<n, s> Receiver

35 Background – Spherical Harmonics
Projection: Reconstruction: Integration: Convolution/Rotation: Simple and efficient formulas

36 Overview Previous Work Background Fast Environment Mapping with SH
Spherical Harmonics Fast Environment Mapping with SH Theory Rendering Combine with Precomputed Radiance Transfer Results Conclusions

37 Comparison – Size Light vs. SH Order
20° 40° n= n= n= n= n= n= n= RT linear quadratic cubic quartic quintic windowed

38 Introduction – 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

39 Precomputed 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 global local transfer

40 Introduction – Environment Maps
Approximate incident light field with a single sample at object’s center Assumptions: Environment at infinity No self-shadowing or interreflections (concave object)

41 Motivation – BRDF Complexity
HW rendering: Increased BRDF complexity But only for point light sources! [Heidrich98] [Kautz00]

42 Results – 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

43 Results – Different BRDFs

44 Motivation – 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

Download ppt "Jan Kautz, MPI Informatik Peter-Pike Sloan, Microsoft Research"

Similar presentations

Ads by Google