Real-Time High Quality Rendering

Slides:



Advertisements
Similar presentations
Insu Yu (Research Fellow) James Tompkin (Research Engineer & T.A.) ( me with questions)
Advertisements

Multidimensional Lightcuts Bruce Walter Adam Arbree Kavita Bala Donald P. Greenberg Program of Computer Graphics, Cornell University.
Scalability with Many Lights 1 Lightcuts & Multidimensonal Lightcuts Course: Realistic Rendering with Many-Light Methods Note: please see website for the.
Computer graphics & visualization Global Illumination Effects.
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.
Paper Presentation - An Efficient GPU-based Approach for Interactive Global Illumination- Rui Wang, Rui Wang, Kun Zhou, Minghao Pan, Hujun Bao Presenter.
Monte Carlo Integration Robert Lin April 20, 2004.
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
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
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.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
Monte Carlo Integration COS 323 Acknowledgment: Tom Funkhouser.
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
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
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.
Selected Topics in Global Illumination Computation Jaroslav Křivánek Charles University, Prague
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
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Distribution Ray Tracing.
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
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.

Real-Time High Quality Rendering CSE 291 [Winter 2015], Lecture 2 Graphics Hardware Pipeline, Reflection and Rendering Equations, Taxonomy of Methods
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.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
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
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.
© 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.
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
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell Photon Mapping and Irradiance Caching.
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.
Computer graphics III – Multiple Importance Sampling Jaroslav Křivánek, MFF UK
Advanced Computer Graphics
Advanced Computer Graphics
Sampling and Reconstruction of Visual Appearance
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)
Monte Carlo Path Tracing
Foundations of Computer Graphics (Spring 2012)
Monte Carlo Path Tracing and Caching Illumination
Monte Carlo Integration
Photon Density Estimation using Multiple Importance Sampling
Presentation transcript:

Real-Time High Quality Rendering CSE 274 [Fall 2015], Lecture 5 Tour of Modern Offline Rendering http://www.cs.ucsd.edu/~ravir

To Do Project milestone (1-2 pages), final project proposal Due on Oct 27 Please get in touch with me if want to meet, have problems

Motivation for Lecture Must understand modern offline rendering, before considering real-time extensions Papers discuss ways to accelerate some effects Many more interesting possibilities ahead

Monte Carlo Path Tracing General solution to rendering and global illumination Suitable for a variety of general scenes Based on Monte Carlo methods Enumerate all paths of light transport Long history, traces back to rendering eqn Kajiya 86 Increasingly, basis for production rendering Path tracing today real-time in hardware (for example, using NVIDIA’s Optix)

Monte Carlo Path Tracing Big diffuse light source, 20 minutes Jensen

Monte Carlo Path Tracing 1000 paths/pixel Jensen

Monte Carlo Path Tracing Advantages Any type of geometry (procedural, curved, ...) Any type of BRDF (specular, glossy, diffuse, ...) Samples all types of paths (L(SD)*E) Accuracy controlled at pixel level Low memory consumption Unbiased - error appears as noise in final image Disadvantages (standard Monte Carlo problems) Slow convergence (square root of number of samples) Noise in final image

Monte Carlo Path Tracing Integrate radiance for each pixel by sampling paths randomly Specular Surface Light Eye Pixel x Diffuse Surface

Simplest Monte Carlo Path Tracer For each pixel, cast n samples and average Choose a ray with p=camera, d=(θ,ϕ ) within pixel Pixel color += (1/n) * TracePath(p, d) TracePath(p, d) returns (r,g,b) [and calls itself recursively]: Trace ray (p, d) to find nearest intersection p’ Select with probability (say) 50%: Emitted: return 2 * (Lered, Legreen, Leblue) // 2 = 1/(50%) Reflected: generate ray in random direction d’ return 2 * fr(d d’) * (nd’) * TracePath(p’, d’)

Simplest Monte Carlo Path Tracer For each pixel, cast n samples and average over paths Choose a ray with p=camera, d=(θ,ϕ) within pixel Pixel color += (1/n) * TracePath(p, d) TracePath(p, d) returns (r,g,b) [and calls itself recursively]: Trace ray (p, d) to find nearest intersection p’ Select with probability (say) 50%: Emitted: return 2 * (Lered, Legreen, Leblue) // 2 = 1/(50%) Reflected: generate ray in random direction d’ return 2 * fr(d d’) * (nd’) * TracePath(p’, d’)

