adam goodenoughsampling: strategies and toolsapril 11, 2005 sampling: strategies and tools adam...

38
Adam Goodenough Sampling: Strategies and Tools April 11, 2005 Sampling: Strategies and Tools Adam Goodenough DIRSIG Meeting April 11, 2005

Upload: augustus-elliott

Post on 26-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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

Sampling:Strategies and Tools

Adam Goodenough

DIRSIG Meeting

April 11, 2005

Page 2: 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

Page 3: 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

Derivation

Page 4: 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

Outline• Monte Carlo integration

• Monte Carlo integration of an example “scene”

• DIRSIG Tool: CDSampleGen

• Samplers and Projections

• Arbitrary BRDF Representation and Sampling

• Future Applications

Page 5: 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

Integration• Equation 4.31 in Schott (1997)

Page 6: 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

Monte Carlo• Monte Carlo integration for the same term

iii dd)sin(

Page 7: 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

Sky Dome• Picture of the sky taken with a fisheye lens• Data taken from Conesus collect

Page 8: 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

Parameterized• Sky dome unwrapped for easy sampling• Only the green band was acquired

• Parameterized as θ versus Φ

θ

Φ0

0 2π

½π

Page 9: 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

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

Page 10: 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

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

Page 11: 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

Integral• Regular Numerical Integration

50 SamplesLout = 0.0629

200 SamplesLout = 0.0551

5000 SamplesLout = 0.0556

Page 12: 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

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

Page 13: 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

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

Page 14: 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

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)

Page 15: 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

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)

Page 16: 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

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)

Page 17: 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 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

Page 18: 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

Samplers• Grid • Random

Page 19: 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

Samplers• N-Rooks (Latin Hypercube)

Page 20: 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

Samplers• Stratified • Shirley

Page 21: 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

Samplers• Halton “Sequence” (Quasi-Monte Carlo)

Page 22: 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

• 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

Page 23: 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

• Quasi-Monte Carlo Samplers

Samplers

• Halton Sequence and Hammersley Set

• Deterministic

• Optimal uniformity and repeatability

• “Leaping” and “Scrambling”

Page 24: 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

Projections• None • Gaussian

Page 25: 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

Projections• Gaussian Revisited

PDF Random Shirley

Page 26: 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

Projections• Sphere • Hemisphere

Page 27: 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

Projections• Sphere Section

Page 28: 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

Projections• Henyey-Greenstein SPF (N-Terms)

Page 29: 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

Projections• Schlick SPF (N-Terms)

Page 30: 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

Projections• Cosine • Ward BRDF

Page 31: 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

Arbitrary BRDF• Synthetic or Modeled 4-D Measurements

Measurements

Factorization

Re-Creation

Page 32: 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

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

Page 33: 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

Approach• Re-Parameterization and Factorization From Lawrence et al. (2004)

Re-Shuffling

Re-Parameterizing Re-Shuffling and NMF

NMF

G

F

G

uv

Page 34: 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

Example• Significance of u and v From Lawrence et al. (2004)

Page 35: 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

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)

Page 36: 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

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

Page 37: 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

Future Apps• Standard for storing BRDF measurements• Addition of a spectral dimension• Storage of modeled, spectral phase

function data

Page 38: 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

Questions