02/11/05© 2005 University of Wisconsin Last Time Direct Lighting Light Transport Equation (LTE) Intro.

Slides:



Advertisements
Similar presentations
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Advertisements

Anton S. Kaplanyan Karlsruhe Institute of Technology, Germany Path Space Regularization Framework.
Photorealistic Rendering. Ray tracing v. photorealistic rendering What illumination effects are not captured by ray tracing? What illumination effects.
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lectures 18, 19: Monte Carlo Integration Ravi Ramamoorthi Acknowledgements.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Photon Tracing with Arbitrary Materials Patrick Yau.
Advanced Computer Graphics (Fall 2009) CS 294, Rendering Lecture 5: Monte Carlo Path Tracing Ravi Ramamoorthi
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
Rendering General BSDFs and BSSDFs Randy Rauwendaal.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 20: Monte Carlo Path Tracing Ravi Ramamoorthi Acknowledgements.
EGWR 2000 Metropolis Light Transport for Participating Media Mark Pauly Thomas KolligAlexander Keller ETH ZürichUniversity of Kaiserslautern.
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.
© Machiraju/Möller Rendering Equation Unbiased MC Methods CMPT 461/770 Advanced Computer Graphics Torsten Möller.
01/24/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
Selected Topics in Global Illumination Computation Jaroslav Křivánek Charles University, Prague
01/28/05© 2005 University of Wisconsin Last Time Improving Monte Carlo Efficiency.
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.
02/25/05© 2005 University of Wisconsin Last Time Meshing Volume Scattering Radiometry (Adsorption and Emission)
-Global Illumination Techniques
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.
02/18/05© 2005 University of Wisconsin Last Time Radiosity –Converting the LTE into the radiosity equation –Solving with Gauss-Seidel relaxation –Form.
01/21/05© 2005 University of Wisconsin Last Time Course introduction A simple physically-based rendering example.
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.
02/05/03© 2003 University of Wisconsin Last Time Importance Better Form Factors Meshing.
Computer Graphics Global Illumination: Photon Mapping, Participating Media Lecture 12 Taku Komura.
Path Integral Formulation of Light Transport
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
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.
On robust Monte Carlo algorithms for multi-pass global illumination Frank Suykens – De Laet 17 September 2002.
Monte-Carlo Ray Tracing and
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.
02/2/05© 2005 University of Wisconsin Last Time Reflectance part 1 –Radiometry –Lambertian –Specular.
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
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.
Monte Carlo Path Tracing
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell Photon Mapping and Irradiance Caching.
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.
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.
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
PATH INTEGRAL FORMULATION OF LIGHT TRANSPORT Jaroslav Křivánek Charles University in Prague
Distributed Ray Tracing. Can you get this with ray tracing?
Computer graphics III – Multiple Importance Sampling Jaroslav Křivánek, MFF UK
11/29/01CS 559, Fall 2001 Today Photorealistic rendering Algorithms for producing high-quality images Ways of deciding which algorithm for use.
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Sampling and Reconstruction of Visual Appearance
© 2002 University of Wisconsin
© University of Wisconsin, CS559 Fall 2004
The Rendering Equation
© 2005 University of Wisconsin
(c) 2002 University of Wisconsin
Path Tracing (some material from University of Wisconsin)
(c) 2002 University of Wisconsin
Monte Carlo I Previous lecture Analytical illumination formula
Monte Carlo Path Tracing
Monte Carlo Rendering Central theme is sampling:
Metropolis Light Transport for Participating Media
CS5500 Computer Graphics May 29, 2006
Metropolis Light Transit
Monte Carlo Path Tracing and Caching Illumination
Presentation transcript:

02/11/05© 2005 University of Wisconsin Last Time Direct Lighting Light Transport Equation (LTE) Intro

02/11/05© 2005 University of Wisconsin Today Path Tracing

02/11/05© 2005 University of Wisconsin Light Transport Equation (Sect 16.2) Power leaving is power emitted plus incoming power that is scattered The trace operation, t(p,  ) traces a ray and finds the first surface seen There are many variants on this equation –Mostly related to changing domain of integration

