To Do. Real-Time High Quality Rendering. Motivation for Lecture. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

Similar documents
Motivation: Monte Carlo Path Tracing. Sampling and Reconstruction of Visual Appearance. Monte Carlo Path Tracing. Monte Carlo Path Tracing

Motivation. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

Discussion. Smoothness of Indirect Lighting. History and Outline. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Spring 2013)

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi

Monte Carlo Path Tracing. The Rendering Equation

Biased Monte Carlo Ray Tracing

Recent Advances in Monte Carlo Offline Rendering

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate?

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Biased Monte Carlo Ray Tracing:

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Final Project: Real-Time Global Illumination with Radiance Regression Functions

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

Global Illumination and Monte Carlo

The Rendering Equation and Path Tracing

Illumination Algorithms

Scalable many-light methods

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662

Choosing the Right Algorithm & Guiding

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Korrigeringar: An introduction to Global Illumination. Global Illumination. Examples of light transport notation light

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

Monte Carlo Path Tracing

Motivation: Monte Carlo Rendering. Sampling and Reconstruction of Visual Appearance. Caustics. Illumination Models. Overview of lecture.

CS 563 Advanced Topics in Computer Graphics Irradiance Caching and Particle Tracing. by Stephen Kazmierczak

Part I The Basic Algorithm. Principles of Photon Mapping. A two-pass global illumination method Pass I Computing the photon map

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Photon Mapping. Due: 3/24/05, 11:59 PM

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

Physically Realistic Ray Tracing

Monte Carlo Integration of The Rendering Equation. Computer Graphics CMU /15-662, Spring 2017

Philipp Slusallek Karol Myszkowski. Realistic Image Synthesis SS18 Instant Global Illumination

Distribution Ray Tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

The Rendering Equation & Monte Carlo Ray Tracing

Lecture 15: Many Lights. CS 6620, Spring 2009 Kavita Bala Computer Science Cornell University. Many Lights

Photon Mapping. Michael Doggett Department of Computer Science Lund university

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm

Stochastic Path Tracing and Image-based lighting

Lightcuts: A Scalable Approach to Illumination

2/1/10. Outline. The Radiance Equation. Light: Flux Equilibrium. Light: Radiant Power. Light: Equation. Radiance. Jan Kautz

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016

Outline of Lecture. Real-Time High Quality Rendering. Geometry or Vertex Pipeline. Basic Hardware Pipeline. Pixel or Fragment Pipeline

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Lecture 7: Monte Carlo Rendering. MC Advantages

Reading. 8. Distribution Ray Tracing. Required: Watt, sections 10.6,14.8. Further reading:

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Global Illumination The Game of Light Transport. Jian Huang

The Rendering Equation. Computer Graphics CMU /15-662

Monte Carlo Integration COS 323

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

To Do. Advanced Computer Graphics. Course Outline. Course Outline. Illumination Models. Diffuse Interreflection

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Review. Stephen J. Guy

Photon Mapping. Kadi Bouatouch IRISA

An introduction to Global Illumination. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Lecture 12: Photon Mapping. Biased Methods

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

The Rendering Equation Philip Dutré. Course 4. State of the Art in Monte Carlo Global Illumination Sunday, Full Day, 8:30 am - 5:30 pm

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Practical Product Importance Sampling for Direct Illumination

Monte Carlo Ray-tracing and Rendering

Monte Carlo Integration COS 323

Lecture 7 - Path Tracing

13 Distribution Ray Tracing

Sung-Eui Yoon ( 윤성의 )

LightSlice: Matrix Slice Sampling for the Many-Lights Problem

