Monte Carlo Rendering Central theme is sampling:

Slides:



Advertisements
Similar presentations
Photorealistic Rendering. Ray tracing v. photorealistic rendering What illumination effects are not captured by ray tracing? What illumination effects.
Advertisements

Christian Lauterbach COMP 770, 2/11/2009
Monte Carlo Integration Robert Lin April 20, 2004.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
Advanced Computer Graphics (Fall 2009) CS 294, Rendering Lecture 5: Monte Carlo Path Tracing Ravi Ramamoorthi
Parallelizing Raytracing Gillian Smith CMPE 220 February 19 th, 2008.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 20: Monte Carlo Path Tracing Ravi Ramamoorthi Acknowledgements.
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Global Illumination Jian Huang, CS 594, Fall 2002 This set of slides reference text book and the course note of Dutre et. al on SIGGRAPH 2001.
01/24/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
Today More raytracing stuff –Soft shadows and anti-aliasing More rendering methods –The text book is good on this –I’ll be using images from the CDROM.
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
1 Lesson 3: Choosing from distributions Theory: LLN and Central Limit Theorem Theory: LLN and Central Limit Theorem Choosing from distributions Choosing.
-Global Illumination Techniques
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Distribution Ray Tracing.
Ray Tracing Sang Il Park SEjong University With lots of slides stolen from Jehee Lee, Doug James, Steve Seitz, Shree Nayar, Alexei Efros, Fredo Durand.
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
Ray Tracing Jian Huang, CS 594, Fall, 2002 This set of slides are used at Ohio State by Prof. Roger Crawfis.
02/10/03© 2003 University of Wisconsin Last Time Participating Media Assignment 2 –A solution program now exists, so you can preview what your solution.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
Fourier Depth of Field Cyril Soler, Kartic Subr, Frédo Durand, Nicolas Holzschuch, François Sillion INRIA, UC Irvine, MIT CSAIL.
Pure Path Tracing: the Good and the Bad Path tracing concentrates on important paths only –Those that hit the eye –Those from bright emitters/reflectors.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
02/12/03© 2003 University of Wisconsin Last Time Intro to Monte-Carlo methods Probability.
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
Slide 1Lastra, 2/14/2016 Monte-Carlo Methods. Slide 2Lastra, 2/14/2016 Topics Kajiya’s paper –Showed that existing rendering methods are approximations.
01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
02/9/05© 2005 University of Wisconsin Last Time Lights Next assignment – Implement Kubelka-Munk as a BSDF.
Distributed Ray Tracing. Can you get this with ray tracing?
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Distributed Ray Tracing. Can you get this with ray tracing?
11/29/01CS 559, Fall 2001 Today Photorealistic rendering Algorithms for producing high-quality images Ways of deciding which algorithm for use.
Global Illumination (3) Cone Tracing / Distributed Ray Tracing.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Basic Ray Tracing CMSC 435/634.
3D Rendering 2016, Fall.
Lesson 8: Basic Monte Carlo integration
Introduction to Monte Carlo Method
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Basic simulation methodology
Monte Carlo Integration
Sampling and Reconstruction of Visual Appearance
4. Numerical Integration
Sampling and Reconstruction of Visual Appearance
Distributed Ray Tracing
3D Graphics Rendering PPT By Ricardo Veguilla.
Metropolis light transport
The distribution function F(x)
© University of Wisconsin, CS559 Fall 2004
© 2005 University of Wisconsin
(c) 2002 University of Wisconsin
Distribution Ray Tracing
Path Tracing (some material from University of Wisconsin)
Monte Carol Integration
Mean & Variance of a Distribution
Distributed Ray Tracing
Distributed Ray Tracing
(c) 2002 University of Wisconsin
Image synthesis using classical optics
Monte Carlo I Previous lecture Analytical illumination formula
CS5500 Computer Graphics May 29, 2006
Introduction to Ray Tracing
Distributed Ray Tracing
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Distributed Ray Tracing
Monte Carlo Integration
Photon Density Estimation using Multiple Importance Sampling
Presentation transcript:

