Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.

Slides:



Advertisements
Similar presentations
Lecture 14 Illumination II – Global Models
Advertisements

Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.
Advanced Computer Graphics
Photorealistic Rendering. Ray tracing v. photorealistic rendering What illumination effects are not captured by ray tracing? What illumination effects.
The Radiance Equation Mel Slater. Outline Introduction Light Simplifying Assumptions Radiance Reflectance The Radiance Equation Traditional Rendering.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Light Issues in Computer Graphics Presented by Saleema Amershi.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Christian Lauterbach COMP 770, 2/11/2009
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
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
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.
Computer Graphics (Spring 2008) COMS 4160, Lecture 22: Global Illumination
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Direct Illumination with Lazy Visibility Evaluation David Hart Philip Dutré Donald P. Greenberg Cornell University SIGGRAPH 99.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
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.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
Presentation by Dr. David Cline Oklahoma State University
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
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Computer graphics & visualization Photon Mapping.
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.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity 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.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
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.
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.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
1. Ray Casting Surface intersection Visible surface detection Ray Tracing Bounce the ray Collecting intensity Technique for global reflection and transmission.
Global Illumination (3) Photon Mapping (1). Overview Light Transport Notation Path Tracing Photon Mapping –Photon Tracing –The Photon Map.
RENDERING : Global Illumination
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
Distributed Ray Tracing. Can you get this with ray tracing?
Distributed Ray Tracing. Can you get this with ray tracing?
CS552: Computer Graphics Lecture 33: Illumination and Shading.
CS552: Computer Graphics Lecture 36: Ray Tracing.
Advanced Computer Graphics
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
© 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
Efficient Importance Sampling Techniques for the Photon Map
Foundations of Computer Graphics (Spring 2012)
Distributed Ray Tracing
Photon Density Estimation using Multiple Importance Sampling
Presentation transcript:

Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology

2 Indirect Illumination BRDF Sampling  The choice of PDF When the diffuse part of the BRDF is sampled with p 1 (Ψ), the obvious choice is to sample according to the cosine distribution. The glossy part can either be sampled according to the cosine distribution or proportional to the cosine lobe cos n (Ψ,Θ s ), centered around Θ s.  The choice of q 1, q 2 and q 3 also has a significant influence on the variance of the estimator. In principle, any set of values provides an unbiased estimator. But choosing these values carefully has an impact on the final result.

3 Indirect Illumination BRDF Sampling  The choice of q 1, q 2 and q 3 also has a significant influence on the variance of the estimator. A good choice is to pick these values proportional to the reflected energy in the different modes.  These values can be computed by integrating the reflected energy for an incident direction along the normal N x on the surface:

4 Indirect Illumination Incident Radiance Field Sampling  Sample a direction Ψ according to the incident radiance values L r (x<- Ψ).  Since this incident radiance is generally unknown when we want to compute L indirect (x- >Θ), an adaptive technique needs to be used. An approximation to L r (x<-Ψ) is built during the algorithm and then this approximation is used to sample direction Ψ i.

5 Indirect Illumination Area Sampling  Sampling the hemisphere is the most straightforward way to compute the indirect illumination integral. For each sampled direction, a ray has to be cast to determine the closest visible point.  This is a costly operation.  But there will be no noise in the final image due to failed visibility checks.  By writing the indirect illumination as an integral over all surfaces in the scene, an estimator can be constructed by sampling surface points. 

6 Indirect Illumination Area Sampling The corresponding estimator when using a PDF p(y) is  By sampling areas, the visibility function V(x,y i ) needs to be evaluated as part of the estimator. When sampling the hemisphere, the visibility is hidden in the ray-casting function for finding the closest visible point in each direction.

7 Indirect Illumination Area Sampling  Putting the visibility in the estimator increases the variance for an equal number of samples.

8 Indirect Illumination Putting it All Together  All algorithms are in place to build a full global illumination renderer using stochastic path tracing.  The efficiency and accuracy of the complete algorithm will be determined by Number of viewing rays per pixel Direct Illumination Indirect illumination

9 Indirect Illumination Putting it All Together  Number of viewing rays per pixel A higher number of viewing rays eliminates aliasing and decreases noise.  Direct Illumination For direct illumination, a number of choices are necessary that will determine the overall efficiency  The total number of shadow rays N d cast from each point x.  How a single light source is selected from among all the available light sources for each shadow ray.  The distribution of the shadow ray over the area of a single light source.

10 Indirect Illumination Putting it All Together  Indirect Illumination The indirect illumination component is usually implemented using hemisphere sampling.  Number of indirect illumination rays N i distributed over the hemisphere Ω x.  Exact distribution of these rays over the hemisphere (uniform, cosine, …)  Absorption probabilities for Russian roulette in order to stop the recursion

11 Indirect Illumination Putting it All Together

12 Indirect Illumination Putting it All Together  It is obvious that the more rays we cast at each of the different choice points, the more accurate the solution will be.  The better we make use of importance sampling, the better the final image and the less objectionable noise there will be.  The interesting question is.. When given a total number of rays one can cast per pixel, how should they best be distributed to each a maximum level of accuracy for the full global illumination solution?

