Global Illumination (3) Photon Mapping (1). Overview Light Transport Notation Path Tracing Photon Mapping –Photon Tracing –The Photon Map.

Slides:



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

Photon Mapping. How did I use it 10 years ago? Why might you want to use it tomorrow?
Advanced Computer Graphics
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.
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
Admission to CS 184 Enrollment priorities are 1. CS/EECS majors, 2. CS/EECS minors (this category includes applied math majors) 3. anyone else with a declared.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
Everything on Global Illumination Xavier Granier - IMAGER/UBC.
Time-Dependent Photon Mapping Mike Cammarano Henrik Wann Jensen EGWR ‘02.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 20: Monte Carlo Path Tracing Ravi Ramamoorthi Acknowledgements.
Paper by Alexander Keller
Computer Graphics (Spring 2008) COMS 4160, Lecture 22: Global Illumination
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
Global Illumination. Direct Illumination vs. Global Illumination reflected, scattered and focused light (not discreet). physical-based light transport.
Photon Mapping (PM), Progressive PM, Stochastic PPM Jiří Vorba.
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
-Global Illumination Techniques
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
09/11/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Graphics Pipeline Texturing Overview Cubic Environment Mapping.
Volume radiosity Michal Roušal University of West Bohemia, Plzeň Czech republic.
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.
Global Illumination with a Virtual Light Field Mel Slater Jesper Mortensen Pankaj Khanna Insu Yu Dept of Computer Science University College London
Global Illumination CMSC 435/634. Global Illumination Local Illumination – light – surface – eye – Throw everything else into ambient Global Illumination.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.

Introduction to Radiosity Geometry Group Discussion Session Jiajian (John) Chen 9/10/2007.
111/17/ :21 Graphics II Global Rendering and Radiosity Session 9.
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.
Global Illumination: Radiosity, Photon Mapping & Path Tracing Rama Hoetzlein, 2009 Lecture Notes Cornell University.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
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.
© Machiraju/Möller Rendering Equation Various Solutions cis782 Advanced Computer Graphics Raghu Machiraju.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
CMSC 635 Global Illumination.  Local Illumination  light – surface – eye  Throw everything else into ambient  Global Illumination  light – surface.
Slide 1Lastra, 2/14/2016 Monte-Carlo Methods. Slide 2Lastra, 2/14/2016 Topics Kajiya’s paper –Showed that existing rendering methods are approximations.
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell Photon Mapping and Irradiance Caching.
Illumination Model How to compute color to represent a scene As in taking a photo in real life: – Camera – Lighting – Object Geometry Material Illumination.
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.
Distributed Ray Tracing. Can you get this with ray tracing?
Distributed Ray Tracing. Can you get this with ray tracing?
Computer graphics III – Rendering equation and its solution
Advanced Computer Graphics

Sampling and Reconstruction of Visual Appearance
The Rendering Equation
© 2005 University of Wisconsin
(c) 2002 University of Wisconsin
Progressive Photon Mapping
Path Tracing (some material from University of Wisconsin)
Caustics Ray Tracing CSS522
(c) 2002 University of Wisconsin
Efficient Importance Sampling Techniques for the Photon Map
Image.
Photon Density Estimation using Multiple Importance Sampling
Presentation transcript:

Global Illumination (3) Photon Mapping (1)

Overview Light Transport Notation Path Tracing Photon Mapping –Photon Tracing –The Photon Map

Photon Mapping Photon mapping is a a technique for simulating global illumination. There are combined radiosity/ray tracing approaches to global illumination, as well as stochastic techniques (e.g. path tracing)…

Hybrid Methods Ray tracing extended with Monte Carlo techniques: –Very time consuming. –Noisy results. Radiosity extended with directional capabilities: –Requires too much storage. –Doesn’t handle specular reflections correctly.

Photon Mapping Can simulate all global illumination effects –color bleed, caustics, participating media, etc. Arbitrary geometry (no finite elements) –radiosity, a finite element method, requires meshing of all geometry Low memory consumption –versus the big meshes and linear systems of radiosity Result is correct except for variance (seen as noise) –expected value is correct, so solution will converge

Photon Mapping: Idea Photons are emitted from light sources. Each photon is traced through the scene using path tracing. Every time a photon hits a surface it is stored in the photon map. Photons are either absorbed or reflected. Reflected photon directions are computed using the BRDF of the surface. After the photon map is created, the scene is ray traced. The photon map information is used by the ray tracer.

