© 2005 University of Wisconsin

Slides:



Advertisements
Similar presentations
Computer graphics & visualization Global Illumination Effects.
Advertisements

Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.
Efficient Importance Sampling Techniques for the Photon Map Ingo Wald University of Saarbrücken Alexander Keller University of Kaiserslautern.
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.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Photon Tracing with Arbitrary Materials Patrick Yau.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
Direct Illumination with Lazy Visibility Evaluation David Hart Philip Dutré Donald P. Greenberg Cornell University SIGGRAPH 99.
Global Illumination. Direct Illumination vs. Global Illumination reflected, scattered and focused light (not discreet). physical-based light transport.
02/11/05© 2005 University of Wisconsin Last Time Direct Lighting Light Transport Equation (LTE) Intro.
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.
-Global Illumination Techniques
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.
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
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.
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
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.
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.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
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.
Distributed Ray Tracing. Can you get this with ray tracing?
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
Distributed Ray Tracing. Can you get this with ray tracing?
CS552: Computer Graphics Lecture 33: Illumination and Shading.
11/29/01CS 559, Fall 2001 Today Photorealistic rendering Algorithms for producing high-quality images Ways of deciding which algorithm for use.
Advanced Computer Graphics
© University of Wisconsin, CS559 Spring 2004
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
ATCM 6317 Procedural Animation
© 2002 University of Wisconsin
© 2003 University of Wisconsin
© University of Wisconsin, CS559 Fall 2004
The Rendering Equation
(c) 2002 University of Wisconsin
Path Tracing (some material from University of Wisconsin)
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
© 2003 University of Wisconsin
(c) 2002 University of Wisconsin
© 2003 University of Wisconsin
Efficient Importance Sampling Techniques for the Photon Map
Monte Carlo I Previous lecture Analytical illumination formula
Monte Carlo Path Tracing
Monte Carlo Rendering Central theme is sampling:
CS5500 Computer Graphics May 29, 2006
OPTICS III, IV: Global Illumination
Metropolis Light Transit
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Distributed Ray Tracing
Monte Carlo Path Tracing and Caching Illumination
Photon Density Estimation using Multiple Importance Sampling
Presentation transcript:

© 2005 University of Wisconsin Last Time More LTE Path Tracing 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Today Re-using paths Irradiance Caching Photon Mapping 02/14/05 © 2005 University of Wisconsin

Pure Path Tracing: the Good Path tracing concentrates on important paths only Those that hit the eye Those from bright emitters/reflectors No need for meshing General surfaces – only requires ray intersections Unbiased estimates – at any point, the expected value is correct (although variance might be high) 02/14/05 © 2005 University of Wisconsin

Pure Path Tracing: the Bad It treats every pixel independently, and every point on every surface independently Good for specularities, which vary quickly over surfaces Bad for diffuse illumination, which varies very slowly over surfaces (except at sharp shadow boundaries) Effort is wasted getting good estimates for Direct illumination, which is responsible for the most obvious illumination discontinuities (edges) Diffuse illumination, which varies slowly over a surface 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Path Re-Use Consider a diffuse surface for which we want an outgoing radiance estimate Typically, we would cast more rays to get it, but what if we already know what happened at a nearby spot? 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Diffuse Dependency Diffuse reflectance depends only on the irradiance at the surface point The total amount of light arriving – incoming direction is irrelevant This tends to vary slowly over a surface Directional light gives constant irradiance over a planar surface Point light varies only with the cosine of the angle – slowly What leads to sharp changes? 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Basic Idea Store information about previous paths When the irradiance at a point is required, construct irradiance estimates from the stored data Variants on what you store and how the estimate is computed, as we’ll see The sub-problems are: How do you get the samples in the first place? How to you store them? How do you construct the estimate? 02/14/05 © 2005 University of Wisconsin

Irradiance Caching (PBR 16.4) Start with a basic path tracing algorithm, but … Maintain a spatial data structure storing examples of irradiance arriving at points If you hit a diffuse surface, try to build an estimate of irradiance at that point – but always compute direct lighting explicitly If the estimate is good, use it If not, use path tracing to estimate the irradiance and store it Some questions: How do we store the samples? How do we decide whether to use an old value, or compute a new one? 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Storing Samples It doesn’t much matter how you store the samples Data structure must support insertion of new samples, and search for nearby samples, indexed on position The RADIANCE system is an implementation of Irradiance Caching, and it uses Octrees Question of precisely what to store: Irradiance (how we compute this comes next …) The location The normal at that location (more later …) The distance that we went to find nearby surfaces (more later …) 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Computing Irradiance Use standard Monte Carlo estimator for Irradiance Use path tracing to get samples of the incoming radiance – just like estimating incoming radiance to a pixel Stratify outgoing directions according to cosine weighted distribution 02/14/05 © 2005 University of Wisconsin