In the real world, light sources emit light particles, which travel in space, reflect at objects or scatter in volumetric media (potentially multiple

Global Illumination. COMP 575/770 Spring 2013

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao

Introduction to Photon Mapping RADIANCE Workshop 2010 Course Advanced Fenestration

Today. Participating media. Participating media. Rendering Algorithms: Participating Media and. Subsurface scattering

TDA361/DIT220 Computer Graphics, January 15 th 2016

Low Memory Spectral Photon Mapping

CS354R: Computer Game Technology

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

Irradiance Caching in Pixar s RenderMan

Reusing Shading for Interactive Global Illumination GDC 2004

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 557 Autumn 2017

Efficient Simulation of Light Transport in Scenes with Participating Media using Photon Maps

Global Illumination using Photon Maps

Shading and Illumination

REAL-TIME GPU PHOTON MAPPING. 1. Introduction

SOME THEORY BEHIND REAL-TIME RENDERING

The V-Ray installer will automatically remove any previous installations. This will allow you to seamlessly upgrade from previous versions.

Anti-aliasing and Monte Carlo Path Tracing

COMP371 COMPUTER GRAPHICS

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Local vs. Global Illumination & Radiosity

Overview. Radiometry and Photometry. Foundations of Computer Graphics (Spring 2012)

Paths, diffuse interreflections, caching and radiometry. D.A. Forsyth

Lecture 18: Primer on Ray Tracing Techniques

Transcription:

Real-Time High Quality Rendering CSE 274 [Fall 2015], Lecture 5 Tour of Modern Offline Rendering 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 http://www.cs.ucsd.edu/~ravir 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 Monte Carlo Path Tracing Big diffuse light source, 20 minutes Jensen 1000 paths/pixel Jensen 1

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 - 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 L o (x, w) = L e (x, w) + Ω Eye Pixel Specular Surface Diffuse Surface f r (x, w, w)li (x, w )( w n)d w x Light 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) Select with probability (say) 50%: return 2 * (Le red, Le green, Le blue ) // 2 = 1/(50%) Reflected: generate ray in random direction d return 2 * f r (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) Select with probability (say) 50%: return 2 * (Le red, Le green, Le blue ) // 2 = 1/(50%) Reflected: generate ray in random direction d return 2 * f r (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) Weight = 1/probability Select with probability (say) 50%: Remember: unbiased requires having f(x) / p(x) return 2 * (Le red, Le green, Le blue ) // 2 = 1/(50%) Reflected: generate ray in random direction d return 2 * f r (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) Select with probability (say) 50%: return 2 * (Le red, Le green, Le blue ) // 2 = 1/(50%) Reflected: Path terminated when generate ray in random direction d Emission evaluated return 2 * f r (d è d ) * (n d ) * TracePath(p, d ) 2

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 E(f(x)) f (x)dx = 1 N Y i Ω Y i = f (x i ) p(x i ) N i=1 Importance sample Emit vs Reflect If Le = (0,0,0) then p emit = 0 else p emit = 0.9 (say) If random() < p emit then: return (1/ p emit ) * (Le red, Le green, Le blue ) Else Reflected: generate ray in random direction d return (1/(1- p emit )) * f r (d è d ) * (n d ) * TracePath(p, d ) x 1 x N 3

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 RenderPark Unfiltered Heinrich Filtered Jensen 4

Fixed Adaptive Ohbuchi 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 Direct + Indirect Irradiance Caching Empirically, (diffuse) interreflections low frequency Therefore, should be able to sample sparsely 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 5

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 D. Mitchell 95, Consequences of stratified sampling in graphics 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 Bidirectional Path Tracing Path pyramid (k = l + e = total number of bounces) else if u < reflectance(x)+transmittance(x) Choose new direction d ~ BTDF(O I) goto Step 2 else // absorption=1 reflectance-transmittance terminate on surface; deposit energy 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) 6

Path Tracing: 1000 paths/pixel Note noise in caustics Caustics Photon Mapping: 10000 photons 50 photons in radiance estimate Caustics Slides courtesy Henrik Wann Jensen 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 7

Direct Illumination Specular Reflection Caustics Indirect Illumination Mies House: Swimming Pool Lightcuts Efficient, accurate complex illumination Environment map lighting & indirect Textured area lights & indirect Time 111s Time 98s (640x480, Anti-aliased, Glossy materials) From Walter et al. SIGGRAPH 05 8

Complex Lighting Simulate complex illumination using point lights Area lights HDR environment maps Sun & sky light Indirect illumination Light Cluster Key Concepts Light Tree Binary tree of lights and clusters Unifies illumination Enables tradeoffs between components Area lights + Sun/sky + Indirect Clusters Individual Lights Three Example Cuts Three Cuts #1 #2 #4 #1 #3 #4 #1 #4 4 4 4 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) Avg. shadow rays per eye ray 17 (0.13%) Adaptive Wavelet Rendering 9