Monte Carol Integration Sung-Eui Yoon ( ) ( ) C Course URL: URL - - PowerPoint PPT Presentation

monte carol integration
SMART_READER_LITE
LIVE PREVIEW

Monte Carol Integration Sung-Eui Yoon ( ) ( ) C Course URL: URL - - PowerPoint PPT Presentation

CS680: CS680: Monte Carol Integration Sung-Eui Yoon ( ) ( ) C Course URL: URL http://jupiter.kaist.ac.kr/~sungeui/SGA/ Course Administration Course Administration Due is this Thur. HW HW 2 Rendering


slide-1
SLIDE 1

CS680: CS680:

Monte Carol Integration

Sung-Eui Yoon (윤성의) (윤성의)

C URL Course URL: http://jupiter.kaist.ac.kr/~sungeui/SGA/

slide-2
SLIDE 2

Course Administration Course Administration

HW

  • HW
  • Due is this Thur.

2

slide-3
SLIDE 3

Previous Time Previous Time

Radiometry

  • Radiometry
  • Rendering equation

3

slide-4
SLIDE 4

Two Forms of the Rendering Equation Equation

Hemisphere integration

  • Hemisphere integration
  • Area integration

4

slide-5
SLIDE 5

Radiance Evaluation Radiance Evaluation

Fundamental problem in GI algorithm

  • Fundamental problem in GI algorithm
  • Evaluate radiance at a given surface point in a

given direction given direction

  • I nvariance defines radiance everywhere else

5

slide-6
SLIDE 6

Radiance Evaluation Radiance Evaluation

6

slide-7
SLIDE 7

Why Monte Carlo? Why Monte Carlo?

Radiace is hard to evaluate

  • Radiace is hard to evaluate

From kavita’s slides

  • Sample many paths
  • I ntegrate over all incoming directions

From kavita s slides

g g

  • Analytical integration is difficult
  • Need numerical techniques

7

q

slide-8
SLIDE 8

Monte Carlo Integration Monte Carlo Integration

Numerical tool to evaluate integrals

  • Numerical tool to evaluate integrals
  • Use sampling
  • Stochastic errors
  • Unbiased
  • On average, we get the right answer

8

slide-9
SLIDE 9

9

slide-10
SLIDE 10

10

slide-11
SLIDE 11

11

slide-12
SLIDE 12

12

slide-13
SLIDE 13

13

slide-14
SLIDE 14

14

slide-15
SLIDE 15

15

slide-16
SLIDE 16

16

slide-17
SLIDE 17

17

slide-18
SLIDE 18

18

slide-19
SLIDE 19

19

slide-20
SLIDE 20

20

slide-21
SLIDE 21

21

slide-22
SLIDE 22

22

slide-23
SLIDE 23

23

slide-24
SLIDE 24

C ( ) f

  • Consider p(x) for estimate
  • We will study it as importance sampling later

24

slide-25
SLIDE 25

25

slide-26
SLIDE 26

26

slide-27
SLIDE 27

27

slide-28
SLIDE 28

28

slide-29
SLIDE 29

MC Integration Example MC Integration - Example

I ntegral

  • I ntegral
  • Variance

29

slide-30
SLIDE 30

30

slide-31
SLIDE 31

31

slide-32
SLIDE 32

32

slide-33
SLIDE 33

Advantages of MC Advantages of MC

Convergence rate of

) 1 ( O

  • Convergence rate of

) ( N O

  • Simple
  • Sampling

P i t l ti

  • Point evaluation

G l

  • General
  • Works for high dimensions
  • Deals with discontinuities crazy functions etc
  • Deals with discontinuities, crazy functions, etc.

33

slide-34
SLIDE 34

34

slide-35
SLIDE 35

35

slide-36
SLIDE 36

Importance Sampling Importance Sampling

Take more samples in important regions

  • Take more samples in important regions,

where the function is large

From kavita’s slides

36

slide-37
SLIDE 37

37

slide-38
SLIDE 38

38

slide-39
SLIDE 39

39

slide-40
SLIDE 40

40

slide-41
SLIDE 41

Sampling according to pdf Sampling according to pdf

I nverse cumulative distribution function

  • I nverse cumulative distribution function
  • Rejection sampling

41

slide-42
SLIDE 42

Inverse Cumulative Distribution Function Discrete Case Function – Discrete Case

, given uniform sampling

42

slide-43
SLIDE 43

Continuous Random Variable Continuous Random Variable

Algorithm

  • Algorithm
  • Pick u uniformly from [0, 1)
  • Output y = P-1(u) where

y

d P ) ( ) (

  • Output y = P 1(u), where

 

 dx x p y P ) ( ) (

43

slide-44
SLIDE 44

44

slide-45
SLIDE 45

45

slide-46
SLIDE 46

46

slide-47
SLIDE 47

47

slide-48
SLIDE 48

Rejection Method Rejection Method

Often not possible to compute the inverse

  • Often not possible to compute the inverse
  • f cdf

From kavita’s slides

1

48

slide-49
SLIDE 49

Summary Summary

Monte Carlo integration

  • Monte Carlo integration
  • Estimators

f

  • Sampling non-uniform distribution

49

slide-50
SLIDE 50

Next Time Next Time

Monte Carlo ray tracing

  • Monte Carlo ray tracing

50