Download presentation

Presentation is loading. Please wait.

Published byKaylee Ingram Modified over 3 years ago

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 BRDF Complexity Lighting Phong + diffuse arbitrary aniso. BRDFs point lights area lights ?

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

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

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

6
Background – Spherical Harmonics Spherical Harmonics : Spherical Harmonics : Orthonormal basis over the sphere Orthonormal basis over the sphere Analogous to Fourier transform over 1D circle Analogous to Fourier transform over 1D circle Important properties: Important properties: Rotational invariance no aliasing artifacts Rotational invariance no aliasing artifacts Projection: Projection: Integration: Integration: Rotation: linear xform on coefficients Rotation: linear xform on coefficients

7
Background – Spherical Harmonics Basis functions (examples) 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 Example: projection of environment n=4n=9n=25 n=26 2 original

9
Environment Mapping + Spherical Harmonics Rendering Equation (no shadows): Rendering Equation (no shadows): Rewrite with Rewrite with Project Lighting and BRDF Project Lighting and BRDF light function: into SH BRDF:

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

11
Preprocessing – BRDF Texture Project BRDF into SH: Project BRDF into SH: Put coefficients in texture map Put coefficients in texture map Use parabolic parameterization for Use parabolic parameterization for i=1i=3i=4i=5i=6i=7 …

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

13
Examples Phong Anisotropic brushed in X Anisotropic brushed in Y

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

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

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

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

18
Precomputed Radiance Transfer – Transfer Matrix * * lighting transfer matrices transferred radiance p1p1p1p1 p2p2p2p2 p1p1p1p1 p2p2p2p2 Precompute how global incident lighting local incident

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

20
Example Stanford buddha Stanford buddha 50K vert. 50K vert. Ashikhmin- BRDF Ashikhmin- BRDF FPS: FPS: 4.05 no xfer 4.05 no xfer 3.22 xfer 3.22 xfer 15.6 fixed light 15.6 fixed light 127 fixed view 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 Fast, arbitrary dynamic lighting Works for arbitrary BRDFs Works for arbitrary BRDFs Combined with PRT: includes shadows and interreflections Combined with PRT: includes shadows and interreflectionsCons: Works only for low-frequency lighting Works only for low-frequency lighting Not real-time (yet) 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 Glossy Transfer More difficult, but works similarly More difficult, but works similarly Have to compute matrix instead of vector Have to compute matrix instead of vector Update matrices for interreflections Update matrices for interreflections Neighborhood Transfer Neighborhood Transfer Same as for glossy, just for points not on surface Same as for glossy, just for points not on surface

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

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

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

33
Dynamic Lighting Sample incident lighting on-the- fly Sample incident lighting on-the- fly Precompute textures for SH basis functions in cube map parameterization Precompute textures for SH basis functions in cube map parameterization Render 6 cube map faces around p Render 6 cube map faces around p Read them back Read them back Projection: simple dot-product between cube maps Projection: simple dot-product between cube maps Results Results Low-resolution cube maps sufficient: 6x16x16 Average error: 0.2%, worst-case: 0.5% Low-resolution cube maps sufficient: 6x16x16 Average error: 0.2%, worst-case: 0.5% Takes 1.16 ms on P3-933Mhz, ATI 8500 Takes 1.16 ms on P3-933Mhz, ATI 8500

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

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

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

37
Comparison – Size Light vs. SH Order 0° 20° 40° n=2 n=3 n=4 n=5 n=6 n=26 n=26 RT linear quadratic cubic quartic quintic windowed n=2 n=3 n=4 n=5 n=6 n=26 n=26 RT linear quadratic cubic quartic quintic windowed

38
Introduction – Filtered Environment Maps Environment map over sphere Source Filter kernel Target apply filter BRDF maps to: Shift-variant & radially symmetric kernel 2D filtered environment map Shift-variant & radially symmetric kernel 2D filtered environment mapBut: General anisotropic BRDF 5D filtered environment map General anisotropic BRDF 5D filtered environment map

39
Precomputed Radiance Transfer Precompute how global incident radiance is transferred to local incident radiance at points : Precompute how global incident radiance is transferred to local incident radiance at points : For self-shadowing and interreflections For self-shadowing and interreflections Transfer is represented as a Transfer is represented as a Transfer Matrix Transfer Matrix globallocal transfer

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

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

42
Results – Head in Various Environments Max Planck head Max Planck head 50K vertices 50K vertices Ashikhmin- BRDF Ashikhmin- BRDF FPS: FPS: 5.24 no xfer 5.24 no xfer 4.18 xfer 4.18 xfer 25.3 fixed light 25.3 fixed light 130 fixed view 130 fixed view

43
Results – Different BRDFs

44
Motivation – Environment Maps Environment Maps: Environment Maps: Store light incident at single position Store light incident at single position Prefilter to get glossy reflections: Prefilter to get glossy reflections: Only limited Phong-like BRDFs Only limited Phong-like BRDFs Complex BRDFs require up to 5D table Complex BRDFs require up to 5D table Dynamic lighting difficult, no self-shadowing Dynamic lighting difficult, no self-shadowing [Miller & Hoffmann 84] filter

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google