FOURIER ANALYSIS OF NUMERICAL INTEGRATION IN MONTE CARLO RENDERING - - PowerPoint PPT Presentation

fourier analysis of numerical integration in monte carlo
SMART_READER_LITE
LIVE PREVIEW

FOURIER ANALYSIS OF NUMERICAL INTEGRATION IN MONTE CARLO RENDERING - - PowerPoint PPT Presentation

FOURIER ANALYSIS OF NUMERICAL INTEGRATION IN MONTE CARLO RENDERING Kartic Subr Gurprit Singh Wojciech Jarosz Heriot Watt University, Edinburgh Dartmouth College Dartmouth College Motivation for


slide-1
SLIDE 1

FOURIER ANALYSIS OF NUMERICAL INTEGRATION IN MONTE CARLO RENDERING

Kartic Subr Gurprit Singh Wojciech Jarosz

Heriot Watt University, Edinburgh Dartmouth College Dartmouth College

slide-2
SLIDE 2

Motivation for analysis

  • assess, compare existing methods for Monte Carlo rendering
  • provide insight, inspire improvement
slide-3
SLIDE 3

[Subr et al 2014]

slide-4
SLIDE 4

Error vs cost plots of rendering methods

method 1 method 2 method 3 method 4 [Subr et al 2014]

slide-5
SLIDE 5

Error vs cost plots of rendering methods

method 1 method 2 method 3 method 4 [Subr et al 2014] method 4 is best method 4 is worst

slide-6
SLIDE 6

Error vs cost plots of rendering methods

method 1 method 2 method 3 method 4 [Subr et al 2014] method 4 is worst method 4 is best

slide-7
SLIDE 7

Course structure

Preliminaries Sampling Formal treatment

30m 30m 20m

slide-8
SLIDE 8

OpenGL

[Stachowiak 2010]

Raytracing

[Whitted 1980]

Rendering = geometry + radiometry

camera obscura

geometry/projection for pin-hole model known since 400BC radiometrically accurate simulation is important for photorealism

[photo credit: videomaker.com June 2015]

slide-9
SLIDE 9

Rendering = geometry + radiometry

geometry/projection for pin-hole model known since 400BC radiometrically accurate simulation is important for photorealism

[photo credit: videomaker.com June 2015]

OpenGL

[Stachowiak 2010]

Raytracing

[Whitted 1980]

slide-10
SLIDE 10

Radiometric fidelity improves photorealism

Pedro Campos

manually painted photograph

Colourbox.com

computer generated

slide-11
SLIDE 11

Simulating the physics of light is challenging

lenses defocus materials light, media exposure time

slide-12
SLIDE 12

Light transport

12

Image ? virtual light emitter virtual camera virtual scene: geometry + materials exitant radiance estimate incident radiance at all pixels

  • n the virtual sensor

W m2 Sr

slide-13
SLIDE 13

Each reflection is modeled by an integration

13

radiance:

slide-14
SLIDE 14

14

radiance:

Each reflection is modeled by an integration

slide-15
SLIDE 15

Each reflection is modeled by an integration

15

radiance:

slide-16
SLIDE 16

Recursive integrals

16

Image ? virtual light emitter virtual camera

slide-17
SLIDE 17

Recursive integrals

17

Image ? virtual light emitter virtual camera

slide-18
SLIDE 18

Light transport: recursive integral equation

18

radiance integral operator emitted radiance

Light Transport Operators [Arvo 94] The Rendering equation [Kajiya 86]

slide-19
SLIDE 19

L is a sum of high-dimensional integrals

19

One bounce Three bounces radiance integral operator emitted radiance

slide-20
SLIDE 20

Reconstruction and integration in rendering

slide-21
SLIDE 21

Reconstruction: estimate image samples

X Y X Y ground truth (high-res) image reconstruct on (low-res) pixel grid

slide-22
SLIDE 22

Naïve method: sample image at grid locations

X Y X Y reconstruct on (low-res) pixel grid ground truth (high-res) image

sampling

copy

slide-23
SLIDE 23

Naïve method: when sampling is increased

X Y X Y ground truth (high-res) image reconstruct on (low-res) pixel grid

aliasing

slide-24
SLIDE 24

