Monte Carlo Integration

Size: px
Start display at page:

Download "Monte Carlo Integration"

Transcription

1 Lecture 15: Monte Carlo Integration Computer Graphics and Imaging UC Berkeley

2 Reminder: Quadrature-Based Numerical Integration f(x) Z b a f(x)dx x 0 = a x 1 x 2 x 3 x 4 = b E.g. trapezoidal rule - estimate integral assuming function is piecewise linear

3 Multi-Dimensional Integrals (Rendering Examples)

4 2D Integral: Recall Antialiasing By Area Sampling Point sampling Area sampling Integrate over 2D area of pixel

5 2D Integral: Irradiance from the Environment Computing flux per unit area on surface, due to incoming light from all directions. Z E(p) = H 2 L i (p,!) cos d! Contribution to irradiance from light arriving from direction! Hemisphere:H 2 d! Light meter da

6 3D Integral: Motion Blur Integrate over area of pixel and over exposure time. Cook et al. 1984

7 5D Integral: Real Camera Pixel Exposure Credit: lycheng99, Integrate over 2D lens pupil, 2D pixel, and over exposure time

8 5D Integral: Real Camera Pixel Exposure p 0 r 2 Lens aperture d p Sensor plane Pixel area Q pixel = 1 Z t 1 d 2 t 0 Z A lens Z A pixel L(p 0! p,t) cos 4 dp dp 0 dt

9 The Curse of Dimensionality

10 High-Dimensional Integration Complete set of samples: Curse of dimensionality N = n n n {z } y d = n d Numerical integration error: Error 1 n = 1 N 1/d Random sampling error: Error = Variance 1/2 1 p N In high dimensions, Monte Carlo integration requires fewer samples than quadrature-based numerical integration Global illumination = infinite-dimensional integrals

11 Example: Monte Carlo Lighting Sample center Light Center of light Sample random Random point on light 1 sample per pixel

12 Example: Monte Carlo Lighting Light Center Sample center of light Random Sample random point on light True answer

13 Overview: Monte Carlo Integration Idea: estimate integral based on random sampling of function Advantages: General and relatively simple method Requires only function evaluation at any point Works for very general functions, including discontinuities Efficient for high-dimensional integrals avoids curse of dimensionality Disadvantages: Noise. Integral estimate is random, only correct on average Can be slow to converge need a lot of samples

14 Probability Review

15 Random Variables X random variable. Represents a distribution of potential values X p(x) probability density function (PDF). Describes relative probability of a random process choosing value (x) Example: uniform PDF: all values over a domain are equally likely e.g. A six-sided die X takes on values 1, 2, 3, 4, 5, 6 p(1) = p(2) = p(3) = p(4) = p(5) = p(6)

16 Probability Distribution Function (PDF) n discrete values x i With probability p i p i Requirements of a probability distribution: x i p i 0 nx p i =1 i=1 Six-sided die example: p i = 1 6 Think: p i is the probability that a random measurement of X will yield the value x i X takes on the value x i with probability p i

17 Expected Value of a Random Variable The average value that one obtains if repeatedly drawing samples from the random distribution. X drawn from distribution with n discrete values with probabilities x i p i p i nx x i Expected value of X: E[X] = x i p i i=1 Die example: E[X] = nx i=1 i 6 = ( )/6 =3.5

18 Continuous Probability Distribution Function X p(x) A random variable X that can take any of a continuous set of values, where the relative probability of a particular value is given by a continuous probability density function p(x). Z Conditions on p(x): p(x) 0 and Z p(x) dx =1 Expected value of X: E[X] = xp(x) dx

19 Function of a Random Variable A function Y of a random variable X is also a random variable: X p(x) Y = f(x) Z Expected value of a function of a random variable: Z E[Y ]=E[f(X)] = f(x) p(x) dx

20 Monte Carlo Integration

21 Monte Carlo Integration Simple idea: estimate the integral of a function by averaging random samples of the function s value. f(x) Z b a f(x)dx a x i b

22 Monte Carlo Integration Let us define the Monte Carlo estimator for the definite integral of given function f(x) Z b Definite integral f(x)dx Random variable a X i p(x) Note: p(x) must be nonzero for all x where f(x) is nonzero Monte Carlo estimator F N = 1 N NX i=1 f(x i ) p(x i )

23 Example: Basic Monte Carlo Estimator Let us define the Monte Carlo estimator for the definite integral of given function f(x) Definite integral Z b a f(x)dx Uniform random variable X i p(x) = 1 b a Basic Monte Carlo estimator F N = b N a NX i=1 f(x i )

24 <latexit sha1_base64="z70w0ninmevictzhk+bvv8aqe4s=">aaacuxicbvflswmxgpy6vlsfvy9egswiogvxbpugcl3otchaqloxbjrvyjjdkqxylv5gqbz4q7x4unna8neobiaz+cixszqkbqzvvxa8qemz2bn5hwjpcwl5pby6dm2stfpwoilidcsihgmuwmnyk1gr1yzislbmdf8f+m0hpg1p1jxtpawjya3imafeoiks82or5agbllg6/bidtlad42ivc2vdchmnrbzbfxrg4azmpdukgyr+ivvjfrxufbxrqvogn0d7pb+wk37nhwknk2bekjdcrvh+xt2ezpipswuxph34qe3krftobesxcwzysug9uwvtrxwrzhtyysv9towuloot7y6yakj+nsijnkyni5euxn6z/95anos1mxsfdxku0swyrb8vijobbiig/aiu14xa0xoeum3drojeededdb9qdcue/588thr7teoaf3lqot0fttepg7aj2xdaizzcgvxaayg8wrt8wgfhpfduged9r73cagyd/sarfqejbq5z</latexit> <latexit sha1_base64="5ymzt5vt2pp+mnpiyc0v17ar8fm=">aaab9hicbvbns8naej3ur1q/oh69lbbbiyurqb0vvxisygyhjwwz3brln5uwu1fkyp/w4khfqz/gm//gtzudtj4yelw3w8y8iofmacf5tiplyyura9x12sbm1vaovbt3r+jueuqrmmeye2bforpu00xz2kkkxvhaatsyxxd++5fkxwjxpycj9sm8fcxkbgsjpfrciunm5llwgvna3647dwcktejcktshrktvf/ugmukjkjthwkmu6ytaz7dujhca13qpogkmyzykxumfjqjys+nvotoyygcfstqlnjqqvycyhck1iqltgwe9uvneif7ndvmdxvgze0mqqsczrwhkky5reqeamemj5hndmjhm3iricjsgtamqcmgdf3mrekeny4zze1zvxpvpvoeadueyxdihjtxaczwgioezxuhnerjerhfry9zascqzffgd6/mhtrmr7a==</latexit> Example: Basic Monte Carlo Estimator The basic Monte Carlo estimator is a simple special case where we sample with a uniform random variable Uniform random variable f(x) Z b a f(x)dx X i p(x) =C Z b (constant) p(x) dx =1 =) ) a Z b Cdx=1 p(x) a x i b a =) C = 1 b 1 a b a a x i b

