light transport guiding product importance sampling forsungeui/icg/students... · [eurographics...

70
Product Importance Sampling for Light Transport Guiding presenter: Eunhyouk Shin Herholtz et al. 2016

Upload: others

Post on 16-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Product Importance Sampling for Light Transport Guiding

presenter: Eunhyouk Shin

Herholtz et al. 2016

Page 2: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

It is all about convergence

Page 3: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Contents- Review on importance sampling

- Light transport guiding techniques

- Gaussian Mixture Model & EM

- Process overview

- Results & Discussion

Page 4: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Source Materials

[EUROGRAPHICS 2016]

[SIGGRAPH 2014]

- Main paper for this presentation

- Baseline technology- Useful presentation slides from the authors

Page 5: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Importance Sampling

Page 6: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Rendering Equation

- Direct analytic integration is virtually impossible

- Recursive, due to the radiance term in the integrand

Page 7: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Monte Carlo Ray Tracing

- Random sample direction from hemisphere to cast ray recursively

- Unbiased, even if sampling is not uniform

Page 8: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Importance Sampling

- Lower variance when PDF is close to integrand distribution

- i.e. make more path that contributes more to radiance (light transport guiding)

- How can we make a good estimate for the integrand distribution?

- BRDF (given)

- Illumination (unknown)

∝Better to be...

Page 9: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Light Transport Guiding Techniques(slides from Vorba et al.)

Page 10: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Jensen [1995] photon

tracing

10

Page 11: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Jensen [1995] photon

tracingpath

tracing

11

Page 12: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Jensen [1995] photon

tracingpath

tracing

12

Page 13: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Jensen [1995] photon

tracingpath

tracing

13

Page 14: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

k-NN 14

Previous work• Jensen [1995]: reconstruction

Page 15: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

15

Previous work• Jensen [1995]: reconstruction

Page 16: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998]

pathtracing

photontracing

16

Page 17: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998]

pathtracing

photontracing

importontracing

17

Page 18: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998] PT

18

Page 19: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998] PT

19

Page 20: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998] PT

20

Page 21: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998] PT

21

Page 22: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998] PT

22

Page 23: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998] PT

23

Page 24: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Previous work• Peter and Pietrek [1998] PT

24

Page 25: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Limitations of previous work

25

• Bad approximation of in complex scenes

Page 26: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Limitations of previous work

26

Page 27: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Limitations of previous work

27

Page 28: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Limitations of previous workPT

28

Page 29: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Limitations of previous work

29

Not enough memory!

Page 30: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Solution: On-line Learning of Parametric Model- Shoot a batch of photons, then summarize into a parametric model

- GMM (Gaussian Mixture Model) is used

- Parametric model use less memory

- Forget previous photon batch and shoot new batch

- Keep updating parameters of the model: On-line learning

Page 31: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint

31

Page 32: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass

32

Page 33: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass

GMM

33

Page 34: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass

k-NN34

Page 35: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass

GMM

35

Page 36: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass

GMM

36

Page 37: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass

GMM

37

Page 38: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass 2nd pass

GMM

38

Page 39: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass

GMM

2nd pass

39

Page 40: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass 2nd pass 3rd pass …

40

GMM

Page 41: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Overcoming the memory constraint1st pass 2nd pass 3rd pass …

41

GMM

Page 42: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Gaussian Mixture Model

Page 43: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Gaussian Distribution (Normal Distribution)

Compact:just 6 float numbers for 2D

Page 44: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Gaussian Mixture Model (GMM)

Used to approximate PDF

Convex combination of Gaussians:

Page 45: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Expectation Maximization (EM) Algorithm- Popular algorithm that can be used for fitting GMM to scattered data points- Consists of 2 steps: E-step (expectation) and M-step (maximization)- Converge to local maximum of likelihood

Page 46: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

EM: How It Works

Page 47: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

EM: Expectation Step

Soft assignment using Bayes’ rule

- For each sample, compute soft assignment weight to clusters

Page 48: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

EM: Maximization Step

- Update each cluster parameters (mean, variance, weight) to fit the data assigned to it

Page 49: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

EM example

Page 50: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

EM example

Page 51: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

EM example

Page 52: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

On-line learning: Weighted Stepwise EM

- Use one sample for each step and extend to infinite stream of samples

- Use weighted samples (can be viewed as repeated samples)

- Fit to density of finite set of samples, compute sufficient statistics at once

Weighted stepwise EM: (variant used for this paper)

Original EM:

Page 53: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Process Overview

Page 54: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Process Overview1. Preprocessing

2. Training

3. Rendering

Page 55: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Process Overview1. Preprocessing

2. Training

3. Rendering

Page 56: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Process Overview1. Preprocessing

2. Training

3. Rendering

Page 57: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Process Overview1. Preprocessing

2. Training

3. Rendering

Page 58: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

1. Preprocessing- BRDF is approximated by GMM

- Cache GMM for each material, for each

(viewing) direction

BRDF:Given

Page 59: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

2. Training- Photon, importons guide each other in

alternating fashion

- On-line learning with weighted step-wise EM

- Cache the learnt illumination GMMs

Illumination: not known in advance

Page 60: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

2. Training

Page 61: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

3. Rendering- For intersection point, query the cached

BRDF, radiance GMM

- Product distribution is calculated

on-the-fly

- Sampling based on product distribution

How can we calculate efficiently?

Page 62: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Gaussian x Gaussian = Gaussian

- Extends to multi-dimensional Gaussian

X =

Page 63: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

( + … + ) x ( + … + )

GMM x GMM = GMM

BRDF: GMM of N components Illumination: GMM of M components

= ( + + … + + )Product distribution: GMM of M*N components

- Parameters for product GMM can be computed directly from original parameters

Page 64: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Reduction of GMM components

- For the sake of efficiency, merge similar components

Page 65: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Results & Discussion

Page 66: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Evaluation: 1 hour rendering

Page 67: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

ResultMultiple importance sampling instead of product dist. No GMM reduction

Page 68: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Result

Page 69: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Discussion- No memory issue indeed

- < 10MB for GMM cache in typical scene

- Fast convergence for complex glossy-glossy reflection scene- Where product sampling is important

- Not efficient for spatially varying BRDF- GMM is cached per material

- Possible extension using SVBRDF parameters

Page 70: Light Transport Guiding Product Importance Sampling forsungeui/ICG/Students... · [EUROGRAPHICS 2016] [SIGGRAPH 2014] - Main paper for this presentation - Baseline technology - Useful

Summary- In order to perform importance sampling, we estimate illumination based on particles

- In complex scenes, we need more particles for better estimation

- On-line learning of GMM by weighted stepwise EM, enables to generate particles

without causing memory issues.

- BRDF is also approximated as GMM so that we can use the product GMM as direct

approximation for the integrand of the rendering equation

- Fast convergence for complex, glossy scenes