01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

Monte Carlo Methods and Statistical Physics
Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.
Kartic Subr, Derek Nowrouzezahrai, Wojciech Jarosz, Jan Kautz and Kenny Mitchell Disney Research, University of Montreal, University College London.
Photorealistic Rendering. Ray tracing v. photorealistic rendering What illumination effects are not captured by ray tracing? What illumination effects.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Scalability with many lights II (row-column sampling, visibity clustering) Miloš Hašan.
Sampling Attila Gyulassy Image Synthesis. Overview Problem Statement Random Number Generators Quasi-Random Number Generation Uniform sampling of Disks,
Monte Carlo Integration Robert Lin April 20, 2004.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
Photon Tracing with Arbitrary Materials Patrick Yau.
Advanced Computer Graphics (Fall 2009) CS 294, Rendering Lecture 5: Monte Carlo Path Tracing Ravi Ramamoorthi
Image processing. Image operations Operations on an image –Linear filtering –Non-linear filtering –Transformations –Noise removal –Segmentation.
Monte Carlo Integration COS 323 Acknowledgment: Tom Funkhouser.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 20: Monte Carlo Path Tracing Ravi Ramamoorthi Acknowledgements.
1 Monte Carlo Global Illumination Brandon Lloyd COMP 238 December 16, 2002.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Monte Carlo Methods in Partial Differential Equations.
Space-Filling DOEs Design of experiments (DOE) for noisy data tend to place points on the boundary of the domain. When the error in the surrogate is due.
10/21/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Terrain Dynamic LOD.
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
Simulation of Random Walk How do we investigate this numerically? Choose the step length to be a=1 Use a computer to generate random numbers r i uniformly.
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 11 Some materials adapted from Prof. Keith E. Gubbins:
02/11/05© 2005 University of Wisconsin Last Time Direct Lighting Light Transport Equation (LTE) Intro.
01/24/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
01/28/05© 2005 University of Wisconsin Last Time Improving Monte Carlo Efficiency.
02/25/05© 2005 University of Wisconsin Last Time Meshing Volume Scattering Radiometry (Adsorption and Emission)
-Global Illumination Techniques
01/29/03© 2003 University of Wisconsin Last Time Radiosity.
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
02/16/05© 2005 University of Wisconsin Last Time Re-using paths –Irradiance Caching –Photon Mapping.
01/21/05© 2005 University of Wisconsin Last Time Course introduction A simple physically-based rendering example.
CSC321: 2011 Introduction to Neural Networks and Machine Learning Lecture 11: Bayesian learning continued Geoffrey Hinton.
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.
Computer graphics & visualization Photon Mapping.
Fourier Analysis of Stochastic Sampling For Assessing Bias and Variance in Integration Kartic Subr, Jan Kautz University College London.
Monte Carlo Methods So far we have discussed Monte Carlo methods based on a uniform distribution of random numbers on the interval [0,1] p(x) = 1 0  x.
Importance Resampling for Global Illumination Justin F. Talbot Master’s Thesis Defense Brigham Young University Provo, UT.
Importance Resampling for Global Illumination Justin Talbot, David Cline, and Parris Egbert Brigham Young University Provo, UT.
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
Duy & Piotr. How to reconstruct a high quality image with the least amount of samples per pixel the least amount of resources And preserving the image.
CS348B Lecture 9Pat Hanrahan, Spring 2005 Overview Earlier lecture Statistical sampling and Monte Carlo integration Last lecture Signal processing view.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
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.
02/12/03© 2003 University of Wisconsin Last Time Intro to Monte-Carlo methods Probability.
Computer Graphics III – Monte Carlo integration Direct illumination
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
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/19/05© 2005 University of Wisconsin CS 779: Rendering Prof Stephen Chenney Spring 2005
Global Illumination (3) Photon Mapping (1). Overview Light Transport Notation Path Tracing Photon Mapping –Photon Tracing –The Photon Map.
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.
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
Distributed Ray Tracing. Can you get this with ray tracing?
Distributed Ray Tracing. Can you get this with ray tracing?
Computer graphics III – Multiple Importance Sampling Jaroslav Křivánek, MFF UK
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Introduction to Monte Carlo Method
© University of Wisconsin, CS559 Fall 2004
© 2005 University of Wisconsin
Path Tracing (some material from University of Wisconsin)
Distributed Ray Tracing
Monte Carlo I Previous lecture Analytical illumination formula
Monte Carlo Rendering Central theme is sampling:
Distributed Ray Tracing
Distributed Ray Tracing
Monte Carlo Path Tracing and Caching Illumination
Monte Carlo Integration
Sampling Plans.
Presentation transcript:

01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities

01/26/05© 2005 University of Wisconsin Today Improving Efficiency with Monte Carlo Integration

01/26/05© 2005 University of Wisconsin Monte Carlo Efficiency We can get an estimate faster (do less work per sample) Or we can get an estimate with lower variance as a function of N Either improves the efficiency of an estimator F:

