monte carol integration
play

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


  1. CS680: CS680: Monte Carol Integration Sung-Eui Yoon ( 윤성의 ) ( 윤성의 ) C Course URL: URL http://jupiter.kaist.ac.kr/~sungeui/SGA/

  2. Course Administration Course Administration ● Due is this Thur. ● HW HW 2

  3. ● Rendering equation Previous Time Previous Time ● Radiometry Radiometry 3

  4. Two Forms of the Rendering Equation Equation ● Hemisphere integration Hemisphere integration ● Area integration 4

  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

  6. Radiance Evaluation Radiance Evaluation 6

  7. Why Monte Carlo? Why Monte Carlo? ● Radiace is hard to evaluate Radiace is hard to evaluate From kavita’s slides From kavita s slides ● Sample many paths ● I ntegrate over all incoming directions g g ● Analytical integration is difficult ● Need numerical techniques q 7

  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

  9. 9

  10. 10

  11. 11

  12. 12

  13. 13

  14. 14

  15. 15

  16. 16

  17. 17

  18. 18

  19. 19

  20. 20

  21. 21

  22. 22

  23. 23

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

  25. 25

  26. 26

  27. 27

  28. 28

  29. Example MC Integration - Example MC Integration ● Variance ● I ntegral I ntegral 29

  30. 30

  31. 31

  32. 32

  33. Advantages of MC Advantages of MC 1 ● Convergence rate of Convergence rate of O O ( ( ) ) N ● Simple ● Sampling ● Point evaluation P i t l ti ● General G l ● Works for high dimensions ● Deals with discontinuities crazy functions etc ● Deals with discontinuities, crazy functions, etc. 33

  34. 34

  35. 35

  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

  37. 37

  38. 38

  39. 39

  40. 40

  41. Sampling according to pdf Sampling according to pdf ● I nverse cumulative distribution function I nverse cumulative distribution function ● Rejection sampling 41

  42. Inverse Cumulative Distribution Function Function – Discrete Case Discrete Case , given uniform sampling 42

  43. Continuous Random Variable Continuous Random Variable ● Algorithm Algorithm ● Pick u uniformly from [0, 1)    y  ● Output y = P 1 (u), where ● Output y = P -1 (u) where P P ( ( y ) ) p ( ( x ) ) dx d  43

  44. 44

  45. 45

  46. 46

  47. 47

  48. Rejection Method Rejection Method ● Often not possible to compute the inverse Often not possible to compute the inverse of cdf From kavita’s slides 1 48

  49. Summary Summary ● Monte Carlo integration Monte Carlo integration ● Estimators ● Sampling non-uniform distribution f 49

  50. ● Monte Carlo ray tracing Monte Carlo ray tracing Next Time Next Time 50

Recommend


More recommend