Introduction – Diffuse Object

Download Report

Transcript Introduction – Diffuse Object

Precomputed Radiance Transfer
for Real-Time Rendering in Dynamic,
Low-Frequency Lighting Environments
Peter-Pike Sloan, Microsoft Research
Jan Kautz, MPI Informatik
John Snyder, Microsoft Research
Previous Work – Where We Fit
Lighting
full
env.
map
[Blinn76]
? ?
our
technique
[Moeller02]
single
area
light
[Ashikhmin02]
[Ashikhmin02]
[Crow77]
[Heidrich00]
[Blinn76]
[Moeller02]
Frozen
Lighting
[Williams78]
[Malzbender01]
[Miller84]
Irradiance
Volumes
[Greger96]
[Stamminger02]
[Tong02]
[Latta02]
Surface Lightfields
[Ramamoorthi02]
[Miller98,Wood00]
[Chen02]
Non-Interactive
[Crow77]
point
lights
[Matusik02]
[Heidrich00]
simple
shadows
interreflections
Transport
Complexity
Motivation
• Better light integration
and transport
 dynamic, area lights
 self-shadowing
 interreflections
• For diffuse and
point light
area light
glossy surfaces
• At real-time rates
area lighting,
no shadows
area lighting,
shadows
Basic Idea
L(s )   li Bi (s )
v
V (s )
R (v )   L ( s ) V ( s ) f ( s , v ) H N ( s ) d s
R(v )   li ti Bi ( s ) V ( s ) f (s , v ) H N ( s ) d s
R (v )H
 N(
s )Preprocess
s , v,0)
) Hfor
ds i
s)li Bi (max(
V (ss) f (N
N ( s ) all
Diffuse Self-Transfer
2D example, piecewise constant basis, shadows only
Preprocess
Project Light
Rendering
p2
p2
p3
p1
p2
p3
p1
p3
light
light
•
p1
• p2
• p3
p1
=
=
=
Precomputation
..
.
Basis 16
Basis 17
Basis 18
..
.
illuminate
result
Previous Work – Scene Relighting
• [Dorsey91] opera lighting design
adjusts intensity of fixed light sources
• [Nimeroff94] natural environments
uses steerable functions for general skylight illumination
• [Teo97] efficient linear re-rendering
generalizes to non-infinite sources, PCA to reduce basis
• [Debevec00] reflectance field of a face
uses directional light basis for relighting faces
• [Dobashi95] lighting design
uses SH basis for point light intensity distribution
Basis Functions
• We use Spherical Harmonics
l=0 m=0
• SH have nice properties:





simple projection/reconstruction
rotationally invariant (no aliasing)
l=1 m=-1
simple rotation
simple convolution
few basis functions  low freqs
l=1 m=0
l=1 m=1
l=2 m=1
l=3 m=-1
l=3 m=2
l=4 m=-2
Diffuse Transfer Results
No Shadows/Inter
Shadows
Shadows+Inter
Glossy Self-Transfer
 exiting radiance is view-dependent
depends on BRDF (we use Phong)
R (v )   L ( s ) V ( s ) f ( s , v ) H N ( s ) d s
Glossy Self-Transfer
 exiting radiance is view-dependent
depends on BRDF (we use Phong)
 represent transferred incident
radiance, not exiting
accounts for shadows, interreflections
 allows run-time BRDF changes
R (v )   L ( s ) V ( s ) f ( s , v ) H N ( s ) d s
L ( s )  M L( s )
tran
R (v )   L ( s ) f ( s , v ) H N ( s ) d s
tran
Transfer Matrix
Precompute how global lighting  transferred lighting
*
p1
lighting
p1
p2
p2
*
transfer matrices
transferred radiance
Glossy Rendering
Lookup
at R
rpv  b M pl
T
pv
Integrates incident radiance
Transfer matrix (maps radiance to
against BRDF in direction vLighting Env in SH
transferred
incident
Freeze
Freeze the
the view
Lightradiance)
(vector)
Phong: Convolve light and
evaluate in reflection direction, R
Glossy Transfer Results
No Shadows/Inter
Shadows
Shadows+Inter
• Glossy object, 50K mesh
• Runs at 3.6/16/125fps on 2.2Ghz P4, ATI Radeon 8500
Interreflections and Caustics
interreflections
none
1 bounce
2 bounces
Transport Paths
LP
LGP
of transport complexity
*
L( D | G ) P
Runtime is independent
caustics
LS * (S * ( D | G))* P
Arbitrary BRDFs [Kautz02]
…
BRDF Coefficients
rp (v )   L ( s ) f (v , s ) H N ( s )d s
tran
rp (v )   ( li yi ( s )) f (v , s ) H N ( s )d s
rp (v )   li  yi ( s ) f (v , s ) H N ( s )d s
rpv  b Rp M pl
T
pv
=
Arbitrary BRDF Results
Anisotropic BRDFs
Other BRDFs
Spatially Varying
Neighborhood Transfer
• Allows to cast shadows/caustics onto
arbitrary receivers
• Store how object scatters/blocks light
around itself (transfer matrices on grid)
lighting
*
receiver
transfer matrices
*
receiver
transferred radiance
Neighborhood Transfer Results
• 64x64x8 neighborhood
• diffuse receiver
• timings on 2.2Ghz P4,
ATI Radeon 8500
• 4fps if light changes
• 120fps for constant light
Volumes
• Diffuse volume: 32x32x32 grid
• Runs at 40fps on 2.2Ghz P4, ATI 8500
• Here: dynamic lighting
Local Lighting using Radiance Sampling
single sample
(at center = light at )
multi-sample
locations
multi-sample
result
• Sample incident radiance at multiple points
• Choose sample points over object using ICP from VQ
• Correct for shadows but not interreflections
Light Size vs. SH Order
0°
20°
40°
n=2
linear
n=3
quadratic
n=4
cubic
n=5
quartic
n=6
quintic
n=26
n=26
windowed
RT
Results
Live Demo (Radeon 9700)
Conclusions
Contributions:
• Fast, arbitrary dynamic lighting
 on surfaces or in volumes
• Includes shadows and interreflections
• Works for diffuse and glossy BRDFs
Limitations:
• Works only for low-frequency lighting
• Rigid objects only, no deformation
Future Work
• Practical glossy transfer
 Eliminate frozen view/light constraints
 Compress matrices/vectors
• Enhanced preprocessing
 Subsurface scattering, dispersion
 Simulator optimization
 Adaptive sampling of transfer over surface
• Deformable objects
Acknowledgements
• Thanks to:





Jason Mitchell & Michael Doggett (ATI)
Matthew Papakipos (NVidia)
Paul Debevec for light probes
Stanford Graphics Lab for Buddha model
Michael Cohen, Chas Boyd, Hans-Peter Seidel for
early discussions and support
Questions?
Performance
Model
# Verts
Max
GF4 4600
FPS
50,060
215
R300
FPS
304
Precompute
Buddha
49,990
191
269
2.5h
Tweety
48,668
240
326
1.2h
Tyra
100,000
118
179
2.4h
Teapot
152,413
93
154
4.4h
1.1h
Matrix Formulation
M i   L( s ) Bi ( s )V ( s ) d s
M i     l j B j ( s )  Bi ( s )V ( s ) d s
M i   l j  B j ( s ) Bi ( s )V ( s ) d s
M ij   Bi ( s ) B j ( s )V (s ) d s
Results – Preprocessing
Model
Type
Sampling
Preproc.
FPS
head
ring
buddha
buddha
diffuse
diffuse
diffuse
glossy
50K vert.
256x256 t.
50K vert.
50K vert.
1.1h
129
8m
94
2.5h
125
2.5h ..125
tyra
diffuse
100K vert.
2.4h
83
tyra
glossy
100K vert.
2.4h
..83
teapot
glossy
150K vert.
4.4h
..49
cloud
diffuse
32x32x32
15m
40
glider
neighb.
64x64x8
3h ..120
Previous Work – Precomputed Transport
• [Greger96] irradiance volumes
move diffuse object through precomputed lighting
• [Miller98,Wood00,Chen02] surface lightfields
frozen lighting environments
• [Ashikmin02] steerable illumination textures
steers small light source over diffuse object
• [Matusik02] image-based 3D photography
surface lightfield + reflectance field – not interactive
Dynamic Lighting
• Sample incident lighting L p on-the-fly





precompute textures for SH basis functions
use cube map parameterization
render into 6 cube map faces around p
read images back
projection: 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