25 <latexit sha1_base64="/s5fnbivq6ju+vsap67xvpguiqw=">aaacexicjvfds8mwfe3r15xfvr9fcbvokthbfdshwuaqfrktnbuss6rzuowlhyspmep/hh/nn3+jlz6ybuv088eliydz7uem57oro0ka5rumlywula/kvvnr6xubw8b2zpmiy45je4cs5g0xccjoqjqsskbaesfidxlpucobsd56ivzqmhiuo4h0fdqpqecxkopyjndbpw5lvwh7hohespn6cm0r+05cq1b6xm8er9x26fgarnpbtvpk9e+pdvp2t9de9d1iefo2qceximbfnbscb1ygiicrhmo82b0qxz4jjgziii5lrrkbic4pzitn27egecjd1ccdbqpke9fnjtgl8eaxpeifxj1awgn705egx4ir76poh8mbmnxg5f9aj5bevtehqrrleudpic9muizwvafyo5xgyuykimypeivea6sykwpberwcnfvleda8q1xxzielyu0+symh9kablieflken3iegaaimprr9raqdap96qs/rx9nwxcs8u+bx6edfxsu8gg==</latexit> Example: Basic Monte Carlo Estimator The basic Monte Carlo estimator is a simple special case where we sample with a uniform random variable Basic Monte Carlo estimator (derivation) F N = 1 N XNX f(x i ) (MC Estimator) i=1 p(x i ) = 1 N XNX f(x i ) i=1 1/(b a) = b a N XNX i=1 f(x i )

26 Unbiased Estimator Definition: A randomized integral estimator is unbiased if its expected value is the desired integral. Fact: the general and basic Monte Carlo estimators are unbiased (proof on next slide) Why do we want unbiased estimators?

27 Proof That Monte Carlo Estimator Is Unbiased E[F N ]=E = 1 N = 1 N " 1 N XNX i=1 XNX i=1 E XNX Z i=1 XNX Z Z b a Z b f(x i ) p(x i ) apple f(xi ) p(x i ) # f(x) p(x) p(x)dx E Properties of expected values: " X i # X Y i = E[Y i ] i E[aY ]=ae[y ] = 1 N = i=1 Z b a a f(x)dx f(x)dx The expected value of the Monte Carlo estimator is the desired integral.

28 Variance of a Random Variable Definition V [Y ]=E[(Y E[Y ]) 2 ] = E[Y 2 ] E[Y ] 2 Variance decreases linearly with number of samples V " 1 N NX i=1 Y i # = 1 N 2 NX i=1 V [Y i ]= 1 N 2 NV[Y ]= 1 N V [Y ] Properties of variance " N X NX V Y i # = V [Y i ] V [ay ]=a 2 V [Y ] i=1 i=1

29 More Random Samples Reduces Variance Light Center Random 1 shadow ray 16 shadow rays

30 Definite Integral Can Be N-Dimensional Example in 3D: Z x1 Z y1 Z z1 f(x, y, z) dx dy dz x 0 y 0 z 0 Uniform 3D random variable* X i p(x, y, z) = x 1 x 0 y 1 y 0 z 1 z 0 Basic 3D MC estimator* F N = (x 1 x 0 )(y 1 y 0 )(z 1 z 0 ) N * Generalizes to arbitrary N-dimensional PDFs NX i=1 f(x i )

31 Example: Monte Carlo Estimate Of Direct Lighting Integral

32 Direct Lighting (Irradiance) Estimate Z E(p) = L(p,!) cos d! Idea: sample directions over Z L(p,!) hemisphere uniformly in solid angle Z d! Estimator: X i p(!) p(!) = 1 2 Y i = f(x i ) Y i = L(p,! i )cos i da F N = 2 N NX i=1 Y i

33 Direct Lighting (Irradiance) Estimate Sample directions over hemisphere uniformly in solid angle Z E(p) = L(p,!) cos d! Z Given surface point p A ray tracer evaluates radiance along a ray Z For each of N samples: Generate random direction:! i Compute incoming radiance arriving L i at p from direction: Compute incident irradiance due to ray:! i 2 Accumulate N de i into estimator de i = L i cos i

34 Direct Lighting - Solid Angle Sampling Light Blocker 100 shadow rays per pixel

35 Hemispherical Solid Angle Sampling, 100 shadow rays (random directions drawn uniformly from hemisphere)

36 The MC estimator uses different random directions at each pixel. Only some directions point towards the light. (Estimator is a random variable) Why does this image look noisy?

37 Observation: incoming radiance is zero for most directions in this scene Idea: integrate only over the area of the light (directions where incoming radiance could be non-zero)

38 Importance Sampling

39 Importance Sampling Simple idea: sample the integrand according to how much we expect it to contribute to the integral. ( ) ( ) Z b a f(x) dx complicated integrand Inefficient to sample heavily here! (small contribution to integral) b a Basic Monte Carlo: N NX i=1 f(x i ) (x i are sampled uniformly) Importance-Sampled Monte Carlo: our best guess for where the integrand is big Note: p(x) must be non-zero where f(x) is non-zero (x i are sampled proportional to p) If I sample x less frequently, each sample should count for more.

40 Effect of Sampling Distribution Fit f(x) p 2 (x) p 1 (x) What is the behavior of f(x)/p 1 (x)? f(x)/p 2 (x)? How does this impact the variance of the estimator?

41 Importance Sampling - Ideal Probability Distribution Idea: concentrate selection of random samples in parts of domain where function is large ( high value samples ) Fact: sampling according Recall definition of variance: f(x) to itself would be optimal (though in pratice V [ f] =E[ f 2 ] E 2 [ f] can only take an educated guess) p(x) =cf(x) f(x) = f(x) p(x) E[ f 2 ]= = Z apple f(x) Z apple =E[f] p(x) 2 f(x) f(x)/e[f] Z f(x)dx p(x)dx 2 f(x) E[f] dx If PDF is proportional to f then variance is 0! =E 2 [f]! V [ f] =0?!?

42 Direct Lighting Importance Sampling: Sample Lights Light Center Solid angle sampling Random Area sampling

43 Light Source Area Sampling 100 shadow rays If no occlusion is present, all directions chosen in computing estimate hit the light source. (Choice of direction only matters if portion of light is occluded from surface point p.)

