Powerpoint - Cornell Program of Computer Graphics

Download Report

Transcript Powerpoint - Cornell Program of Computer Graphics

Lightcuts: A Scalable
Approach to Illumination
Bruce Walter, Sebastian Fernandez,
Adam Arbree, Mike Donikian,
Kavita Bala, Donald Greenberg
Program of Computer Graphics, Cornell University
SIGGRAPH 2005
Lightcuts
LIGHTCUTS
• Efficient, accurate complex illumination
Environment map lighting & indirect
Time 111s
Textured area lights & indirect
Time 98s
(640x480, Anti-aliased, Glossy materials)
2
SIGGRAPH 2005
Scalable
LIGHTCUTS
• Scalable solution for many point lights
– Thousands to millions
– Sub-linear cost
600
Standard
Ward
Lightcut
Time (secs)
500
400
300
200
100
Tableau Scene
0
0
1000
2000
3000
4000
Number of Point Lights
3
SIGGRAPH 2005
Complex Lighting
LIGHTCUTS
• Simulate complex illumination using point lights
– Area lights
– HDR environment maps
– Sun & sky light
– Indirect illumination
• Unifies illumination
– Enables tradeoffs
between components
Area lights + Sun/sky + Indirect
4
SIGGRAPH 2005
Related Work
LIGHTCUTS
• Hierarchical techniques
– Hierarchical radiosity [eg, Hanrahan et al. 91, Smits et al. 94]
– Light hierarchy [Paquette et al. 98]
• Many lights
– [eg, Teller & Hanrahan 93, Ward 94, Shirley et al. 96, Fernandez et al. 2002,
Wald et al. 2003]
• Illumination coherence
– [eg, Kok & Jensen 92, Ward 92, Scheel et al. 2002, Krivanek et al. 2005]
• Env map illumination
– [Debevec 98, Agarwal et al. 2003, Kollig & Keller 2003, Ostromoukhov et al.
2004]
• Instant Radiosity
– [Keller 97, Wald et al. 2002]
5
SIGGRAPH 2005
Talk Overview
LIGHTCUTS
• Lightcuts
– Scalable accurate solution for complex illumination
• Reconstruction cuts
– Builds on lightcuts
– Use smart interpolation to further reduce cost
6
SIGGRAPH 2005
Lightcuts Problem
LIGHTCUTS
Visible
surface
7
SIGGRAPH 2005
Lightcuts Problem
LIGHTCUTS
8
SIGGRAPH 2005
Lightcuts Problem
LIGHTCUTS
Camera
9
SIGGRAPH 2005
Key Concepts
LIGHTCUTS
• Light Cluster
– Approximate many lights by a single brighter light
(the representative light)
10
SIGGRAPH 2005
Key Concepts
LIGHTCUTS
• Light Cluster
• Light Tree
– Binary tree of lights and clusters
Clusters
Individual
Lights
11
SIGGRAPH 2005
Key Concepts
LIGHTCUTS
• Light Cluster
• Light Tree
• A Cut
– A set of nodes that partitions the lights into clusters
12
SIGGRAPH 2005
Simple Example
LIGHTCUTS
Light Tree
#1 #2
#3
#4
Representative
Light
4
Clusters
1
1
4
2
3
4
Individual
Lights
13
SIGGRAPH 2005
Three Example Cuts
LIGHTCUTS
Three Cuts
#1 #2
#4
#1
#3 #4
4
4
2
#4
4
1
1
#1
3
4
1
4
1
4
2
3
1
4
1
4
2
3
4
14
SIGGRAPH 2005
Three Example Cuts
LIGHTCUTS
Three Cuts
#1 #2
#4
#1
#3 #4
4
4
2
#4
4
1
1
#1
3
Good
4
1
4
1
4
2
3
Bad
1
4
1
4
2
3
4
Bad
15
SIGGRAPH 2005
Three Example Cuts
LIGHTCUTS
Three Cuts
#1 #2
#4
#1
#3 #4
4
4
2
#4
4
1
1
#1
3
Bad
4
1
4
1
4
2
3
Good
1
4
1
4
2
3
4
Bad
16
SIGGRAPH 2005
Three Example Cuts
LIGHTCUTS
Three Cuts
#1 #2
#4
#1
#3 #4
4
4
2
#4
4
1
1
#1
3
Good
4
1
4
1
4
2
3
Good
1
4
1
4
2
3
4
Good
17
SIGGRAPH 2005
Algorithm Overview
LIGHTCUTS
• Pre-process
– Convert illumination to point lights
– Build light tree
• For each eye ray
– Choose a cut to approximate the illumination
18
SIGGRAPH 2005
Convert Illumination
LIGHTCUTS
• HDR environment map
– Apply captured light to scene
– Convert to directional point lights
using [Agarwal et al. 2003]
• Indirect Illumination
– Convert indirect to direct illumination
using Instant Radiosity [Keller 97]
• Caveats: no caustics, clamping, etc.
– More lights = more indirect detail
19
SIGGRAPH 2005
Algorithm Overview
LIGHTCUTS
• Pre-process
– Convert illumination to point lights
– Build light tree
• For each eye ray
– Choose a cut to approximate the local illumination
• Cost vs. accuracy
• Avoid visible transition artifacts
20
SIGGRAPH 2005
Perceptual Metric
LIGHTCUTS
• Weber’s Law
– Contrast visibility threshold is fixed percentage of signal
– Used 2% in our results
• Ensure each cluster’s error < visibility threshold
– Transitions will not be visible
– Used to select cut
21
SIGGRAPH 2005
Illumination Equation
result
=
S
lights
LIGHTCUTS
Mi Gi Vi Ii
Currently support diffuse, phong, and Ward
22
SIGGRAPH 2005
Illumination Equation
result
=
S
lights
LIGHTCUTS
Mi Gi Vi Ii
23
SIGGRAPH 2005
Illumination Equation
result
=
S
lights
LIGHTCUTS
Mi Gi Vi Ii
24
SIGGRAPH 2005
Cluster Approximation
result
~
~ Mj Gj Vj
LIGHTCUTS
S Ii
lights
j is the representative light
Cluster
25
SIGGRAPH 2005
Cluster Error Bound
error
LIGHTCUTS
<
- Mub Gub Vub
S Ii
lights
• Bound each term
– Visibility <= 1 (trivial)
Cluster
– Intensity is known
– Bound material and
geometric terms using
cluster bounding volume
ub == upper bound
26
SIGGRAPH 2005
Cut Selection Algorithm
LIGHTCUTS
• Start with coarse cut (eg, root node)
Cut
27
SIGGRAPH 2005
Cut Selection Algorithm
LIGHTCUTS
• Select cluster with largest error bound
Cut
28
SIGGRAPH 2005
Cut Selection Algorithm
LIGHTCUTS
• Refine if error bound > 2% of total
Cut
29
SIGGRAPH 2005
Cut Selection Algorithm
LIGHTCUTS
Cut
30
SIGGRAPH 2005
Cut Selection Algorithm
LIGHTCUTS
Cut
31
SIGGRAPH 2005
Cut Selection Algorithm
LIGHTCUTS
Cut
32
SIGGRAPH 2005
Cut Selection Algorithm
LIGHTCUTS
• Repeat until cut obeys 2% threshold
Cut
33
Lightcuts (128s)
Reference (1096s)
Kitchen, 388K polygons, 4608 lights (72 area sources)
Lightcuts (128s)
Reference (1096s)
Error
Error x16
Kitchen, 388K polygons, 4608 lights (72 area sources)
SIGGRAPH 2005
Combined Illumination
LIGHTCUTS
Lightcuts 128s
Lightcuts 290s
4 608 Lights
(Area lights only)
59 672 Lights
(Area + Sun/sky + Indirect)
36
SIGGRAPH 2005
Combined Illumination
LIGHTCUTS
Lightcuts 128s
Lightcuts 290s
4 608 Lights
(Area lights only)
59 672 Lights
(Area + Sun/sky + Indirect)
Avg. 259 shadow rays / pixel
Avg. 478 shadow rays / pixel
(only 54 to area lights)
37
SIGGRAPH 2005
Lightcuts Recap
LIGHTCUTS
• Unified illumination handling
• Scalable solution for many lights
– Locally adaptive representation (the cut)
• Analytic cluster error bounds
– Most important lights always sampled
• Perceptual visibility metric
Lightcuts implementation sketch, Petree Hall C, ~4:30pm
38
SIGGRAPH 2005
Talk Overview
LIGHTCUTS
• Lightcuts
– Scalable accurate solution for complex illumination
• Reconstruction cuts
– Builds on lightcuts
– Use smart interpolation to further reduce cost
39
SIGGRAPH 2005
Reconstruction Cuts
LIGHTCUTS
• Subdivide image into blocks
– Generate samples at corners
• Within blocks
– Interpolate smooth illumination
– Use shadow rays when needed to preserve features
• Shadow boundaries, glossy highlights, etc.
• Anti-aliasing
– (5-50 samples per pixel)
40
SIGGRAPH 2005
Image Subdivision
LIGHTCUTS
• Divide into max block size (4x4 blocks)
4x4 block
41
SIGGRAPH 2005
Image Subdivision
LIGHTCUTS
• Divide into max block size (4x4 blocks)
• Trace multiple eye rays per pixel
• Subdivide blocks if needed
– Based on material, surface normal,
and local shadowing configuration
42
SIGGRAPH 2005
Image Subdivision
LIGHTCUTS
• Divide into max block size (4x4 blocks)
• Trace multiple eye rays per pixel
• Subdivide blocks if needed
– Based on material, surface normal,
and local shadowing configuration
• Compute samples at corners
Samples
43
SIGGRAPH 2005
Image Subdivision
LIGHTCUTS
• Divide into max block size (4x4 blocks)
• Trace multiple eye rays per pixel
• Subdivide blocks if needed
– Based on material, surface normal,
and local shadowing configuration
• Compute samples at corners
• Shade eye rays using
reconstruction cuts
Samples
Reconstruction
cut
44
SIGGRAPH 2005
Sample Construction
LIGHTCUTS
• Compute a lightcut at each sample
• For each node on or above the cut
– Create impostor light (directional light)
– Reproduce cluster’s effect at sample
Cluster
Impostor
Directional light
45
SIGGRAPH 2005
Reconstruction Cut
LIGHTCUTS
• Top-down traversal of light tree
– Comparing impostors from nearby samples
Not visited
Recurse
Occluded
Interpolate
Shadow ray
46
SIGGRAPH 2005
Reconstruction Cut
LIGHTCUTS
• Recurse if samples differ significantly
Not visited
Recurse
Occluded
Interpolate
Shadow ray
47
SIGGRAPH 2005
Reconstruction Cut
LIGHTCUTS
• Discard if cluster occluded at all samples
Not visited
Recurse
Occluded
Interpolate
Shadow ray
48
SIGGRAPH 2005
Reconstruction Cut
LIGHTCUTS
Not visited
Recurse
Occluded
Interpolate
Shadow ray
49
SIGGRAPH 2005
Reconstruction Cut
LIGHTCUTS
Not visited
Recurse
Occluded
Interpolate
Shadow ray
50
SIGGRAPH 2005
Reconstruction Cut
LIGHTCUTS
• Interpolate if sample impostors are similar
Not visited
Recurse
Occluded
Interpolate
Shadow ray
51
SIGGRAPH 2005
Reconstruction Cut
LIGHTCUTS
• If cluster contribution small enough, shoot
shadow ray to representative light
– Lightcut-style evaluation
Not visited
Recurse
Occluded
Interpolate
Shadow ray
52
SIGGRAPH 2005
Reconstruction Cut
LIGHTCUTS
Not visited
Recurse
Occluded
Interpolate
Shadow ray
53
Temple, 2.1M polygons, 505 064 lights, (Sun/sky+Indirect)
Temple, reconstruction cut block size
SIGGRAPH 2005
Result Statistics
LIGHTCUTS
• Temple model (2.1M polys, 505 064 lights)
Cut type
Avg. shadow rays per cut
Lightcut
373
Reconstruction cut
Image algorithm
Lightcuts only
Combined (anti-aliased)
9.4
Avg. eye rays
per pixel
Image
time
1
225s
5.5
189s
56
Grand Central, 1.46M polygons, 143 464 lights, (Area+Sun/sky+Indirect)
Avg. shadow rays per eye ray 46 (0.03%)
Tableau, 630K polygons, 13 000 lights, (EnvMap+Indirect)
Avg. shadow rays per eye ray 17 (0.13%)
Bigscreen, 628K polygons, 639 528 lights, (Area+Indirect)
Avg. shadow rays per eye ray 17 (0.003%)
SIGGRAPH 2005
Conclusions
LIGHTCUTS
• Lightcuts
for complex illumination
– Analytic cluster error bounds
& perceptual visibility metric
Standard
Ward
Lightcut
500
Time (secs)
– Scalable, unified framework
600
400
300
200
100
0
0
1000
2000
3000
4000
Number of Point Lights
• Reconstruction cuts
– Exploits coherence
– High-resolution, anti-aliased images
60
SIGGRAPH 2005
Future Work
LIGHTCUTS
• Visibility bounds
• More light types
– Spot lights etc.
• More BRDF types
– Need cheap tight bounds
• Other illumination types
– Eg, caustics
61
SIGGRAPH 2005
Acknowledgements
LIGHTCUTS
• National Science Foundation grant ACI-0205438
• Intel corporation for support and equipment
• The modelers
– Kitchen: Jeremiah Fairbanks
– Bigscreen: Will Stokes
– Grand Central: Moreno Piccolotto, Yasemin Kologlu, Anne
Briggs, Dana Gettman
– Temple: Veronica Sundstedt, Patrick Ledda, and the graphics
group at University of Bristol
– Stanford and Georgia Tech for Buddha and Horse geometry
62
SIGGRAPH 2005
The End
LIGHTCUTS
• Questions?
Lightcuts implementation sketch, Petree Hall C, ~4:30pm
63
SIGGRAPH 2005
Scalable
LIGHTCUTS
• Scalable solution for many point lights
– Thousands to millions
– Sub-linear cost
Tableau Scene
Standard
Ward
Lightcut
500
Time (secs)
600
400
300
200
300
200
100
0
0
1000
Standard
Ward
Lightcuts
400
100
0
Kitchen Scene
500
Time (secs)
600
2000
3000
Number of Point Lights
4000
0
1000
2000
3000
4000
5000
Number of Point Lights
64
Reference
Lightcuts
Cut size
Error x 16
Kitchen, 388K polygons, 59,672 Lights
0
Kitchen, shadow ray false color
750
1500
0
750
1500
Tableau, shadow ray false color
Kitchen with sample locations marked
SIGGRAPH 2005
Types of Point Lights
LIGHTCUTS
• Omni
– Spherical lights
• Oriented
– Area lights, indirect lights
• Directional
– HDR env maps, sun&sky
70