Presentation is loading. Please wait.

Presentation is loading. Please wait.

Metropolis Light Transit

Similar presentations


Presentation on theme: "Metropolis Light Transit"— Presentation transcript:

1 Metropolis Light Transit
By Dan Halstead

2 For GLOBAL ILLUMINATION to happen
NEED: The ability to sample light transport paths.

3 For GLOBAL ILLUMINATION to happen
NEED: The ability to sample light transport paths. PROBLEM: Many of the paths are unimportant.

4 For GLOBAL ILLUMINATION to happen
Some previous solutions are: Find information to guide the path finder. Bidirectional path tracing

5 Overview of MLT The Basic Idea:
Sample complete paths according to their contribution to the image by a random walk through path space.

6 Overview of MLT The Setup: Let X be a path.

7 Overview of MLT The Setup: Let X be a path.
Let f(X) be the image contribution function.

8 Overview of MLT The Setup: Let X be a path.
Let f(X) be the image contribution function. Then we want to sample paths by picking them randomly so that their distribution p is proportional to f.

9 Overview of MLT There are two reasons for this:
We want more detail in brighter areas. The value of a pixel will then be proportional to the number of times it was sampled in a path.

10 Formulating the Problem
The light transport equation: x’’ b (x, x’, x’’) G (x, x’) G (x’, x’’) x x’

11 Formulating the Problem
The light transport equation: The measurement equation: W (x, x’) G (x, x’) x x’

12 Formulating the Problem
The light transport equation: Expanding the measurement equation: G (x0, x1) x1 x0 W (x0, x1)

13 Formulating the Problem
The light transport equation: Expanding the measurement equation: W (x1, x2) b (x0, x1, x2) G (x0, x1) G (x1, x2) x1 x2 x0

14 Formulating the Problem
The light transport equation: Expanding the measurement equation:

15 Formulating the Problem
Expanding the measurement equation: This can be simplified to:

16 Formulating the Problem
From this simplified form, we can derive a way to estimate mj from a sequence of N paths that are chosen randomly according to a distribution p:

17 Formulating the Problem
Now, define B to be the normalization constant: And suppose that p = ( 1 / B ) f. Then:

18 Overview of MLT In order to sample paths, MLT uses a random walk through the space of possible paths.

19 Overview of MLT In order to sample paths, MLT uses a random walk through the space of possible paths. MLT will choose a new path Xi by performing a random mutation on Xi-1.

20 Overview of MLT In order to sample paths, MLT uses a random walk through the space of possible paths. MLT will choose a new path Xi by performing a random mutation on Xi-1. New paths can be rejected!

21 Overview of MLT Lastly, upon choosing each new path, MLT will update the appropriate image pixel(s).

22 Transitions How can this mutation thing possibly work??

23 Transitions Example: Suppose you have an n x n grid.

24 Transitions Example: Suppose you have an n x n grid.

25 Transitions On each transition step, you can remain still or move to an adjacent square.

26 Transitions K(Y|X) = 1 / 5.

27 Transitions

28 Transitions p0

29 Transitions p1

30 Transitions p2

31 Transitions pi(X)  1 / n2 for all x

32 Transitions We want to find K such that:
The system will converge to f. It will converge as fast as possible.

33 Transitions It will help to break K up into two functions:
K(Y|X) = T(Y|X) a(Y|X) T is the probability of mutating path x into y. a is the probability of this mutation being accepted.

34 f(X) T(Y|X) a(Y|X) = f(Y) T(X|Y) a(X|Y)
Acceptance To derive the formula for a, note that in equilibrium the transition density from x to y will be the same as that from y to x: f(X) T(Y|X) a(Y|X) = f(Y) T(X|Y) a(X|Y)

35 Acceptance To verify this:

36 Acceptance Also, we want to maximize a.
(This will make the system mutate faster and therefore converge faster.)

37 Acceptance Given an arbitrary T then, we can derive from these two conditions that:

38 Mutations Mutations should aim to do these things:
Don’t make changes that are too small