Antialiasing: assuming `square’ pixels

X Y X Y multi-sampling average

slide-25
SLIDE 25

Antialiasing is costly due to multi-sampling

X Y X Y

slide-26
SLIDE 26

Antialiasing using general reconstruction filter

X Y X Y multi-sampling

weighted average

slide-27
SLIDE 27

Rendering: Reconstructing integrals

multi-sampling for reconstruction deterministic

slide-28
SLIDE 28

Rendering: Reconstructing integrals

multi-sampling for reconstruction multi-path sampling for integration estimate per sampled pixel

path 1 path 2 path 3

estimate (probabilistic for Monte Carlo)

slide-29
SLIDE 29

Function-space view: Sampling in path space

29

n-dimensional path space

light camera light paths

each sample represents a path and has an associated radiance value

slide-30
SLIDE 30

Sample locations shown in path-pixel space

30

n-dimensional path space pixels on sensor

slide-31
SLIDE 31

31

n-dimensional path space pixels on sensor path-space integration (projection) pixels on sensor reconstruction using integrated radiance pixel value (radiance)

Rendering = integration + reconstruction

slide-32
SLIDE 32

Frequency analysis of lightfields in rendering

n-dimensional path space pixels on sensor path-space integration (projection) pixels on sensor integrated radiance pixel value (radiance) local variation/ anisotropy? use in regression/reconstruction local variation of integrand reconstruction filter [Ramamoorthi et al. 04] [Durand et al. 05] [Soler et al. 2009] [Overbeck et al. 2009] [Egan et al. 2009, 2011] [Ramamoorthi et al. 2012]

slide-33
SLIDE 33
  • Freq. analysis of MC sampling: This course!

n-dimensional path space local variation/ anisotropy? pixels on sensor [Durand 2011] [Ramamoorthi et al. 12] [Subr and Kautz 2013] [Pilleboue et al. 2015]

Assessing MSE, bias, variance and convergence

  • f Monte Carlo estimators as a function of the

Fourier spectrum of the sampling function.

slide-34
SLIDE 34
  • Freq. analysis of MC sampling: This course!

n-dimensional path space [Durand 2011] [Ramamoorthi et al. 12] [Subr and Kautz 2013] [Pilleboue et al. 2015]

Assessing MSE, bias, variance and convergence

  • f Monte Carlo estimators as a function of the

Fourier spectrum of the sampling function.

slide-35
SLIDE 35
  • Freq. analysis of MC sampling: This course!

n-dimensional path space local variation/ anisotropy?

Assessing MSE, bias, variance and convergence

  • f Monte Carlo estimators as a function of the

Fourier spectrum of the sampling function.

[Durand 2011] [Ramamoorthi et al. 12] [Subr and Kautz 2013] [Pilleboue et al. 2015]

slide-36
SLIDE 36
  • Freq. analysis of MC sampling: This course!

n-dimensional path space

Assessing MSE, bias, variance and convergence

  • f Monte Carlo estimators as a function of the

Fourier spectrum of the sampling function.

[Durand 2011] [Ramamoorthi et al. 12] [Subr and Kautz 2013] [Pilleboue et al. 2015]

slide-37
SLIDE 37
  • Freq. analysis of MC sampling: This course!

n-dimensional path space local variation/ anisotropy?

Assessing MSE, bias, variance and convergence

  • f Monte Carlo estimators as a function of the

Fourier spectrum of the sampling function.

[Durand 2011] [Ramamoorthi et al. 12] [Subr and Kautz 2013] [Pilleboue et al. 2015]

slide-38
SLIDE 38

Rendering = integration + reconstruction

Shiny ball, out of focus Shiny ball in motion … image location multi-dim integral Domain: shutter time x aperture area x 1st bounce x 2nd bounce Integrand: radiance (W m-2 Sr-1) … …

38

slide-39
SLIDE 39

Th The prob

  • ble

lem in in 1D

39

slide-40
SLIDE 40

the sampling funct ction

integrand sampling function sampled integrand multiply

40

slide-41
SLIDE 41

sampling funct ction deci cides integration qua quality ty

integrand sampled function multiply sampling function

41

slide-42
SLIDE 42

st strategies to improve est stimators

  • 1. modify weights
  • 2. modify locations
  • eg. quadrature rules, importance sampling, jittered sampling, etc.

42

slide-43
SLIDE 43

in insig ight t in into im impac act: t: Fourier ier domain ain

  • 1. modify weights
  • 2. modify locations

analyse sampling function in Fourier domain

43

slide-44
SLIDE 44

Fourier analysis: origin and intuition

  • Eigenfunction of the differential operator
  • Turns differential equations into algebraic equations

scaling

slide-45
SLIDE 45

Fourier analysis: origin and intuition

  • Eigenfunction of the differential operator
  • Turns differential equations into algebraic equations
  • if

scaling projection

slide-46
SLIDE 46

The Fourier domain

Image credit: Wikipedia

slide-47
SLIDE 47

The continuous Fourier transform

primal (space, time, etc.) domain Fourier domain

slide-48
SLIDE 48

The Fourier transform: `frequency’ domain