13 Indirect Illumination Putting it All Together  The interesting question is.. When given a total number of rays one can cast per pixel, how should they best be distributed to each a maximum level of accuracy for the full global illumination solution? It is still very much an open problem in global illumination algorithms. There are no hard and fast rules. It is generally accepted that branching out too much (recursively generate multiple rays at every surface point) at all levels of the tree is less efficient. Indeed, progressively more rays will be cast at each deeper level, while at the same time, the contribution of each of those individual rays to the final radiance value of the pixel will diminish.

14 Indirect Illumination Classic Ray Tracing  Classic ray tracing, or Whitted-style ray tracing, is an often-used technique for computing photorealistic pictures.  However, it does not compute a full solution to the rendering equation.  A classic ray-tracing algorithm usually computes the light transport components when computing an estimator for the radiance L(x->Θ) Shadows Reflections and refractions

15 Indirect Illumination Classic Ray Tracing  Shadows Shadows are computed in the same way as direct illumination. However, when using point light sources, care has to be taken that the correct radiometric properties are still being used.  Reflections and refractions This is the only indirect illumination component present. Instead of sampling the entire hemisphere to look for incident illumination at x, only two interesting directions are explicitly sampled:  The perfect specular direction  The perfect refracted ray in case the surface is transparent.

16 Indirect Illumination Classic Ray Tracing only computes a small selected subset of the indirect illumination and is not able to deal with diffuse inter-reflections, caustics, etc.

17 Light Tracing Stochastic ray tracing is derived from a Monte Carlo evaluation of the rendering equation.  The resulting algorithm traces paths through the scene, starting at the point visible through a pixel and through recursion of shadow rays, these paths reach the light sources, upon which a contribution to the radiance value to be computed is found. This tracing of rays from the eye to the light sources looks unnatural since light travels the other way.

18 Light Tracing Light particles originate at the light source and finally hit the film surface or the human eye where they are recorded and added to the measured intensity. Some light tracing algorithms are introduced.

19 Light Tracing The basic light-tracing algorithm evaluates the potential or importance equation for a single pixel. The importance equation, the dual of the rendering equation, is given by

20 Light Tracing The accompanying measurement equation for a single pixel is The light-tracing algorithm then proceeds as follows:  The measurement equation will be evaluated using Monte Carlo integration. Points x i and direction Θ i on the light sources are generated for which the importance W(x->Θ) will be evaluated. This will finally lead to an estimator for the flux through a pixel.

21 Light Tracing The light-tracing algorithm then proceeds as follows:  Evaluating the importance W(x->Θ) requires a Monte Carlo integration of the importance equation. This evaluation is very similar to the evaluation of the rendering equation in stochastic ray-tracing algorithms. The same sampling schemes (hemisphere, area, BRDF…) can be used.

22 Light Tracing The light-tracing algorithm then proceeds as follows:  Send a contribution ray from each surface point along a light path to the eye of the camera and check whether it passes through the pixel under consideration. If this is the case, a contribution to the pixel is recorded.

23 Light Tracing The light-tracing algorithm then proceeds as follows:

24 Light Tracing

25 Light Tracing The algorithm outlined above is rather inefficient.  The whole algorithm has to be repeated for each individual pixel. It is clear that all pixels can be processed in parallel:  If a contribution ray passes through any pixel, a contribution to that specific pixel is then recorded. Thus, the image will form gradually, not by sequentially completing pixels as was the case in the stochastic ray-tracing algorithm, but by accumulating the contributions over the whole image plane.

26 Light Tracing vs. Ray Tracing Stochastic light tracing and ray tracing are dual algorithms and solve the same transport problem.  The camera acts as a source of importance during light tracing.  The light sources are the source of radiance in stochastic ray tracing. Shadow rays and contribution rays are each other’s dual mechanism for optimizing the computations of final flux through a pixel. It is generally accepted that stochastic ray tracing will perform better.

27 Light Tracing vs. Ray Tracing Image size versus scene size  If the image only shows a very small part of the scene, it is to be expected that many particles shot from the light sources during light tracing will end up in parts of the scene that are only of marginal importance to the light transport relevant for the image.  Stochastic ray tracing will perform better. The radiance values to be computed are driven by the position of the camera and individual pixels. We can expect less work to be wasted on computing irrelevant transport paths.

28 Light Tracing vs. Ray Tracing Nature of the transport paths  The Shadow rays or contribution rays work best at diffuse surfaces. The direction (towards the light sources or towards the camera) cannot be chosen.  At a specular surface, there is a very high likelihood that those rays will yield a very small contribution to the final estimator. We would like to trace rays as much as possible over specular surfaces before we send out a shadow ray or contribution ray.  For mirrored images (where the light hits a diffuse surface before it hits a specular surface), we prefer ray tracing.  For caustics (where the light hits specular surfaces before diffuse surfaces), we would prefer light tracing.

29 Light Tracing vs. Ray Tracing Number of sources  Comparison of two methods In ray tracing, the sources for the transport we are simulating are the light sources. In light tracing, the importance sources are the individual pixels.  This has some effect on the efficiency of both algorithms, especially when sources are to be moved, in conjunction with an algorithm where partial information of the transport simulation is stored in the scene. When a light-tracing algorithm is used, we could store all endpoints of all paths, and only retrace the contribution rays when the camera moves. This is not as easy with ray tracing.