Monte Carlo Rendering Central theme is sampling: Determine what happens at a set of discrete points, and extrapolate from there Central algorithm is ray tracing Rays from the eye or the light Theoretical basis is probability theory The study of random events

Random Variables A random variable, x Takes values from some domain,  Has an associated probability density function, p(x) A probability density function, p(x) Is positive over the domain,  “Integrates” to 1 over  :

Expected Value The expected value of a random variable is defined as: The expected value of a function is defined as:

Variance and Standard Deviation The variance of a random variable is defined as: The standard deviation of a random variable is defined as the square root of its variance:

Sampling A process samples according to the distribution p(x) if it randomly chooses a value for x such that: Weak Law of Large Numbers: If xi are independent samples from p(x), then:

Algorithms for Sampling Psuedo-random number generators give independent samples from the uniform distribution on [0,1), p(x)=1 Transformation method: take random samples from the uniform distribution and convert them to samples from another Rejection sampling: sample from a different distribution, but reject some samples

Distribution Functions Assume a density function f(y) defined on [a,b] Define the probability distribution function, or cumulative distribution function, as: Monotonically increasing function with F(a)=0 and F(b)=1

Transformation Method for 1D Generate zi uniform on [0,1) Compute Then the xi are distributed according to f(x) To apply, must be able to compute and invert distribution function F

Multi-Dimensional Transformation Assume density function f(x,y) defined on [a,b][c,d] Distribution function: Sample xi according to: Sample yi according to

Rejection Sampling Say we wish to sample xi according to f(x) Find a function g(x) such that g(x)>f(x) for all x in the domain Geometric interpretation: generate sample under g, and accept if also under f Transform a weighted uniform sample according to xi=G-1(z), and generate yi uniform on [0,g(xi)] Keep the sample if yi<f(x), otherwise reject

Important Example Consider uniformly sampling a point on a sphere Uniformly means that the probability that the point is in a region depends only on the area of the region, not its location on the sphere Generate points inside a cube [-1,1]x[-1,1]x[-1,1] Reject if the point lies outside the sphere Push accepted point onto surface Fraction of pts accepted: /6 Bad strategy in higher dimensions

Estimating Integrals Say we wish to estimate Write h=gf, where f is something you choose If we sample xi according to f, then:

Standard Deviation of the Estimate Expected error in the estimate after n samples is measured by the standard deviation of the estimate: Note that error goes down with This technique is called importance sampling f should be as close as possible to g Same principle for higher dimensional integrals

Example: Form Factor Integrals We wish to estimate Define Sample from f by sampling xi uniformly on Pi and yi uniformly on Pj Estimate is

Basic Ray Tracing For each pixel in the image Shoot a ray from the eye through the pixel, to determine what is seen through that pixel, and what its intensity is Intensity takes contributions from: Direct illumination (shadow rays, diffuse, Phong) Reflected rays (recurse on reflected direction) Transmitted rays (recurse of refraction direction)

Casting Rays Given a ray, Determine the first surface hit by the ray (intersection with lowest t) Algorithms exist for most representations of surfaces, including splines, fractals, height fields, CSG, implicit surfaces… Hence, algorithms based on ray tracing can be very general with respect to the geometry

Distributed Ray Tracing Cook, Porter, Carpenter 1984 Addresses the inability of ray tracing to capture: non-ideal reflection/transmission soft shadows motion blur depth of field Basic idea: Cast more than one ray for each pixel, for each reflection, for each frame… Rays are distributed, not the algorithm. Should probably be called distribution ray tracing.

Specific Cases Sample several directions around the reflected direction to get non-ideal reflection, and specularities Send multiple rays to area light sources to get soft shadows Cast multiple rays per pixel, spread in time, to get motion blur Cast multiple rays per pixel, through different lens paths, to get depth-of-field

What’s Good? What’s Bad? Easy to implement - standard ray tracer plus simple sampling Which L(D|S)*E paths does it get? Which previous method could it be used with to good effect?