About Photon Mapping A global illumination algorithm A Monte Carlo forward ray-tracing technique An efficient alternative to pure Monte Carlo approaches such as Path Tracing –faster and not as noisy

Algorithm Overview Photon Tracing forward ray-traces from the lights in the model and stores intersections in a cache, the photon map. Rendering renders the model using the photon map to provide illumination information.

Photon mapping Preprocess: cast rays from light sources Store photons

Photon mapping Preprocess: cast rays from light sources Store photons (position + light power + incoming direction)

Photon map Efficiently store photons for fast access Use hierarchical spatial structure (kd-tree)

Photon Mapping: Rendering Cast primary rays For secondary rays –reconstruct irradiance using adjacent stored photon –Take the k closest photons Combine with irradiance caching and a number of other techniques

Cast primary rays For secondary rays –reconstruct irradiance using adjacent stored photon –Take the k closest photons Combine with irradiance caching and a number of other techniques

Photon map results

Photon mapping - caustics Special photon map for specular reflection and refraction

Path Tracing: 1000 paths/pixel

Photon Mapping

Photon Tracing Photons emitted from light sources –light sources can have arbitrary geometry Mirror surfaces (specular reflection) reflect photons Diffuse surfaces store photons in photon map –photon is reflected at random on hemisphere Arbitrary BRDFs may be used for scattering Traces L(S|D)*D paths

Russian Roulette (Suicidal Photons) Stochastic technique to remove “unimportant” photons so computation focuses on “important” ones Intuition: –shoot 1000 photons of power p at a surface with reflectivity.5 –we can reflect 1000 photons with power p/2... –or reflect 500 photons with power p (less computation)

Russian Roulette Reflected flux only a fraction of incident flux After several reflections, spending a lot of time keeping track of very little flux Instead, completely absorb some photons and completely reflect others at full power ?  = 60%

Russian Roulette Spend time tracing fewer full power photons Probability of reflectance is the reflectance . Probability of absorption is 1 – . ?  = 60%

Mixed Surfaces Surfaces have specular and diffuse components –  d – diffuse reflectance –  s – specular reflectance –  d +  s < 1 (conservation of energy) Let  be a uniform random value from 0 to 1 If  <  d –then reflect diffuse –else if  <  d +  s then reflect specular otherwise absorb  d = 50%  s = 30%

Russian Roulette Expected value is the same, but variance increases Main advantages: –photons in photon map have similar power –far less computation

Overview Light Transport Notation Path Tracing Photon Tracing The Photon Map

Represents illumination stored as points in a global data structure Decouples the representation of illumination from geometry Is view-independent Represents L(S|D)*D paths

Photon Mapping: Data Structure struct photon { long energy; // packed energy (RGB) float position[3]; // photon position float theta, phi; // photon direction char normal[3]; // surface normal }

1.radiance_estimate(x,v,n) { 2. locate k nearest photons 3. r = distance to kth nearest photon 4. flux = 0 5. for each photon p { 6. pd = direction of p 7. phi = power of p 8. flux += brdf(x, v, pd)*phi; 9. } 10. return flux/(2*pi*r^2) 11.}  A =  r 2

Acceleration Structure Need n-nearest neighbors Usually use a k-d tree

Photon Mapping: Data Structure struct photon { long energy; // packed energy (RGB) float position[3]; // photon position float theta, phi; // photon direction char normal[3]; // surface normal short flag; // used by KD-tree // (stores which plane to split) }

How Many Photons? How big is the disk radius r? Large enough that the disk surrounds the n nearest photons. The number of photons used for a radiance estimate n is usually between 50 and 500. Radiance estimate using 50 photons Radiance estimate using 500 photons  A =  r 2

Photon Mapping: Example Museum: –5000 polygons and spheres. –1 procedural object. –Two small spherical area light sources. –390,000 caustic photons. –165,000 global photons (9 MB). –298 seconds for 1 st pass, 51 minutes for 2 nd. –Contains: Caustics from glass onto rough surface. Caustics from cylinder to wall. Color bleeding between walls.

Photon Mapping

Optimizations Faster final gathering –Pre-computed irradiance stored at photon locations –Only the nearest photon must be found instead of density estimation computation –Reported speedup up to 6 times Photon density control in the map –In bright regions with slowly changing illumination the power of redundant photons is distributed to their neighbors –Photon number reduced 2-4 times for the same image quality Be careful with your choice of random number –drand48() performed slightly better than erand48() and much better than BSD-style random()

Industrial Products Brazil Rendering System ( finalRender ( Mental Ray ( SoftImage|XSI ( VirtuaLight ( VRay ( RenderMan (