02/11/05© 2005 University of Wisconsin Interior of a Sphere All points emit a constant amount, and also have diffuse reflectance Symmetric, so all radiance leaving surface pts is the same

02/11/05© 2005 University of Wisconsin Another view … Repeatedly substitute LHS into RHS: There is a physical interpretation to this: –L e : no bounces, paths of length 1 –  hd L e : 1 bounce, paths of length 2 –…

02/11/05© 2005 University of Wisconsin Sampling the LTE over Directions The integral is over directions (solid angle measure) To sample this, we would start at the eye and choose directions based on the BSDF –See what we hit with the trace operator –Probabilities would be based on solid angle measure Some algorithms use this formulation Others use the surface area form …

02/11/05© 2005 University of Wisconsin Point-to-Point Definitions Switch definitions to point-to-point form:  ’’

02/11/05© 2005 University of Wisconsin LTE Over Area We can switch domains to be over surface area –Need another cos  /r 2 term to switch measure –Need a visibility term to make sure we only include points that can see each other V=1 iff the points can see each other, otherwise 0 To solve this, we sample points on surfaces –Express probabilities in terms of area measures

02/11/05© 2005 University of Wisconsin The Geometry Term Simplifies the equations significantly, but don’t forget it’s where much of the complexity lies Note this term is defined for any two points in the scene, but for most pairs in most scenes it will be 0 due to the visibility term

02/11/05© 2005 University of Wisconsin Expanding the LTE We can substitute the LHS into the integral to expand this equation –Mathematically, it’s a Neumann expansion of a linear operator One step:

02/11/05© 2005 University of Wisconsin Contributions of Paths to Length 3 p0p0 p1p1 p0p0 p2p2 Le(p1p0)Le(p1p0) Le(p2p1)Le(p2p1) p1p1 G(p2p1)G(p2p1)f(p 2  p 1  p 0 ) p0p0 p3p3 Le(p3p2)Le(p3p2) p1p1 G(p2p1)G(p2p1) p2p2 G(p3p2)G(p3p2)f(p 3  p 2  p 1 ) Every extra bounce adds another reflectance/geometry term Total radiance to p 0 is the sum over all paths of all lengths

02/11/05© 2005 University of Wisconsin Infinite Expansion Define to be the path from a light to p 0 with i+1 vertices p0p0 p3p3 Le(p3p2)Le(p3p2) p1p1 G(p2p1)G(p2p1)f(p 2  p 1  p 0 ) p2p2 G(p3p2)G(p3p2)f(p 3  p 2  p 1 )

02/11/05© 2005 University of Wisconsin Computing Images We need one more equation – to convert the radiance into a pixel value, or any other measurement Consider a pixel j, for which we want the value, I j W e is the measurement function, which computes the ray’s contribution to pixel j –It includes the pixel filter and something to confirm that the ray actually makes it to the pixel

02/11/05© 2005 University of Wisconsin Measurement Functions We can define different measurement functions for different situations –For instance, with depth of field, the measurement function would take into account the aperture and lens system –Or, for precomputing illumination for later real-time rendering, the measurement function would integrate light arriving at a triangle in the scene –The latter is a real application – building light maps for games For the case of rays to the eye, W e is the visual importance of the path

02/11/05© 2005 University of Wisconsin Monte Carlo Integration We want to evaluate the integral How?

02/11/05© 2005 University of Wisconsin Conceptually We sample paths, somehow –Each path has a value according to the integrand –Each path has some probability associated with it –We evaluate the Monte Carlo estimator Some trickiness with sum of integrals, but falls out nicely The problem is, how do we sample paths? –There is an infinite sum – do we need to compute infinite length paths? –How do we make sure that the paths we sample are important? Have high probability of choosing paths with high contributions

