adam goodenoughsampling: strategies and toolsapril 11, 2005 sampling: strategies and tools adam...
TRANSCRIPT
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Sampling:Strategies and Tools
Adam Goodenough
DIRSIG Meeting
April 11, 2005
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
• DIRSIG = Integration• Numerical integration is inefficient• Each sample can lead to many other
samples• Monte Carlo integration uses knowledge
of sample “importance”• Techniques are essential to photon
mapping• Applicable in many other areas
Introduction
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Derivation
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Outline• Monte Carlo integration
• Monte Carlo integration of an example “scene”
• DIRSIG Tool: CDSampleGen
• Samplers and Projections
• Arbitrary BRDF Representation and Sampling
• Future Applications
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Integration• Equation 4.31 in Schott (1997)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Monte Carlo• Monte Carlo integration for the same term
iii dd)sin(
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Sky Dome• Picture of the sky taken with a fisheye lens• Data taken from Conesus collect
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Parameterized• Sky dome unwrapped for easy sampling• Only the green band was acquired
• Parameterized as θ versus Φ
θ
Φ0
0 2π
½π
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Ward BRDF• Models specular lobe + diffuse • Anisotropic (brushed surfaces)• Parameters are “physical”• BRDF accuracy has been validated against
measurements
Lig
htly B
rush
edA
lum
inu
m
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Setup• Using sky dome and Ward BRDF• Viewer at 80o zenith and 45o azimuth• Calculate the numerical integral first• Calculate Monte Carlo integrals using different
sampling methods
View Direction
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Integral• Regular Numerical Integration
50 SamplesLout = 0.0629
200 SamplesLout = 0.0551
5000 SamplesLout = 0.0556
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Grid• Monte Carlo Integration with Grid sampling
0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0 10 20 30 40 50 60 70 80 90 100
Number of Samples
Ab
so
lute
Err
or
Power (Grid)
5000 SamplesLout = 0.0559Num: Lout = 0.0556
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Random• Monte Carlo Integration with Random sampling
0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0 10 20 30 40 50 60 70 80 90 100
Number of Samples
Ab
so
lute
Err
or
Power (Grid)
Power (Random)
5000 SamplesLout = 0.0553Num: Lout = 0.0556
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Shirley• Monte Carlo Integration with Shirley sampling
5000 SamplesLout = 0.0558Num: Lout = 0.0556
0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0 10 20 30 40 50 60 70 80 90 100
Number of Samples
Ab
so
lute
Err
or
Power (Grid)
Power (Random)
Power (Shirley)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Cosine• Integration with Cosine Weighted Sampling
5000 SamplesLout = 0.0561Num: Lout = 0.0556
0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0 10 20 30 40 50 60 70 80 90 100
Number of Samples
Ab
so
lute
Err
or
Power (Grid)
Power (Cosine-Weighted Grid)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Importance• Cosine and BRDF Weighted Sampling
5000 SamplesLout = 0.0550Num: Lout = 0.0556
0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0 10 20 30 40 50 60 70 80 90 100
Number of Samples
Ab
so
lute
Err
or
Power (Grid)
Power (BRDF-Weighted Grid)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
DIRSIG Tool• CDSampleGen
• None• Gaussian• Sphere• Hemisphere• Sphere
Section
• Grid• Random• N-Rooks• Stratified• Shirley• Halton• Hammersley
Samplers
• Cosine• Henyey-
Greenstein• Schlick• Ward BRDF• Factored
Geometry Weighted
Projections
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Samplers• Grid • Random
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Samplers• N-Rooks (Latin Hypercube)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Samplers• Stratified • Shirley
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Samplers• Halton “Sequence” (Quasi-Monte Carlo)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
• Set vs. Sequence• Hammersley Set
Samplers
• Sets are defined by “n” and “m” and yield nxm samples
• Sets are randomly shuffled
• All samplers work in either mode
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
• Quasi-Monte Carlo Samplers
Samplers
• Halton Sequence and Hammersley Set
• Deterministic
• Optimal uniformity and repeatability
• “Leaping” and “Scrambling”
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Projections• None • Gaussian
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Projections• Gaussian Revisited
PDF Random Shirley
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Projections• Sphere • Hemisphere
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Projections• Sphere Section
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Projections• Henyey-Greenstein SPF (N-Terms)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Projections• Schlick SPF (N-Terms)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Projections• Cosine • Ward BRDF
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Arbitrary BRDF• Synthetic or Modeled 4-D Measurements
Measurements
Factorization
Re-Creation
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Components• Re-Parameterization • Non-Negative Matrix
Factorization• Most BRDFs consist of
diffuse and specular components
• Variability exists primarily around specular direction
• Re-Parameterize into Half-Angle space
• Factor Y into two matrices F and G
• F and G are non-negative• Iterative algorithm• Gradient descent• Rate of descent picked to
ensure monotonically decreasing RSE or distortion
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Approach• Re-Parameterization and Factorization From Lawrence et al. (2004)
Re-Shuffling
Re-Parameterizing Re-Shuffling and NMF
NMF
G
F
G
uv
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Example• Significance of u and v From Lawrence et al. (2004)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Compression• Large data sets represented by few terms• Better accuracy than general basis functions
(Zernike, Spherical Harmonics, LaFortune Lobes)• Compression ratios of ~200:1 shown for
measured data (measurements performed by Matusik [2003])
From Lawrence et al. (2004)
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Sampling• Compression rates are sub-optimal!• Factorization form maintains each sampling
variable (incident direction) independently• Factored forms are used directly to sample• F- matrix maintains view direction indexing• G (u and v) contains incident direction PDFs
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Future Apps• Standard for storing BRDF measurements• Addition of a spectral dimension• Storage of modeled, spectral phase
function data
Adam GoodenoughSampling: Strategies and ToolsApril 11, 2005
Questions