Simplest Monte Carlo Path Tracer For each pixel, cast n samples and average Choose a ray with p=camera, d=(θ,ϕ ) within pixel Pixel color += (1/n) * TracePath(p, d) TracePath(p, d) returns (r,g,b) [and calls itself recursively]: Trace ray (p, d) to find nearest intersection p’ Select with probability (say) 50%: Emitted: return 2 * (Lered, Legreen, Leblue) // 2 = 1/(50%) Reflected: generate ray in random direction d’ return 2 * fr(d d’) * (nd’) * TracePath(p’, d’) Weight = 1/probability Remember: unbiased requires having f(x) / p(x)

Simplest Monte Carlo Path Tracer For each pixel, cast n samples and average Choose a ray with p=camera, d=(θ,ϕ) within pixel Pixel color += (1/n) * TracePath(p, d) TracePath(p, d) returns (r,g,b) [and calls itself recursively]: Trace ray (p, d) to find nearest intersection p’ Select with probability (say) 50%: Emitted: return 2 * (Lered, Legreen, Leblue) // 2 = 1/(50%) Reflected: generate ray in random direction d’ return 2 * fr(d d’) * (nd’) * TracePath(p’, d’) Path terminated when Emission evaluated

Arnold Renderer (M. Fajardo) Works well diffuse surfaces, hemispherical light

From UCB CS 294 a few years ago Daniel Ritchie and Lita Cho

Importance Sampling Pick paths based on energy or expected contribution More samples for high-energy paths Don’t pick low-energy paths At “macro” level, use to select between reflected vs emitted, or in casting more rays toward light sources At “micro” level, importance sample the BRDF to pick ray directions Tons of papers in 90s on tricks to reduce variance in Monte Carlo rendering Importance sampling now standard in production. I consulted on Pixar’s system for upcoming movies

Importance Sampling Can pick paths however we want, but contribution weighted by 1/probability Already seen this division of 1/prob in weights to emission, reflectance x1 xN E(f(x))

Importance sample Emit vs Reflect TracePath(p, d) returns (r,g,b) [and calls itself recursively]: Trace ray (p, d) to find nearest intersection p’ If Le = (0,0,0) then pemit= 0 else pemit= 0.9 (say) If random() < pemit then: Emitted: return (1/ pemit) * (Lered, Legreen, Leblue) Else Reflected: generate ray in random direction d’ return (1/(1- pemit)) * fr(d d’) * (nd’) * TracePath(p’, d’)

More variance reduction Discussed “macro” importance sampling Emitted vs reflected How about “micro” importance sampling Shoot rays towards light sources in scene Distribute rays according to BRDF

Monte Carlo Extensions Unbiased Bidirectional path tracing Metropolis light transport Biased, but consistent Noise filtering Adaptive sampling Irradiance caching

Monte Carlo Extensions Unbiased Bidirectional path tracing Metropolis light transport Biased, but consistent Noise filtering Adaptive sampling Irradiance caching RenderPark

Monte Carlo Extensions Unbiased Bidirectional path tracing Metropolis light transport Biased, but consistent Noise filtering Adaptive sampling Irradiance caching Heinrich

Monte Carlo Extensions Unbiased Bidirectional path tracing Metropolis light transport Biased, but consistent Noise filtering Adaptive sampling Irradiance caching Unfiltered Filtered Jensen

Monte Carlo Extensions Unbiased Bidirectional path tracing Metropolis light transport Biased, but consistent Noise filtering Adaptive sampling Irradiance caching Fixed Adaptive Ohbuchi

Monte Carlo Extensions Unbiased Bidirectional path tracing Metropolis light transport Biased, but consistent Noise filtering Adaptive sampling Irradiance caching Jensen

Summary Monte Carlo methods robust and simple (at least until nitty gritty details) for global illumination Must handle many variance reduction methods in practice Importance sampling, Bidirectional path tracing, Russian roulette etc. Rich field with many papers, systems researched over last 10 years Today, hardware for real-time ray, path tracing Promising physically-based GPU approach

Smoothness of Indirect Lighting Direct + Indirect