02/11/05© 2005 University of Wisconsin Path Tracing (PBR 16.3) 1.Start with a ray sample through a pixel 2.If you hit a light, stop and return the radiance a)This is a sample of a length 2 path 3.If not a specular surface a)Do a direct lighting computation (sample 1 light) – this is a length 3 path b)Add it’s contribution to the image 4.Sampling an outgoing direction according to the BSDF, cast a ray 5.Go to step 2, but now the path length is one longer 6.Keep going, creating longer and longer paths…

02/11/05© 2005 University of Wisconsin Infinite paths? We can’t go on forever, path throughput gets smaller and smaller Russian Roulette: –At each step, before casting the next ray, make a random choice to stop: stop with probability q i –If you decide not to stop, weight new ray’s contribution by 1/(1- q i ) –Eventually, one of the random choices will say stop, particularly if you base the choice on the throughput to this point This is an essential technique in any algorithm that traces paths and aims to be unbiased

02/11/05© 2005 University of Wisconsin Stratification? It is good to stratify the sampling of the BRDF and the lights But the benefits of this go down with increasing path length The PBRT implementation stratifies the first three bounces, but not the rest

02/11/05© 2005 University of Wisconsin Path Tracing Results 1024 samples per pixel

02/11/05© 2005 University of Wisconsin Noisy with Low Sampling 8 samples per pixel

02/11/05© 2005 University of Wisconsin Path Tracing Analysis Arbitrary geometry and BSDFs –No need for surface parameterizations Doesn’t waste time on things that aren’t visible Unlike ray tracing, spends equal time on all path lengths (ray tracing spends more time on longer paths) Downsides: –All the decisions are local – based on BSDF at hit point –What information is missing? –Does not share information from different ray-trees to build better paths

02/11/05© 2005 University of Wisconsin Failure Mode

02/11/05© 2005 University of Wisconsin Bi-Directional Path Tracing Veach 94; Lafortune and Willems 94 Build a path by working from the eye and the light and join in the middle Don’t just look at overall path, also weigh contributions from all sub- paths: p1p1 p2p2 p3p3 p 4 Light

02/11/05© 2005 University of Wisconsin Bi-Directional Optimizations After constructing paths, throw away last link to the light –Then use direct lighting integrator to compute incoming radiance at path endpoints Use multiple importance sampling (last lecture) to weight each path’s contribution We would really appreciate it if someone implemented this for their project

02/11/05© 2005 University of Wisconsin Bi-Directional Analysis Advantages: –Each ray cast contributes to many paths –Building from both ends can catch difficult cases All specular paths Caustics –Extends to participating media (anisotropic, heterogeneous) Disadvantages: –Still using lots of effort to catch slow varying diffuse components –May not sample difficult to find paths

02/11/05© 2005 University of Wisconsin Metropolis Light Transport Other algorithms generate independent samples –Easy to control bias Metropolis algorithms generate a sequence of paths where each path can depend on the previous one For each sample: –Propose a new candidate depending on the previous sample –Choose to accept or reject according to a computed probability (if reject, re-use the old sample) Can prove the estimates for pixel intensities are correct

02/11/05© 2005 University of Wisconsin Metropolis Proposal Strategies Task: Given the previous sample, generate a new one –Should be very different, but should also be good Methods: –Randomly chop out some part of the path and replace it with a new piece –Randomly perturb a vertex on the path –Less randomly change the pixel that is affected –Other choices possible

02/11/05© 2005 University of Wisconsin Light Through Ripples

02/11/05© 2005 University of Wisconsin Light Through Ripples (Path tracing)

02/11/05© 2005 University of Wisconsin Metropolis: Analysis Can give unbiased estimates of difficult scenarios: –Light through a crack, almost impossible any other way –Caustics from light reflecting off the bottom of a wavy pool Hard to implement – but we have an implementation for PBRT –The details of computing probabilities are difficult –Several optimizations are required for good results Easy to coarsely parallelize But, still computes diffuse illumination on a per point basis

02/11/05© 2005 University of Wisconsin One more scene Metropolis still has trouble in one situation –Spot the error in these images

02/11/05© 2005 University of Wisconsin Next Time Irradiance Caching Photon Mapping