44 0! 0 =p p 0 Direct Lighting: Area Integral (How to Normalize?) ZA0 L o (p 0,! 0 ) V (p, p 0 ) E(p) = cos cos 0 p p 0 2 da0 Change of variables to integral over area of light * dw = da0 cos 0 p 0 p 2 A 0 p 0 Binary visibility function: 1 if p is visible from p, 0 otherwise (accounts for light occlusion) Outgoing radiance from light point p, in direction w towards p! =p 0 p p

45 Direct Lighting: Area Integral (How to Normalize?) ZA0 L o (p 0,! 0 ) V (p, p 0 ) E(p) = cos cos 0 p p 0 2 da0 Sample shape uniformly by area A Z A 0 p 0 A 0 p(p 0 )da 0 =1 p(p 0 )= 1 A 0 0! 0 =p p 0 Estimator 0! =p 0 p F N = A0 N NX i=1 Y i p Y i = L o (p 0 i,! 0 i) V (p, p 0 i) cos i cos 0 i p p 0 i 2 0 X

46 Solid Angle Sampling vs Area Sampling Light Center Solid angle sampling Random Area sampling 100 random directions on hemisphere 100 random points on area of light source

47 How to Draw Samples From a Desired Probability Distribution?

48 Task: Draw A Random Value From a Given PDF Task: Given a PDF for a discrete random variable, p i p i x probability for each value i, Draw a random value X from this PDF. x i 1 Step 1: jx Calculate cumulative PDF: P j = p i i=1 Note: must have P j 0 apple P i apple 1 P n =1 0

49 <latexit sha1_base64="k0++xp6t+3q9wpv54l820+3dqnc=">aaab7xicbvbns8naej34wetx1aoxxsj4koki6keoeomxgrgfnptndtiu3wzc7kysot/ciwcvr/4fb/4bt20o2vpg4pheddpzwlrwbvz321lzxvvf2cxtlbd3dvf2kwehdzrjfeofjsjr7zbqffyib7gr2e4v0jgu2apht1o/9yhk80tem3gkquwhkkecuwolvpvckkce71wqbs2dgswtrybvkndsvb66/yrlmurdbnw647mpcxkqdgccj+vupjglbeqh2lfu0hh1km/onzbtq/rjlchb0pcz+nsip7hw4zi0nte1q73otcx/ve5moqsg5zlndeo2xxrlgpieth8nfa6qgtg2hdlf7a2edamiznieyjyeb/hlzekf165r7t1ftd4o0ijbmzzagxhwcxvoqbn8ydccz3ifnyd1xpx352peuuium0fwb87nd6lijq4=</latexit> <latexit sha1_base64="k0++xp6t+3q9wpv54l820+3dqnc=">aaab7xicbvbns8naej34wetx1aoxxsj4koki6keoeomxgrgfnptndtiu3wzc7kysot/ciwcvr/4fb/4bt20o2vpg4pheddpzwlrwbvz321lzxvvf2cxtlbd3dvf2kwehdzrjfeofjsjr7zbqffyib7gr2e4v0jgu2apht1o/9yhk80tem3gkquwhkkecuwolvpvckkce71wqbs2dgswtrybvkndsvb66/yrlmurdbnw647mpcxkqdgccj+vupjglbeqh2lfu0hh1km/onzbtq/rjlchb0pcz+nsip7hw4zi0nte1q73otcx/ve5moqsg5zlndeo2xxrlgpieth8nfa6qgtg2hdlf7a2edamiznieyjyeb/hlzekf165r7t1ftd4o0ijbmzzagxhwcxvoqbn8ydccz3ifnyd1xpx352peuuium0fwb87nd6lijq4=</latexit> <latexit sha1_base64="k0++xp6t+3q9wpv54l820+3dqnc=">aaab7xicbvbns8naej34wetx1aoxxsj4koki6keoeomxgrgfnptndtiu3wzc7kysot/ciwcvr/4fb/4bt20o2vpg4pheddpzwlrwbvz321lzxvvf2cxtlbd3dvf2kwehdzrjfeofjsjr7zbqffyib7gr2e4v0jgu2apht1o/9yhk80tem3gkquwhkkecuwolvpvckkce71wqbs2dgswtrybvkndsvb66/yrlmurdbnw647mpcxkqdgccj+vupjglbeqh2lfu0hh1km/onzbtq/rjlchb0pcz+nsip7hw4zi0nte1q73otcx/ve5moqsg5zlndeo2xxrlgpieth8nfa6qgtg2hdlf7a2edamiznieyjyeb/hlzekf165r7t1ftd4o0ijbmzzagxhwcxvoqbn8ydccz3ifnyd1xpx352peuuium0fwb87nd6lijq4=</latexit> Task: Draw A Random Value From a Given PDF Task: Given a PDF for a discrete random variable, p i p i x probability for each value i, Draw a random value X from this PDF. x i 1 Step 2: Given a uniform random variable 2 [0, 1) choose such that X = x i P i 1 < apple P i P j How to compute? Binary search. 0

50 Continuous Probability Distribution PDF p(x) Uniform distribution on unit interval p(x) 0 CDF P (x) Z x 0 1 P (x) = 0 p(x)dx 1 P (x) =Pr(X<x) P (1) = 1 Z b Pr(a apple X apple b) = a p(x)dx = P (b) P (a) 0 1

51 Sampling Continuous Probability Distributions Called the inversion method Cumulative probability distribution function P (x) =Pr(X<x) 1 Construction of samples: Solve for x = P 1 ( ) Must know the formula for: 1. The integral of p(x) 2. The inverse function P 1 (x) 0 x 1

52 Example: Sample Proportional to x 2 Given: f(x) =x 2 x 2 [0, 2] Want to sample according to this graph:

53 <latexit sha1_base64="hhwoo9ecpwf3r4umdh5dgi9efim=">aaacrxicbvhlbtqwfhxcq4txaes2finqeduokuiubvirg9i1etnwjkcjx7ljrdpozn+ggvn5ph6ahx+dm5okprispapz8om4b5r0mkz/ovjw7tt3723dtx48fpt4yejpsynxt1bavnsqtic5d6ckgslkvhdswoa6v3ccn3/p9eofyj2szxdcntdxvdkylijjobajxyyhshrplawmfbw7n3ujbbaxb+hr+okktlp2ei2wp7uumpywzfhmav9zubpjwcekwuua1d7hdopl8gf/2e30gu83kdo8dlyiikcx0nlh33v+r7sqnpujbz3scwebu1y6criyjdnjuh56e2qdgjnhdhaj36yoravbofdcuvmwnjj33kiucrqetq4als55bbmaddfg5n5dd0dfbaagzw3dmkjx7owe59q5lc6dsy/kxdd68n/armvyb+6lavoeizyhla2iwnp+72ghlqhuqwc4sdlclyozhrrb8mn9cdn1j98e093jx0l6+h68/21oy4u8ic/jnsnib7jpvpidmiuiehsdrj+iwzzgrzgltzfwoboyz8mviau/q+zkuq==</latexit> Example: Sample Proportional to x 2 Given: f(x) =x 2 x 2 [0, 2] Want to sample according to this graph: Step 0: compute PDF by normalizing p(x) =cf(x) =cx 2 Z Z 2 Z 2 Also 0 p(x) dx =1 0 cx 2 dx =1 =) ) c = 3 8 =) p(x) = 3x2 8