01/26/05© 2005 University of Wisconsin Ways to Improve Efficiency (PBR Chap. 15) Less work per sample: –Russian Roulette –Splitting Careful sample placement: –Stratified Sampling –Low-discrepancy sequences –Best-Candidate samplers Introducing Bias Importance Sampling

01/26/05© 2005 University of Wisconsin Russian Roulette (PBR 15.1) Say the integrand, f(x), is expensive to compute –It may require tracing rays and evaluating reflectance functions, or it may even require an infinite amount of work For each sample, choose some value q Sample  If  <q, then use a constant c instead of f(x) Otherwise, evaluate the integrand, but weight it Why does it work …

01/26/05© 2005 University of Wisconsin Roulette Math Never decreases variance But can reduce time without increasing variance if only samples with low F are terminated

01/26/05© 2005 University of Wisconsin Choosing q and c Try to base q on the anticipated value of F Integrating the direct contribution of lights requires a shadow ray test If the light is far away or the test ray will hit a low- contribution part of the light, then q should be low The contribution of reflection rays goes down as the ray-tree gets deeper Base q on the depth of the ray tree (the number of reflections so far) Choose c=0 in these cases

01/26/05© 2005 University of Wisconsin Splitting (PBR ) Say you need to compute a multi-dimensional integral –Such as the integral over the area seen by a pixel and the directions to an area light source Say you expect the integral to vary more slowly in one dimension than the other –Incoming illumination is going to vary more rapidly, due to occluders, than over positions within the pixel Choose a value for the slow varying component, and many values for the fast varying component –One ray through the pixel to find the surface point, then many rays to the light

01/26/05© 2005 University of Wisconsin Effects of Splitting Reduces time with little increase in variance The example on the previous slide is extremely common Extreme contrived case: Less contrived case:

01/26/05© 2005 University of Wisconsin Stratified Sampling (PBR Sect 7.3 and ) Consider uniformly sampling inside a square Truly at random (choose random x, random y) will give clumps of points –Uniformly distributed talks about probability, but not the intuitive definition of uniform (like evenly) Instead, break domain into little regions, or strata, and put one sample in each piece –Choose uniformly at random in each strata – jittered sampling

01/26/05© 2005 University of Wisconsin Stratified Example

01/26/05© 2005 University of Wisconsin Effect on Images

01/26/05© 2005 University of Wisconsin Stratification Comments Stratification reduces variance But what if number of samples required is not a product of two reasonable numbers – N=N x N y ? What do you do in multiple dimensions? –The curse of dimensionality gets to you It isn’t always great

01/26/05© 2005 University of Wisconsin Latin Hypercube Sampling Say you want 5 samples in the square Use a 5x5 grid, and place samples in squares s.t. only one sample per row and only one sample per column –Can be done by permuting of rows or columns of identity Performance degrades for increasing numbers of samples –Can get large empty areas

01/26/05© 2005 University of Wisconsin Stratifying Multiple Dimensions Do not attempt to put a sample in every possible multi- dimensional strata For each dimension, stratify independently For multi-dimensional samples, permute strata, then choose 1 st value from every sequence, 2 nd value, etc

01/26/05© 2005 University of Wisconsin Stratification can Fail Can get unlucky, typically by clumping in one dimension

01/26/05© 2005 University of Wisconsin Low-Discrepancy Samplers Deterministic sequences that look random in the more natural sense – noisy –Also guarantees on arrangement Generation beyond scope of class Quasi Monte Carlo: Instead of random samples, use low discrepancy sequences

01/26/05© 2005 University of Wisconsin Best Candidate Sampling Poisson distribution: Uniform distribution with condition that no two points are closer than a minimum distance –Excellent distribution to use, but hard to generate Best-Candidate patterns approximate Poisson distributions New methods along these lines are always being invented

01/26/05© 2005 University of Wisconsin Biased Samplers A sampler is biased if the expected value is not the correct one –Bias is the difference between estimate and desired value Biased estimators for uniform[0,1], with  =-0.5/N+1:

01/26/05© 2005 University of Wisconsin Bias can be Good Even with low sample counts, bias can be good –Variance can be lower, e.g. O(N -2 ) Most image reconstruction filters give biased estimates –Reduces variance and hence apparent noise in image Standard photon map estimator (later) is biased –But result is less noisy

01/26/05© 2005 University of Wisconsin Importance Sampling The function p is called the importance function A wise choice of p, as close as possible to f, can dramatically reduce variance A poor choice can dramatically increase variance Choosing importance functions is a well established art in physically based rendering

01/26/05© 2005 University of Wisconsin Important Function Generalities If you are integrating something like f(x)g(x), it can be helpful to choose p=f or p=g Multiple Importance Sampling lets you combine results from many importance samplers –Generate some samples according to p –Generate some according to q –Form a weighted sum – details in PBR – good when no one importance function handles all cases

01/26/05© 2005 University of Wisconsin Next Time Cameras and Film