Metropolis Light Transport

31
Metropolis Light Transport Eric Veach Leonidas J. Guibas Computer Science Department Stanford University.

description

Metropolis Light Transport. Eric Veach Leonidas J. Guibas Computer Science Department Stanford University. Outline. Prerequisite Overview Initial Path Mutation Result. Markov chain. Markov chain : A stochastic process with Markov property. - PowerPoint PPT Presentation

Transcript of Metropolis Light Transport

Page 1: Metropolis Light Transport

Metropolis Light Transport

Eric VeachLeonidas J. Guibas

Computer Science Department Stanford University.

Page 2: Metropolis Light Transport

Outline

• Prerequisite

• Overview

• Initial Path

• Mutation

• Result

Page 3: Metropolis Light Transport

Markov chain

• Markov chain :– A stochastic process with Markov property.

)|(),...,,,|( 12101 nnnn XxXPXXXXxXP

The range of random variable X is called the state space.

)|( 1 nn XXP is called the transition probability. (one step)

Page 4: Metropolis Light Transport

Markov chain

How about two or three steps?

11121122 )|()|()|,()|( nnnnnnnnnnn dXXXPXXPdXXXXPXXP

21112233 )|()|()|()|( nnnnnnnnnn dXdXXXPXXPXXPXXP

nnnnn dXXPXXPXP )()|()( 11

Distribution over states at time n+1

Page 5: Metropolis Light Transport

Markov chain

• Stationary distribution (steady-state distribution):

dYYYXPX )()|()(

Page 6: Metropolis Light Transport

Markov chain

• Ergodic theory:– If we take stationary distribution as initial

distribution...the average of function f over samples of Markov chain is :

1

0

)()()(1

limn

k dXXXfXfn

Page 7: Metropolis Light Transport

Markov chain

• If the state space is finite...transition probability can be represented as a transition matrix P.

)|( 1 iXjXPP nnij

Page 8: Metropolis Light Transport

OverviewRendering equation

Measurement equation

Expand L by rendering equation

Page 9: Metropolis Light Transport

Overview

)()( xdxfm jj

)()...()...( 00 kkk xdAxdAxxd

1

)()(k

kk DD kk

1

fj μ

Page 10: Metropolis Light Transport

Overview

• f : the energy of all image plane.

• fj : the energy of pixel j.

)()()( xfxwxf jj

We can think wj restricted f to the pixel j.

Page 11: Metropolis Light Transport

Overview

)()( xdxfm jj

Now, we want to solve the integration :

N

i i

iijj

Xp

XfXw

NEm

1 )(

)()(1

Page 12: Metropolis Light Transport

Overview

• As the Monte-Carlo Method, we want the probability distribution p proportional to f.

)()()|()( 1 ydypyxKxp ii

)()()|()( ydypyxKxp

converge

The same idea ..in this paper, we want stationary distributionProportional to f.

K is transition function

Page 13: Metropolis Light Transport

Overview

• If we let

)|()|()|( xyaxyTxyK

And we prefer the stationary distribution propose to f

)|()|()()|()|()(

)|()()|()(

)|()()|()(

yxayxTyfxyaxyTxf

yxKycpxyKxcp

yxKypxyKxp

Mutation determine T(y|x). If we determine a mutation, we mustCalculate a(y|x) to satisfy this equation!

Page 14: Metropolis Light Transport

Overview

In this paper, based on bidirectional ray tracing

Based on three strategies, decide T(y|x)

Computed by T(y|x)

Page 15: Metropolis Light Transport

Initial Path

In this paper, based on bidirectional ray tracing

Based on three strategies, decide T(y|x)

Computed by T(y|x)

Page 16: Metropolis Light Transport

Initial Path

• How to choose Initial Path? (Have a good start!)– Run n copies of the algorithm and accumulate all

samples into one imege.

– Sample n paths :

– Resample form the n paths to obtain relative small number n’ paths.

– If n’ = 1, then just take the mean value.

0

)(

0

)1(,...,XX

n

Page 17: Metropolis Light Transport

Mutation

In this paper, based on bidirectional ray tracing

Based on three strategies, decide T(y|x)

Computed by T(y|x)

Page 18: Metropolis Light Transport

Properties of good mutations

• High acceptance probability.– Prevent the path sequence x, x, x, x, x, x, …

• Large changes to the path.– Prevent path sequence with high correration

• Ergodicity.– Ensure random walk converge to an ergodic

state.

Page 19: Metropolis Light Transport

Properties of good mutations

• Changes to the image location.– Minimize correlation between image plane.

• Stratification.– Uniform distribute on image plane.

• Low cost.– As the word says..

Page 20: Metropolis Light Transport

Mutation

• In this paper, three Mutation strategies is presented…– Bidirectional mutations

– Perturbations

– Lens subpath perturbations

• Each mutation decide T(Y|X), we must take a(Y|X) to satisfy :

)|()|()()|()|()( yxayxTyfxyaxyTxf

Roughly, when we use a mutation generate a new path, we can compute T(y|x), then we decide a(y|x). According to a(y|x), we rejector accept the new path.

Page 21: Metropolis Light Transport

Bidirectional mutation

ko xxx ...

],[ tspd

If we initially have a path :

x0 x1 x2 x3

For k = 3:

]','[ tspa

probability to delete path from s to t

Probability to add new path of length s’, t’ to vertex s, t.

Pd(1,2)

x0 x1 x2 x3

x0 x1 x2 x3

Pa(1,0)

z

Page 22: Metropolis Light Transport

Bidirectional mutation

)|(

)()|( where

)|(

)|()|(

xyT

yfxyR

yxR

xyRxya

)|()|()()|()|()( yxayxTyfxyaxyTxf

We want a(y|x) satisfy:

Page 23: Metropolis Light Transport

Compute R(y|x),R(x|y)

z to xfrom sampling ofdensity y probabilit :)( 110 zxxps

z sampling ofdensity y probabilit:)()( 110 zxGzxxps

),,(),(),,(),(),,()( 322210110 xxzfxzGxzxfzxGzxxfyf sss

x0 x1 x2 x3z

),(),,(]1,0[),(),,(]0,1[]2,1[)|( 223110 zxGzxxppzxGzxxpppxyT sasad

y:x0 x1 x2 x3

x:

For compute R(y|x):

]0,0[]3,1[/),,(),(),,( 32121210 adss ppxxxfxxGxxxf

For R(x|y):

Page 24: Metropolis Light Transport

Perturbations

ko xxx ...If we initially have a path :

x0 x1 x2 x3

For k = 3:

x0 x1 x2 x3

Choose a subpath and move the vertices slightly.In the case above, the subpath is x1-x3.

Main interest perturbations is subpath consist xk-1 - xk

Page 25: Metropolis Light Transport

Perturbations

• Perturbations has two type:– Lens perturbations.

• Handle (L|D)DS*E

– Caustic perturbations.• Handle (L|D)S*DE

Page 26: Metropolis Light Transport

Perturbations

• How about (L|D)DS*DS*DE?

Page 27: Metropolis Light Transport

Lens subpath mutations

• Substitute len subpath (xt,…,xk) to another one to achieve the goal of Stratification (L|D)S*E.

– Initialize by n’ initial path seeds . Then store the current lens subpath xe. At most reuse xe a fix number ne times.

– We sequentially mutate n’ initial path seeds.

– Generate new len subpath by case a ray through a point on image plane , follows zero or more specular bounce until a non-specular vertex.

Page 28: Metropolis Light Transport

Result

Page 29: Metropolis Light Transport

Result

Page 30: Metropolis Light Transport

Result

Page 31: Metropolis Light Transport

Result