39  Mutations Mutations should aim to do these things:
Don’t make changes that are too small Don’t get stuck

40 Mutations Mutations should aim to do these things:
Don’t make changes that are too small Don’t get stuck Support stratification

41 Mutations Mutations should aim to do these things:
Don’t make changes that are too small Don’t get stuck Support stratification Have low cost

42 Mutations Three mutations that satisfy all these goals:
Bidirectional mutations Perturbations Lens subpath mutations

43 Bidirectional Mutations
Are the foundation of the MLT algorithm.

44 Bidirectional Mutations
Are the foundation of the MLT algorithm. Consist of randomly removing some subpath, and recasting it with a random number of vertices.

45 Bidirectional Mutations
Are the foundation of the MLT algorithm. Consist of randomly removing some subpath, and recasting it with a random number of vertices. Are responsible for making the large changes.

46 Bidirectional Mutations
Given a path X = x0 x1 … xk Choose a random subpath to delete. Add random numbers of new vertices to the new interior endpoints of X. Try to connect up the two innermost vertices. Test for acceptance of the new path.

47 Bidirectional Mutations
Choose a random subpath to delete. Weight the probability so that smaller subpaths are chosen more frequently.

48 Bidirectional Mutations
Choose a random subpath to delete. Example: x1 x0 x2

49 Bidirectional Mutations
Add random numbers of new vertices. Choose how many to add from a distribution centered around the old number.

50 Bidirectional Mutations
Add random numbers of new vertices. Then choose where to put the break (i.e. how many of those to add to the end of the first segment vs. the beginning of the last segment).

51 Bidirectional Mutations
Add random numbers of new vertices. Add each vertex by sampling a direction according to the BRDF, and then casting a ray.

52 Bidirectional Mutations
Add random numbers of new vertices. Example: Chose to add 2 vertices, with the break between them. x0 x2

53 Bidirectional Mutations
Try to connect up the two innermost vertices. Test if there is visibility between the two new endpoints. (If the path is obstructed, reject the mutation.)

54 Bidirectional Mutations
Try to connect up the two innermost vertices. Example: x1 x0 x3 x2

55 Bidirectional Mutations
Test for acceptance of the new path. Use Note that much of this can be pre-computed. Also, much of it can be cancelled out, since X and Y will likely share some vertices.

56 Perturbations Are needed when bidirectional mutations will nearly always be rejected. (e.g. When there are small regions of the path space in which paths contribute much more than average.)

57 Perturbations Are needed when bidirectional mutations will nearly always be rejected. (e.g. When there are small regions of the path space in which paths contribute much more than average.) Smaller mutations keep them within the high contribution region

58 Perturbations Move the pixel location (i.e. the path’s endpoint) by a random distance (chosen to have highest probability between two pre-selected values) in a random direction.

59 Perturbations Move the pixel location (i.e. the path’s endpoint) by a random distance (chosen to have highest probability between two pre-selected values) in a random direction. Recast rays through all the specular bounces so that it retains the same length.

60 Perturbations Example: x1 x0 x2

61 Lens subpath mutations
Designed to enhance stratification (i.e. to prevent bias in one area of the image plane).

62 Lens subpath mutations
Designed to enhance stratification (i.e. to prevent bias in one area of the image plane). Occasionally force the algorithm to choose a new pixel location, and not one that was chosen too many times before.

63 Optimizations Run several copies of the algorithm in parallel.
Helps to remove startup bias. Helps to test for convergence.

64 Optimizations Ignore the first several path samples.
Helps to remove startup bias.

65 Optimizations Don’t bother with MLT for the direct lighting in an image. Standard techniques for direct lighting usually provide better quality at lower cost. This way MLT can devote more effort to the indirect lighting.

66 Optimizations Do variance reduction on a.
Instead of randomly accepting or rejecting a sample, accept exactly a copies of it.

67 Bidirectional path tracing

68 Metropolis Light Transit

69

70 Bidirectional path tracing

71 Metropolis Light Transit


Download ppt "Metropolis Light Transit"

Similar presentations


Ads by Google