Quality of Existing Data The quality of an estimate is based on geometric considerations Examine: Surface curvature between the required point and the existing data diffuse illumination changes with curvature Brightness and the distance to other surfaces Influences how fast incoming illumination can change Assume extreme variation in incoming radiance If existing values are used, weigh contribution by quality 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Geometric Factors Small distance, but maybe big change in irradiance Points and normals should be close Distance to nearby surfaces should be large – corners lead to fast changes in irradiance 02/14/05 © 2005 University of Wisconsin

Locations of Estimates PBR Fig 16.10 02/14/05 © 2005 University of Wisconsin

Trading Variance for Bias Irradiance Caching is a biased algorithm – there is no guarantee it computes the right result Where does the error come from? PBR Fig 16.9 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Implementation Notes In a full system, choices must be made as to what constitutes a diffuse surface PBRT assumes anything that isn’t specular Error goes up as reflectance varies further from diffuse Specular bounces are traced through to a diffuse surface Have to be careful not to double count, but not too much of a problem Also have to make sure that direct lighting is not double counted Must account for transmission and reflection Separate irradiance estimates for both sides of a surface 02/14/05 © 2005 University of Wisconsin

Irradiance Caching Failure Modes? Under what circumstances will irradiance caching fail? What direction does it trace rays from? What does it assume about BSDFs? The commercial-quality implementation of this algorithm allows users to mark “secondary light sources” The outgoing radiance field of these surfaces is estimated in a pre-process, then they are treated as light sources 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Particle Tracing Some sub-paths are best sampled from the light Anything where light is focused – caustics Situations where most of the light’s energy goes to a small region of the world We can fill our cache of radiance values by sampling from the light – particle tracing Several variants … 02/14/05 © 2005 University of Wisconsin

Basic Particle Tracing Send out packets from light sources, distributed according to a particular model (eg spotlight, area light, …) Store some portion of the energy at each surface, on a predefined mesh – typically use textures for storage Trace eye rays to render final image, or render textures directly 02/14/05 © 2005 University of Wisconsin

Adaptive Radiosity Textures Heckbert 90 Store intensity in textures attached to the surfaces Works for anything with reasonable texture coordinates Texture is stored as a quadtree, and adapted Shoot from lights to add intensity to textures Also shoot from bright surfaces to get diffuse-diffuse transport Eye ray trace to render, with direct lighting operation at each visible pixel 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Photon Mapping A very well thought out version of particle tracing Break LTE into several components LDS*E and LS*E paths LS*DS*E paths L(S|D)*DDS*E paths Use a different technique for each component Note that S*E part is common – always start by tracing rays from the eye through specular bounces to a diffuse surface (or a light) This is the “gather” operation for a pixel 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Gathering Phase For each pixel cast ray and get hit point Compute three contributions Direct illumination (and shadows) Caustic illumination from a caustic map Indirect illumination: sample reflection directions and estimate incoming power from a global map 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Why Gather? PBR Fig 16.17 Photon map lookup at first hit Lookup for indirect only 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin What’s in the Map? Photon maps store Position Incoming direction Incoming proportion of light’s power (radiant flux, ) Optional: store a normal Estimation from map: Find nearest neighbors (ignore those with very dissimilar normal) Compute estimate of outgoing radiance 02/14/05 © 2005 University of Wisconsin

Building the Photon Maps Randomly sample paths from the light Randomly choose a light/position/direction, cast a ray Store a sample where it hits A sample is: position, direction, weight Sample a direction from the hit pt’s BRDF, cast a ray Degrade weight according to BRDF Repeat using Russian Roulette If the path only experiences specular bounces form the light, store in the caustic map, otherwise in the global map 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Photon Locations Doesn’t tell you power – not all photons are equal PBR Fig 16.14 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Effects of Gather PBR Fig 16.20 Direct lighting Photon map directly Photon map indirect 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Caustic Example PBR Fig 16.18 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Sample Image © Henrik wan Jensen 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin More Impressive © Henrik wan Jensen 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Photon Map Summary Combines various techniques depending on the situation Produces very good results reasonably efficiently Geometric problems can still cause bleeding Sampling from the light can cause problems if most of the light’s power fails to reach the image 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Photon Map Failure 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin With Better Sampling 02/14/05 © 2005 University of Wisconsin

© 2005 University of Wisconsin Next Time Radiosity 02/14/05 © 2005 University of Wisconsin