54 Z Z Example: Sample Proportional to x 2 Given: ) f(x) 8=x 2 x 2 [0, 2] Want to sample according to this ) p(x) = 3x2 8 Step 1: Compute CDF: Z x P (x) = 0 = x3 8 p(x)dx

55 Example: Sample Proportional to x 2 Given: f(x) =x 2 x 2 [0, 2] Applying the inversion method p(x) = 3 8 x2 Remember is uniform random number in [0,1) P (x) = x3 8 Step 2: Sample from p(x) = P (x) = x3 8 x = 3p 8 x

56 How to Uniformly Sample The Unit Circle?

57 Sampling Unit Circle: Simple but Wrong Method,= uniform random angle between 0 and 2 (r c = uniform random radius between 0 and 1 Return point: (r cos,rsin ) Source: [PBRT] Result Reference

58 Need to Sample Uniformly in Area Incorrect Not Equi-areal Correct Equi-areal =2 1 =2 1 r = 2 r = p 2 * See Shirley et al. p.331 for full explanation using inversion method

59 Rejection Sampling Circle s Area do { x = 1-2 * rand01(); y = 1-2 * rand01(); } while (x*x + y*y > 1.); Efficiency of technique: area of circle / area of square

60 Rejection Sampling 2D Directions do { x = 1-2 * rand01(); y = 1-2 * rand01(); } while (x*x + y*y > 1.); r = sqrt(x*x+y*y); x_dir = x/r; y_dir = y/r; Generates 2D directions with uniform probability

61 Approximate the Area of a Circle inside = 0 for (i = 0; i < N; ++i) { x = 1-2 * rand01(); y = 1-2 * rand01(); if (x*x + y*y < 1.) ++inside; } A = inside / N * 4;

62 Uniform Sampling of Hemisphere Generate random direction on hemisphere (all dirs. equally likely) p(!) = 1 2 Direction computed from uniformly distributed point on 2D square: q q ( 1, 2 )! ( cos(2 2), sin(2 2), 1 ) Full derivation: see PBRT 3rd Ed

63 Things to Remember Monte Carlo integration Unbiased estimators Good for high-dimensional integrals Estimates are visually noisy and need many samples Importance sampling can reduce variance (noise) if probability distribution fits underlying function Sampling random variables Inversion method, rejection sampling Sampling in 1D, 2D, disks, hemispheres

64 Acknowledgments Many thanks to Kayvon Fatahalian, Matt Pharr, and Pat Hanrahan, who created the majority of these slides. Thanks also to Keenan Crane.

65 Extra

66 Pseudo-Random Number Generation Example: cellular automata #30

67 Pseudo-Random Number Generation Example: cellular automata #30 Center line values are a high-quality random bit sequence Once used for random number generator in Mathematica

68 Pseudo-Random Number Generation Credit: Richard Ling

69 Art Competition #1 Results

70 Art Competition #1 Winner Traced by hand in Adobe Illustrator to create a vectorized version of a lowresolution image of a dancing dog. Source video: v=by34jqxwfvs. UC Berkeley Caleb Wyllie Spring 2018

71 Art Competition #1 Winner Goal: create a crystal-like structure with only triangles, including an optical illusion to make it look like figure was reaching out of frame. Process: 3D modeled a person, decimated mesh down, rendered with a crystal material to create a reference, imported into Illustrator and created triangles over the image (5 hours). UC Berkeley Brian Aronowitz Spring 2018

72 Art Competition #1 Winner Derived from a JPEG photo of clouds, and processed by an online image triangulation tool to create a low-count polygon effect. The class SVG parser needed coding patch to read the RGB color format output by the online tool. UC Berkeley Hai Zhang Spring 2018

Monte Carlo Integration

Monte Carlo Integration Lecture 11: Monte Carlo Integration Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 Reminder: Quadrature-Based Numerical Integration f(x) Z b a f(x)dx x 0 = a x 1 x 2 x 3 x 4 = b E.g.

More information

Numerical Integration

Numerical Integration Lecture 12: Numerical Integration (with a focus on Monte Carlo integration) Computer Graphics CMU 15-462/15-662, Fall 2015 Review: fundamental theorem of calculus Z b f(x)dx = F (b) F (a) a f(x) = d dx

More information

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662 Monte Carlo Ray Tracing Computer Graphics CMU 15-462/15-662 TODAY: Monte Carlo Ray Tracing How do we render a photorealistic image? Put together many of the ideas we ve studied: - color - materials - radiometry

More information

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016 The Rendering Equation Computer Graphics CMU 15-462/15-662, Fall 2016 Review: What is radiance? Radiance at point p in direction N is radiant energy ( #hits ) per unit time, per solid angle, per unit area

More information

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi http://inst.eecs.berkeley.edu/~cs283 Acknowledgements and many slides courtesy: Thomas Funkhouser, Szymon

More information

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 557 Autumn 2017

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 557 Autumn 2017 Anti-aliasing and Monte Carlo Path Tracing Brian Curless CSE 557 Autumn 2017 1 Reading Required: Marschner and Shirley, Section 13.4 (online handout) Pharr, Jakob, and Humphreys, Physically Based Ray Tracing:

More information

Anti-aliasing and Monte Carlo Path Tracing

Anti-aliasing and Monte Carlo Path Tracing Reading Required: Anti-aliasing and Monte Carlo Path Tracing Brian Curless CSE 557 Autumn 2017 Marschner and Shirley, Section 13.4 (online handout) Pharr, Jakob, and Humphreys, Physically Based Ray Tracing:

More information

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION CS580: Computer Graphics KAIST School of Computing Chapter 3 MULTI-DIMENSIONAL MONTE CARLO INTEGRATION 2 1 Monte Carlo Integration This describes a simple technique for the numerical evaluation of integrals

More information

Measuring Light: Radiometry and Cameras

Measuring Light: Radiometry and Cameras Lecture 11: Measuring Light: Radiometry and Cameras Computer Graphics CMU 15-462/15-662, Fall 2015 Slides credit: a majority of these slides were created by Matt Pharr and Pat Hanrahan Simulating a pinhole

More information

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate?

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate? Monte-Carlo Ray Tracing Antialiasing & integration So far, Antialiasing as signal processing Now, Antialiasing as integration Complementary yet not always the same in particular for jittered sampling Image

More information

Motivation. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

Motivation. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing Advanced Computer Graphics (Spring 2013) CS 283, Lecture 11: Monte Carlo Path Tracing Ravi Ramamoorthi http://inst.eecs.berkeley.edu/~cs283/sp13 Motivation General solution to rendering and global illumination

More information

Monte Carlo Integration of The Rendering Equation. Computer Graphics CMU /15-662, Spring 2017

Monte Carlo Integration of The Rendering Equation. Computer Graphics CMU /15-662, Spring 2017 Monte Carlo Integration of The Rendering Equation Computer Graphics CMU 15-462/15-662, Spring 2017 Review: Monte Carlo integration Z b Definite integral What we seek to estimate a f(x)dx Random variables

More information

CS 563 Advanced Topics in Computer Graphics Monte Carlo Integration: Basic Concepts. by Emmanuel Agu

CS 563 Advanced Topics in Computer Graphics Monte Carlo Integration: Basic Concepts. by Emmanuel Agu CS 563 Advanced Topics in Computer Graphics Monte Carlo Integration: Basic Concepts by Emmanuel Agu Introduction The integral equations generally don t have analytic solutions, so we must turn to numerical

More information

Monte Carlo Integration COS 323

Monte Carlo Integration COS 323 Monte Carlo Integration COS 323 Last time Interpolatory Quadrature Review formulation; error analysis Newton-Cotes Quadrature Midpoint, Trapezoid, Simpson s Rule Error analysis for trapezoid, midpoint

More information

Realistic Camera Model

Realistic Camera Model Realistic Camera Model Shan-Yung Yang November 2, 2006 Shan-Yung Yang () Realistic Camera Model November 2, 2006 1 / 25 Outline Introduction Lens system Thick lens approximation Radiometry Sampling Assignment

More information

Monte Carlo Integration COS 323

Monte Carlo Integration COS 323 Monte Carlo Integration COS 323 Integration in d Dimensions? One option: nested 1-D integration f(x,y) g(y) y f ( x, y) dx dy ( ) = g y dy x Evaluate the latter numerically, but each sample of g(y) is

More information

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao GAMES Webinar: Rendering Tutorial 2 Monte Carlo Methods Shuang Zhao Assistant Professor Computer Science Department University of California, Irvine GAMES Webinar Shuang Zhao 1 Outline 1. Monte Carlo integration

More information

Global Illumination The Game of Light Transport. Jian Huang

Global Illumination The Game of Light Transport. Jian Huang Global Illumination The Game of Light Transport Jian Huang Looking Back Ray-tracing and radiosity both computes global illumination Is there a more general methodology? It s a game of light transport.

More information

Measuring Light: Radiometry and Photometry

Measuring Light: Radiometry and Photometry Lecture 10: Measuring Light: Radiometry and Photometry Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 Radiometry Measurement system and units for illumination Measure the spatial properties

More information

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome! INFOMAGR Advanced Graphics Jacco Bikker - February April 2016 Welcome! I x, x = g(x, x ) ε x, x + S ρ x, x, x I x, x dx Today s Agenda: Introduction Stratification Next Event Estimation Importance Sampling

More information

The Rendering Equation and Path Tracing

The Rendering Equation and Path Tracing The Rendering Equation and Path Tracing Louis Feng April 22, 2004 April 21, 2004 Realistic Image Synthesis (Spring 2004) 1 Topics The rendering equation Original form Meaning of the terms Integration Path

More information

Lecture 7: Monte Carlo Rendering. MC Advantages

Lecture 7: Monte Carlo Rendering. MC Advantages Lecture 7: Monte Carlo Rendering CS 6620, Spring 2009 Kavita Bala Computer Science Cornell University MC Advantages Convergence rate of O( ) Simple Sampling Point evaluation Can use black boxes General

More information

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination Raytracing & Epsilon intersects light @ t = 25.2 intersects sphere1 @ t = -0.01 & Monte Carlo Ray Tracing intersects sphere1 @ t = 10.6 Solution: advance the ray start position epsilon distance along the

More information

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 457 Autumn 2017

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 457 Autumn 2017 Anti-aliasing and Monte Carlo Path Tracing Brian Curless CSE 457 Autumn 2017 1 Reading Required: Marschner and Shirley, Section 13.4 (online handout) Further reading: Pharr, Jakob, and Humphreys, Physically

More information

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity Schedule Review Session: Tuesday November 18 th, 7:30 pm, Room 2-136 bring lots of questions! MIT 6.837 Monte-Carlo Ray Tracing Quiz 2: Thursday November 20 th, in class (one weeks from today) MIT EECS

More information

Lecture 7 - Path Tracing

Lecture 7 - Path Tracing INFOMAGR Advanced Graphics Jacco Bikker - November 2016 - February 2017 Lecture 7 - I x, x = g(x, x ) ε x, x + S ρ x, x, x I x, x dx Welcome! Today s Agenda: Introduction Advanced Graphics 3 Introduction

More information

Motivation: Monte Carlo Path Tracing. Sampling and Reconstruction of Visual Appearance. Monte Carlo Path Tracing. Monte Carlo Path Tracing

Motivation: Monte Carlo Path Tracing. Sampling and Reconstruction of Visual Appearance. Monte Carlo Path Tracing. Monte Carlo Path Tracing Sampling and Reconstruction of Visual Appearance CSE 274 [Winter 2018], Lecture 4 Ravi Ramamoorthi http://www.cs.ucsd.edu/~ravir Motivation: Key application area for sampling/reconstruction Core method

More information

Intro to Ray-Tracing & Ray-Surface Acceleration

Intro to Ray-Tracing & Ray-Surface Acceleration Lecture 12 & 13: Intro to Ray-Tracing & Ray-Surface Acceleration Computer Graphics and Imaging UC Berkeley Course Roadmap Rasterization Pipeline Core Concepts Sampling Antialiasing Transforms Geometric

More information

In the real world, light sources emit light particles, which travel in space, reflect at objects or scatter in volumetric media (potentially multiple

In the real world, light sources emit light particles, which travel in space, reflect at objects or scatter in volumetric media (potentially multiple 1 In the real world, light sources emit light particles, which travel in space, reflect at objects or scatter in volumetric media (potentially multiple times) until they are absorbed. On their way, they

More information

Measuring Light: Radiometry and Photometry

Measuring Light: Radiometry and Photometry Lecture 14: Measuring Light: Radiometry and Photometry Computer Graphics and Imaging UC Berkeley Radiometry Measurement system and units for illumination Measure the spatial properties of light New terms:

More information

Probability and Statistics for Final Year Engineering Students

Probability and Statistics for Final Year Engineering Students Probability and Statistics for Final Year Engineering Students By Yoni Nazarathy, Last Updated: April 11, 2011. Lecture 1: Introduction and Basic Terms Welcome to the course, time table, assessment, etc..

More information

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017 Path Tracing part 2 Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017 Monte Carlo Integration Monte Carlo Integration The rendering (& radiance) equation is an infinitely recursive integral

More information

3D Rendering. Course Syllabus. Where Are We Now? Rendering. 3D Rendering Example. Overview. Rendering. I. Image processing II. Rendering III.

3D Rendering. Course Syllabus. Where Are We Now? Rendering. 3D Rendering Example. Overview. Rendering. I. Image processing II. Rendering III. Course Syllabus I. Image processing II. Rendering III. Modeling 3D Rendering Rendering I. Animation (Michael Bostock, CS426, Fall99) Image Processing Adam Finkelstein Princeton University COS 426, Spring

More information

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1 MIT 6.837 Monte-Carlo Ray Tracing MIT EECS 6.837, Cutler and Durand 1 Schedule Review Session: Tuesday November 18 th, 7:30 pm bring lots of questions! Quiz 2: Thursday November 20 th, in class (one weeks

More information

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces) Photon Mapping 1/36 Photon Maps The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces) As opposed to the radiosity method that stores information on surface

More information

Understanding Variability

Understanding Variability Understanding Variability Why so different? Light and Optics Pinhole camera model Perspective projection Thin lens model Fundamental equation Distortion: spherical & chromatic aberration, radial distortion

More information

13 Distribution Ray Tracing

13 Distribution Ray Tracing 13 In (hereafter abbreviated as DRT ), our goal is to render a scene as accurately as possible. Whereas Basic Ray Tracing computed a very crude approximation to radiance at a point, in DRT we will attempt

More information

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome! INFOGR Computer Graphics J. Bikker - April-July 2016 - Lecture 10: Shading Models Welcome! Today s Agenda: Introduction Light Transport Materials Sensors Shading INFOGR Lecture 10 Shading Models 3 Introduction

More information

Rendering Equation & Monte Carlo Path Tracing I

Rendering Equation & Monte Carlo Path Tracing I Rendering Equation & Monte Carlo Path Tracing I CS295, Spring 2017 Shuang Zhao Computer Science Department University of California, Irvine CS295, Spring 2017 Shuang Zhao 1 Announcements Homework 1 due

More information

Paths, diffuse interreflections, caching and radiometry. D.A. Forsyth

Paths, diffuse interreflections, caching and radiometry. D.A. Forsyth Paths, diffuse interreflections, caching and radiometry D.A. Forsyth How we got here We want to render diffuse interreflections strategy: compute approximation B-hat, then gather B = E +(ρk)e +(ρk)( ˆB

More information

Photo-realistic Renderings for Machines Seong-heum Kim

Photo-realistic Renderings for Machines Seong-heum Kim Photo-realistic Renderings for Machines 20105034 Seong-heum Kim CS580 Student Presentations 2016.04.28 Photo-realistic Renderings for Machines Scene radiances Model descriptions (Light, Shape, Material,

More information

Realistic Image Synthesis

Realistic Image Synthesis Realistic Image Synthesis - BRDFs and Direct ighting - Philipp Slusalle Karol Myszowsi Gurprit Singh Realistic Image Synthesis SS8 BRDFs and Direct ighting Importance Sampling Example Example: Generate

More information

Physically Realistic Ray Tracing

Physically Realistic Ray Tracing Physically Realistic Ray Tracing Reading Required: Watt, sections 10.6,14.8. Further reading: A. Glassner. An Introduction to Ray Tracing. Academic Press, 1989. [In the lab.] Robert L. Cook, Thomas Porter,

More information

Accelerating Ray-Tracing

Accelerating Ray-Tracing Lecture 9: Accelerating Ray-Tracing Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 Course Roadmap Rasterization Pipeline Core Concepts Sampling Antialiasing Transforms Geometric Modeling

More information

Distributed Ray Tracing

Distributed Ray Tracing CT5510: Computer Graphics Distributed Ray Tracing BOCHANG MOON Distributed Ray Tracing Motivation The classical ray tracing produces very clean images (look fake) Perfect focus Perfect reflections Sharp

More information

Distribution Ray Tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Distribution Ray Tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Distribution Ray Tracing University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Reading Required: Watt, sections 10.6,14.8. Further reading: A. Glassner. An Introduction to Ray

More information

The Light Field. Last lecture: Radiometry and photometry

The Light Field. Last lecture: Radiometry and photometry The Light Field Last lecture: Radiometry and photometry This lecture: Light field = radiance function on rays Conservation of radiance Measurement equation Throughput and counting rays Irradiance calculations

More information

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading CENG 477 Introduction to Computer Graphics Ray Tracing: Shading Last Week Until now we learned: How to create the primary rays from the given camera and image plane parameters How to intersect these rays

More information

2/1/10. Outline. The Radiance Equation. Light: Flux Equilibrium. Light: Radiant Power. Light: Equation. Radiance. Jan Kautz

2/1/10. Outline. The Radiance Equation. Light: Flux Equilibrium. Light: Radiant Power. Light: Equation. Radiance. Jan Kautz Outline Jan Kautz Basic terms in radiometry Radiance Reflectance The operator form of the radiance equation Meaning of the operator form Approximations to the radiance equation 2005 Mel Slater, 2006 Céline

More information

distribution ray-tracing

distribution ray-tracing distribution ray-tracing 1 distribution ray-tracing use many rays to compute average values over pixel areas, time, area lights, reflected directions,... 2 antialiasing origin compute average color subtended

More information

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity Today Anti-aliasing Surface Parametrization Soft Shadows Global Illumination Path Tracing Radiosity Exercise 2 Sampling Ray Casting is a form of discrete sampling. Rendered Image: Sampling of the ground

More information

Rendering. Generate an image from geometric primitives II. Rendering III. Modeling IV. Animation. (Michael Bostock, CS426, Fall99)

Rendering. Generate an image from geometric primitives II. Rendering III. Modeling IV. Animation. (Michael Bostock, CS426, Fall99) 1 Course Syllabus 2 I. Image processing 3D Adam Finkelstein Princeton University C0S 426, Fall 2001 II. III. Modeling IV. Animation Image Processing (Rusty Coleman, CS426, Fall99) (Michael Bostock, CS426,

More information

Distribution Ray-Tracing. Programação 3D Simulação e Jogos

Distribution Ray-Tracing. Programação 3D Simulação e Jogos Distribution Ray-Tracing Programação 3D Simulação e Jogos Bibliography K. Suffern; Ray Tracing from the Ground Up, http://www.raytracegroundup.com Chapter 4, 5 for Anti-Aliasing Chapter 6 for Disc Sampling

More information

The Rendering Equation. Computer Graphics CMU /15-662

The Rendering Equation. Computer Graphics CMU /15-662 The Rendering Equation Computer Graphics CMU 15-462/15-662 Review: What is radiance? Radiance at point p in direction N is radiant energy ( #hits ) per unit time, per solid angle, per unit area perpendicular

More information

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker CMSC427 Advanced shading getting global illumination by local methods Credit: slides Prof. Zwicker Topics Shadows Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection

More information

Reading. 8. Distribution Ray Tracing. Required: Watt, sections 10.6,14.8. Further reading:

Reading. 8. Distribution Ray Tracing. Required: Watt, sections 10.6,14.8. Further reading: Reading Required: Watt, sections 10.6,14.8. Further reading: 8. Distribution Ray Tracing A. Glassner. An Introduction to Ray Tracing. Academic Press, 1989. [In the lab.] Robert L. Cook, Thomas Porter,

More information

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing Lecture 11 Ray tracing Introduction Projection vs. ray tracing Projection Ray tracing Rendering Projection vs. ray tracing Projection Ray tracing Basic methods for image generation Major areas of computer

More information

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker CMSC427 Shading Intro Credit: slides from Dr. Zwicker 2 Today Shading Introduction Radiometry & BRDFs Local shading models Light sources Shading strategies Shading Compute interaction of light with surfaces

More information

Theoretically Perfect Sensor

Theoretically Perfect Sensor Sampling 1/60 Sampling The ray tracer samples the geometry, only gathering information from the parts of the world that interact with a finite number of rays In contrast, a scanline renderer can push all

More information

Global Illumination and Monte Carlo

Global Illumination and Monte Carlo Global Illumination and Monte Carlo MIT EECS 6.837 Computer Graphics Wojciech Matusik with many slides from Fredo Durand and Jaakko Lehtinen ACM. All rights reserved. This content is excluded from our

More information

CS5620 Intro to Computer Graphics

CS5620 Intro to Computer Graphics So Far wireframe hidden surfaces Next step 1 2 Light! Need to understand: How lighting works Types of lights Types of surfaces How shading works Shading algorithms What s Missing? Lighting vs. Shading

More information

Light Field = Radiance(Ray)

Light Field = Radiance(Ray) The Light Field Concepts Light field = radiance function on rays Conservation of radiance Throughput and counting rays Measurement equation Irradiance calculations From London and Upton Light Field = Radiance(Ray)

More information

Choosing the Right Algorithm & Guiding

Choosing the Right Algorithm & Guiding Choosing the Right Algorithm & Guiding PHILIPP SLUSALLEK & PASCAL GRITTMANN Topics for Today What does an implementation of a high-performance renderer look like? Review of algorithms which to choose for

More information

Spherical Harmonic Lighting: The Gritty Details Robin Green

Spherical Harmonic Lighting: The Gritty Details Robin Green Spherical Harmonic Lighting: The Gritty Details Robin Green R&D Programmer Sony Computer Entertainment America What This Talk Is About Advanced Lecture Explicit equations will be shown This talk is one

More information

Monte Carlo 1: Integration

Monte Carlo 1: Integration Monte Carlo : Integraton Prevous lecture: Analytcal llumnaton formula Ths lecture: Monte Carlo Integraton Revew random varables and probablty Samplng from dstrbutons Samplng from shapes Numercal calculaton

More information

Capturing light. Source: A. Efros

Capturing light. Source: A. Efros Capturing light Source: A. Efros Review Pinhole projection models What are vanishing points and vanishing lines? What is orthographic projection? How can we approximate orthographic projection? Lenses

More information

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows Last Time: Acceleration Data Structures for Ray Tracing Modeling Transformations Illumination (Shading) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion

More information

Korrigeringar: An introduction to Global Illumination. Global Illumination. Examples of light transport notation light

Korrigeringar: An introduction to Global Illumination. Global Illumination. Examples of light transport notation light An introduction to Global Illumination Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Korrigeringar: Intel P4 (200): ~42M transistorer Intel P4 EE (2004): 78M

More information

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping Advanced Graphics Path Tracing and Photon Mapping Part 2 Path Tracing and Photon Mapping Importance Sampling Combine importance sampling techniques Reflectance function (diffuse + specular) Light source

More information

Chapter 7 - Light, Materials, Appearance

Chapter 7 - Light, Materials, Appearance Chapter 7 - Light, Materials, Appearance Types of light in nature and in CG Shadows Using lights in CG Illumination models Textures and maps Procedural surface descriptions Literature: E. Angel/D. Shreiner,

More information

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome! INFOGR Computer Graphics J. Bikker - April-July 2015 - Lecture 10: Ground Truth Welcome! Today s Agenda: Limitations of Whitted-style Ray Tracing Monte Carlo Path Tracing INFOGR Lecture 10 Ground Truth

More information

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane Rendering Pipeline Rendering Converting a 3D scene to a 2D image Rendering Light Camera 3D Model View Plane Rendering Converting a 3D scene to a 2D image Basic rendering tasks: Modeling: creating the world

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) CS380: Computer Graphics Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Understand overall algorithm of recursive ray tracing Ray generations Intersection

More information

Photon Mapping. Due: 3/24/05, 11:59 PM

Photon Mapping. Due: 3/24/05, 11:59 PM CS224: Interactive Computer Graphics Photon Mapping Due: 3/24/05, 11:59 PM 1 Math Homework 20 Ray Tracing 20 Photon Emission 10 Russian Roulette 10 Caustics 15 Diffuse interreflection 15 Soft Shadows 10

More information

Global Illumination and the Rendering Equation

Global Illumination and the Rendering Equation CS294-13: Special Topics Lecture #3 Advanced Computer Graphics University of California, Berkeley Handout Date??? Global Illumination and the Rendering Equation Lecture #3: Wednesday, 9 September 2009

More information

Ray Tracing I. Internet Raytracing Competition

Ray Tracing I. Internet Raytracing Competition History Ray Tracing came from the Physics of lens making. The process was that of drawing lines or rays through a glass shape to determine it s lens properties. It is also related to early perspective

More information

Specular reflection. Lighting II. Snell s Law. Refraction at boundary of media

Specular reflection. Lighting II. Snell s Law. Refraction at boundary of media Specular reflection Lighting II CS 465 Lecture 19 Smooth surfaces of pure materials have ideal specular reflection (said this before) Metals (conductors) and dielectrics (insulators) behave differently

More information

Motivation: Monte Carlo Rendering. Sampling and Reconstruction of Visual Appearance. Caustics. Illumination Models. Overview of lecture.

Motivation: Monte Carlo Rendering. Sampling and Reconstruction of Visual Appearance. Caustics. Illumination Models. Overview of lecture. Sampling and Reconstruction of Visual Appearance CSE 74 [Winter 8], Lecture 3 Ravi Ramamoorthi http://www.cs.ucsd.edu/~ravir Motivation: Monte Carlo Rendering Key application area for sampling/reconstruction

More information

Implementation of Bidirectional Ray Tracing Algorithm

Implementation of Bidirectional Ray Tracing Algorithm Implementation of Bidirectional Ray Tracing Algorithm PÉTER DORNBACH jet@inf.bme.hu Technical University of Budapest, Department of Control Engineering and Information Technology, Mûegyetem rkp. 9, 1111

More information

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley Spring 2012 Final CS184 - Foundations of Computer Graphics University of California at Berkeley Write your name HERE: Write your login HERE: Closed book. You may not use any notes or printed/electronic

More information

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye Ray Tracing What was the rendering equation? Motivate & list the terms. Relate the rendering equation to forward ray tracing. Why is forward ray tracing not good for image formation? What is the difference

More information

To Do. Real-Time High Quality Rendering. Motivation for Lecture. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

To Do. Real-Time High Quality Rendering. Motivation for Lecture. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing Real-Time High Quality Rendering CSE 274 [Fall 2015], Lecture 5 Tour of Modern Offline Rendering To Do Project milestone (1-2 pages), final project proposal Due on Oct 27 Please get in touch with me if

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 11794--4400 Tel: (631)632-8450; Fax: (631)632-8334

More information

Recent Advances in Monte Carlo Offline Rendering

Recent Advances in Monte Carlo Offline Rendering CS294-13: Special Topics Lecture #6 Advanced Computer Graphics University of California, Berkeley Monday, 21 September 2009 Recent Advances in Monte Carlo Offline Rendering Lecture #6: Monday, 21 September

More information

Practical Product Importance Sampling for Direct Illumination

Practical Product Importance Sampling for Direct Illumination Eurographics 2008 Practical Product Importance Sampling for Direct Illumination Petrik Clarberg Tomas Akenine-Möller Lund University Sweden This work was presented by Petrik Clarberg at Eurographics 2008

More information

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner) CS4620/5620: Lecture 37 Ray Tracing 1 Announcements Review session Tuesday 7-9, Phillips 101 Posted notes on slerp and perspective-correct texturing Prelim on Thu in B17 at 7:30pm 2 Basic ray tracing Basic

More information

Progressive photon mapping can be interpreted as an estimator that constructs the full paths from camera to light by constantly connecting two fresh

Progressive photon mapping can be interpreted as an estimator that constructs the full paths from camera to light by constantly connecting two fresh 1 Progressive photon mapping can be interpreted as an estimator that constructs the full paths from camera to light by constantly connecting two fresh subpaths. The estimation is a sum, where W_n is the

More information

Lecture 2: Digital Drawing. Computer Graphics and Imaging UC Berkeley CS184/284

Lecture 2: Digital Drawing. Computer Graphics and Imaging UC Berkeley CS184/284 Lecture 2: Digital Drawing Computer Graphics and Imaging UC Berkeley CS184/284 Today: Rasterizing Triangles into Pixels Life of Pi (2012) Drawing Machines CNC Sharpie Drawing Machine Aaron Panone with

More information

Biased Monte Carlo Ray Tracing

Biased Monte Carlo Ray Tracing Biased Monte Carlo Ray Tracing Filtering, Irradiance Caching, and Photon Mapping Henrik Wann Jensen Stanford University May 23, 2002 Unbiased and Consistent Unbiased estimator: E{X} =... Consistent estimator:

More information

distribution ray tracing

distribution ray tracing distribution ray tracing computer graphics distribution ray tracing 2006 fabio pellacini 1 distribution ray tracing use many rays to compute average values over pixel areas, time, area lights, reflected

More information

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics Announcements Assignment 4 will be out later today Problem Set 3 is due today or tomorrow by 9am in my mail box (4 th floor NSH) How are the machines working out? I have a meeting with Peter Lee and Bob

More information

Advanced Ray Tracing

Advanced Ray Tracing Advanced Ray Tracing Thanks to Fredo Durand and Barb Cutler The Ray Tree Ni surface normal Ri reflected ray Li shadow ray Ti transmitted (refracted) ray 51 MIT EECS 6.837, Cutler and Durand 1 Ray Tree

More information

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz Computing Visibility BSP Trees Ray Casting Depth Buffering Quiz Power of Plane Equations We ve gotten a lot of mileage out of one simple equation. Basis for D outcode-clipping Basis for plane-at-a-time

More information

CS5670: Computer Vision

CS5670: Computer Vision CS5670: Computer Vision Noah Snavely Light & Perception Announcements Quiz on Tuesday Project 3 code due Monday, April 17, by 11:59pm artifact due Wednesday, April 19, by 11:59pm Can we determine shape

More information

2017 Summer Course on Optical Oceanography and Ocean Color Remote Sensing. Monte Carlo Simulation

2017 Summer Course on Optical Oceanography and Ocean Color Remote Sensing. Monte Carlo Simulation 2017 Summer Course on Optical Oceanography and Ocean Color Remote Sensing Curtis Mobley Monte Carlo Simulation Delivered at the Darling Marine Center, University of Maine July 2017 Copyright 2017 by Curtis

More information

3D Rendering and Ray Casting

3D Rendering and Ray Casting 3D Rendering and Ray Casting Michael Kazhdan (601.457/657) HB Ch. 13.7, 14.6 FvDFH 15.5, 15.10 Rendering Generate an image from geometric primitives Rendering Geometric Primitives (3D) Raster Image (2D)

More information

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University Ray Tracing CS334 Fall 2013 Daniel G. Aliaga Department of Computer Science Purdue University Ray Casting and Ray Tracing Ray Casting Arthur Appel, started around 1968 Ray Tracing Turner Whitted, started

More information

Monte Carlo Path Tracing. The Rendering Equation

Monte Carlo Path Tracing. The Rendering Equation Monte Carlo Path Tracing Today Path tracing starting from the eye Path tracing starting from the lights Which direction is best? Bidirectional ray tracing Random walks and Markov chains Next Irradiance

More information

Wednesday, 26 January 2005, 14:OO - 17:OO h.

Wednesday, 26 January 2005, 14:OO - 17:OO h. Delft University of Technology Faculty Electrical Engineering, Mathematics, and Computer Science Mekelweg 4, Delft TU Delft Examination for Course IN41 5 1-3D Computer Graphics and Virtual Reality Please

More information

The Rendering Equation & Monte Carlo Ray Tracing

The Rendering Equation & Monte Carlo Ray Tracing Last Time? Local Illumination & Monte Carlo Ray Tracing BRDF Ideal Diffuse Reflectance Ideal Specular Reflectance The Phong Model Radiosity Equation/Matrix Calculating the Form Factors Aj Ai Reading for

More information