Irradiance Caching Empirically, (diffuse) interreflections low frequency Therefore, should be able to sample sparsely Irradiance caching samples irradiance at few points on surfaces, and then interpolates Ward, Rubinstein, Clear. SIGGRAPH 88, A ray tracing solution for diffuse interreflection

Irradiance Caching Example Final Image Sample Locations

D. Mitchell 95, Consequences of stratified sampling in graphics

Comparison of simple patterns Latin Hypercube Quasi Monte Carlo Ground Truth Uniform Random Stratified 16 samples for area light, 4 samples per pixel, total 64 samples If interested, see my recent paper “A Theory of Monte Carlo Visibility Sampling” Figures courtesy Tianyu Liu

Path Tracing: From Lights Step 1. Choose a light ray Step 2. Find ray-surface intersection Step 3. Reflect or transmit u = Uniform() if u < reflectance(x) Choose new direction d ~ BRDF(O|I) goto Step 2 else if u < reflectance(x)+transmittance(x) Choose new direction d ~ BTDF(O|I) else // absorption=1–reflectance-transmittance terminate on surface; deposit energy

Bidirectional Path Tracing Path pyramid (k = l + e = total number of bounces)

Comparison

Why Photon Map? Some visual effects like caustics hard with standard path tracing from eye May usually miss light source altogether Instead, store “photons” from light in kd-tree Look-up into this as needed Combines tracing from light source, and eye Similar to bidirectional path tracing, but compute photon map only once for all eye rays Global Illumination using Photon Maps H. Jensen. Rendering Techniques (EGSR 1996), pp 21-30. (Also book: Realistic Image Synthesis using Photon Mapping)

Slides courtesy Henrik Wann Jensen Caustics Path Tracing: 1000 paths/pixel Note noise in caustics Slides courtesy Henrik Wann Jensen

Caustics Photon Mapping: 10000 photons 50 photons in radiance estimate

Reflections Inside a Metal Ring 50000 photons 50 photons to estimate radiance

Caustics on Glossy Surfaces 340000 photons, 100 photons in radiance estimate

HDR Environment Illumination

Global Illumination

Direct Illumination

Specular Reflection

Caustics

Indirect Illumination

Mies House: Swimming Pool

From Walter et al. SIGGRAPH 05 Lightcuts Efficient, accurate complex illumination What is lightcuts? Lightcuts is a new scalable solution for efficiently computing complex illumination. Two examples are shown here. The image on the left is lit by an environment map with illumination captured from the real world, while the image on the right includes two simulated high dynamic range flat-panel displays. Both are challenging illumination problems. In addition both images include indirect illumination, glossy materials, and anti-aliasing. Yet our method was able to produce each image in under two minutes on a single machine. Environment map lighting & indirect Time 111s Textured area lights & indirect Time 98s (640x480, Anti-aliased, Glossy materials) From Walter et al. SIGGRAPH 05

Complex Lighting Simulate complex illumination using point lights Area lights HDR environment maps Sun & sky light Indirect illumination Unifies illumination Enables tradeoffs between components Once we have a scalable solution for many point lights, we can use this to compute other types of complex illumination. The four examples we demonstrate in the paper are area lights, high dynamic range environment maps, sun & sky light, and indirect illumination. Moreover this allows us to unify the handling of different illumination types and enables new types of tradeoffs. For example, bright illumination from one source allows coarser approximations of other sources. Area lights + Sun/sky + Indirect

Key Concepts Light Cluster Light Tree Binary tree of lights and clusters Second is the light tree which is a binary tree of lights and clusters. The leaves of this tree are the individual lights while the interior nodes represent clusters which get progressively larger as we go up the tree. Clusters Individual Lights

Three Example Cuts Three Cuts #1 #2 #4 #1 #3 #4 #1 #4 4 4 4 And here we show three example cuts through the light tree. Highlighted above each cut are the regions where that cut produces an accurate approximation of the exact illumination. 1 4 1 4 1 4 1 2 3 4 1 2 3 4 1 2 3 4

Tableau, 630K polygons, 13 000 lights, (EnvMap+Indirect) Here is another results that show cases our ability to handle glossy objects. This scene is illuminated by a captured environment map and indirect illumination. And here is a short animation of this scene. Tableau, 630K polygons, 13 000 lights, (EnvMap+Indirect) Avg. shadow rays per eye ray 17 (0.13%)

Adaptive Wavelet Rendering