projection onto sin and cos frequency frequency domain

slide-49
SLIDE 49

A single sample:

frequency amplitude = 1 phase

slide-50
SLIDE 50

Fourier series: replace integral with sum

approximating a square wave using 4 sinusoids

slide-51
SLIDE 51

frequency

amplitude (sampling spectrum) phase (sampling spectrum) 51

Fourier spectrum of the sampling function

sampling function

slide-52
SLIDE 52

sa sampling g fu function = = su sum of f Dirac deltas

+ + +

slide-53
SLIDE 53

In In th the e Fourier ier domain ain …

primal Fourier Dirac delta Fourier transform Frequency Real Imaginary Complex plane amplitude phase

slide-54
SLIDE 54

Re Review: in the Fourier domain …

primal Fourier Dirac delta Fourier transform Frequency Real Imaginary Complex plane Real Imaginary Complex plane

slide-55
SLIDE 55

am amplitu litude e spec ectr trum is is not t fla lat

= + + + primal Fourier = + + + Fourier transform

slide-56
SLIDE 56

sa sample contributions s at a gi given fr frequency

Real Imaginary Complex plane 5 1 2 3 4 5 At a given frequency 3 2 4 1 sampling function

slide-57
SLIDE 57

th the e sam amplin ling spec ectr trum at t a a giv iven en freq equen ency

sampling spectrum Complex plane 5 3 2 4 1 centroid given frequency

slide-58
SLIDE 58

th the e sam amplin ling spec ectr trum at t a a giv iven en freq equen ency

sampling spectrum realizations expected centroid centroid variance given frequency

slide-59
SLIDE 59

ex expected sampling spectrum and va variance

expected amplitude of sampling spectrum variance of sampling spectrum frequency DC

slide-60
SLIDE 60
  • 1. modify weights
  • a. Distribution eg. importance sampling)
  • 2. modify locations
  • eg. quadrature rules

sampling function in the Fourier domain

frequency

amplitude (sampling spectrum) phase (sampling spectrum) 60

Ab Abstracting ng sa sampl pling ng strategy gy usi using ng spe spectra

slide-61
SLIDE 61

stoch chastic c sampling & instance ces of spect ctra

Sampler (Strategy 1)

Fourier transform

draw realizations of sampling functions realizations of sampling spectra

61

slide-62
SLIDE 62

assessing estimators using sampling spect ctra

Sampler (Strategy 1) Sampler (Strategy 2)

Instances of sampling functions Instances of sampling spectra

Which strategy is better? Metric? 62

slide-63
SLIDE 63

accu ccuracy cy (bias) and preci cision (variance ce)

estimated value (bins) frequency reference Estimator 2 Estimator 1

Estimator 2 is unbiased but has higher variance 63

slide-64
SLIDE 64

Va Variance and bias

High variance High bias

predict as a function of sampling strategy and integrand 64

slide-65
SLIDE 65

Monte Carlo integration: summary and error

  • Error
  • MSE, bias, variance
  • convergence rate: error as N is increased
slide-66
SLIDE 66

Bird’s-eye view of analysis

  • Rewrite MC estimator in terms of sampling function

where

slide-67
SLIDE 67

Bird’s-eye view of analysis

  • Rewrite MC estimator in terms of sampling function
  • Fourier transform preserves inner products, so

where

slide-68
SLIDE 68

Bird’s-eye view of analysis

  • Rewrite MC estimator in terms of sampling function
  • Fourier transform preserves inner products, so
  • Analyse MSE error, bias and convergence in terms of

where

slide-69
SLIDE 69

Summary

slide-70
SLIDE 70

Summary

light transport & integration high-dimensional sampling sampling function & spectrum

f S

average

error prediction

slide-71
SLIDE 71

Next

light transport & integration high-dimensional sampling sampling function & spectrum

f S

average

error prediction Gurprit Wojciech

slide-72
SLIDE 72

Local variation is useful for adaptive sampling

72 n-dimensional path space pixels on sensor path-space integration (projection) pixels on sensor integrated radiance pixel value (radiance) local variation/ anisotropy? use in regression/reconstruction