310 likes | 602 Views
Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics. Jan Kautz, MPI Informatik Peter-Pike Sloan, Microsoft Research John Snyder, Microsoft Research. Motivation – BRDF vs. Light Complexity. Lighting. ?. area lights. point lights. BRDF Complexity.
E N D
Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics Jan Kautz, MPI Informatik Peter-Pike Sloan, Microsoft Research John Snyder, Microsoft Research
Motivation –BRDF vs. Light Complexity Lighting ? arealights pointlights BRDF Complexity Phong +diffuse arbitraryaniso. BRDFs
Phong Anisotropic Motivation – 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
DiffSH RefSpace FreqSpace PhoDiff ApproxEnv HomEnv PRT Our Technique ArbBRDF Related Work –Interactive Techniques Lighting high-frequencyarea lighting low-frequencyarea lighting BRDF Complexity point lights diffuse Phong isotropic anisotropic 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
Related Work • Previous use of Spherical Harmonics • [Cabral87] Bidirectional Reflection Functions from Surface Bump Maps • [Westin92] Predicting Reflectance Functions from Complex Surfaces
Background – 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
Background –Spherical Harmonics • Basis functions (examples) i = 1 i = 2 i = 3 i = 4 i = 8 i = 12 i = 15 i = 19
Background –Spherical Harmonics • Example: projection of environment n=4 n=9 n=25 n=262 original
into SH into SH light function: BRDF: Environment Mapping + Spherical Harmonics • Rendering Equation (no shadows): • Rewrite with • Project Lighting and BRDF
Evaluating the Integral • The integralbecomes • But BRDF defined in local frameRotate lighting (or BRDF) to match:
Preprocessing –BRDF Texture • Project BRDF into SH: • Put coefficients in texture map • Use parabolic parameterization for … i=1 i=3 i=4 i=5 i=6 i=7
Lookup (local ) … Rotate lighting (to local) = Compute integral * = Rendering Project lighting per object per pixel/vertex
Examples Phong Anisotropicbrushed in X Anisotropicbrushed in Y
Lookup (local ) … = * = Rendering – Fixed Light Project lighting ONCE Rotate lighting (local) Compute integral
Lookup (local ) … = Rendering – Fixed View Project lighting Rotate BRDF (to global) = * ONCE Compute integral
Example • Bird model • 48K vert. • Measured Vinyl • FPS: • 6.04 free light/view • 28.4 fixed light • 128 fixed view
Precomputed Radiance Transfer [SIG02] Without PRT PRT: Shadows+Interrefl.SIG02: Phong only
Precomputed Radiance Transfer – Transfer Matrix Precompute how global incident lighting local incident * p1 p1 lighting p2 p2 * transfer matrices transferred radiance
Lookup (local ) … = Arbitrary BRDF with PRT Project lighting per object Transfer & rotate light per pixel/vertex = * * Compute integral
Example • Stanfordbuddha • 50K vert. • Ashikhmin-BRDF • FPS: • 4.05 no xfer • 3.22 xfer • 15.6 fixed light • 127 fixed view
Example 2:PRT with different BRDFs Measured Vinyl Phong [SIG02]
Results –Brushed Metal-Patch Anisotropic ASbrushed radially Anisotropic ASbrushed tangentally
Results – Spatially Varying BRDF Varying Exponent Varying Anisotropy
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)
Thank you! Questions? Please visit us at www.mpi-sb.mpg.de