The Rendering Equation and Path Tracing

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

Lecture 7 - Path Tracing

Global Illumination The Game of Light Transport. Jian Huang

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

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

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

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

The Rendering Equation. Computer Graphics CMU /15-662

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

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

Illumination Algorithms

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue 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

Lecture 12: Photon Mapping. Biased Methods

Physically Realistic Ray Tracing

Stochastic Path Tracing and Image-based lighting

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

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

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

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

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

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

SOME THEORY BEHIND REAL-TIME RENDERING

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

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

Global Illumination. COMP 575/770 Spring 2013

6. Illumination, Lighting

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

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

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

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

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

Photon Mapping. Michael Doggett Department of Computer Science Lund university

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

COMP371 COMPUTER GRAPHICS

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Global Illumination and the Rendering Equation

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

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

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

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

The Rendering Equation & Monte Carlo Ray Tracing

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

CS770/870 Spring 2017 Radiosity

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Rendering Equation & Monte Carlo Path Tracing I

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

Monte Carlo Path Tracing. The Rendering Equation

Recent Advances in Monte Carlo Offline Rendering

Radiometry & BRDFs CS295, Spring 2017 Shuang Zhao

CS770/870 Spring 2017 Radiosity

Biased Monte Carlo Ray Tracing

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

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

13 Distribution Ray Tracing

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

Spectral Color and Radiometry

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

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

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

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

Biased Monte Carlo Ray Tracing:

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Choosing the Right Algorithm & Guiding

Reading. Distribution Ray Tracing. BRDF, revisited. Pixel anti-aliasing. ω in. Required: Shirley, section Further reading:

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

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

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Global Illumination and Monte Carlo

Anti-aliasing and Monte Carlo Path Tracing

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

Metropolis Light Transport

Local vs. Global Illumination & Radiosity

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

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

Rendering. Mike Bailey. Rendering.pptx. The Rendering Equation

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

Introduction to Radiosity

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

782 Schedule & Notes

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Monte Carlo Ray-tracing and Rendering

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

Lecture 10: Ray tracing

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

Illumination. The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong

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

Realistic Image Synthesis

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Radiance. Radiance properties. Radiance properties. Computer Graphics (Fall 2008)

Lecture 7: Monte Carlo Rendering. MC Advantages

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

CS-184: Computer Graphics. Today. Lecture 22: Radiometry! James O Brien University of California, Berkeley! V2014-S

Interactive Methods in Scientific Visualization

Assignment 3: Path tracing

Transcription:

The Rendering Equation and Path Tracing Louis Feng April 22, 2004 April 21, 2004 Realistic Image Synthesis (Spring 2004) 1

Topics The rendering equation Original form Meaning of the terms Integration Path tracing Classical ray tracing Path tracing Bidirectional path tracing April 21, 2004 Realistic Image Synthesis (Spring 2004) 2

The Rendering Equation The rendering equation is a unified description of the rendering problem Previous rendering algorithms (such as radiosity) are approximations to the rendering equation In its original form, the rendering equation is Ixx (, ') = gxx (, ') ε(, xx') ρ(, xx', x")( Ix', x") dx" + S S = S i Ixx (, ') is related to the intensity of light passing from point x' to x gxx (, ') is a "geometry" term ε( xx, ') is related to the intensity of emitted light from point x' to x ρ( xx, ', x") is related to by a patch of surface at x ' the intensity of light scattered from x" to April 21, 2004 Realistic Image Synthesis (Spring 2004) 3 x

More Details About the Integral The outgoing radiance at any surface location in a model is L L e r L (, x ω) = L (, x ω) + L (, x ω) o e r is the emitted radiance is the reflected radiance The total reflected radiance is Lr(, x ω) = fr(, x ω', ω) Li(, x ω')( ω' nd ) ω' f r L i is the BRDF Ω is the incident radiance April 21, 2004 Realistic Image Synthesis (Spring 2004) 4

More Details About the Integral Combine previous equations we get Lo(, x ω) = Le(, x ω) + fr(, x ω', ω) Li(, x ω')( ω' nd ) ω' For computation, we convert from integrating over the hemisphere to integrating the surface locations Recall the differential solid angle is dω '( x) Ω ds ' ( ω ' n') da' = = 2 2 r x' x da' is the projected area April 21, 2004 Realistic Image Synthesis (Spring 2004) 5

More Details About the Integral Introduce a geometry term G Gxx (, ') = ( ω' n')( ω' n) x' x We can rewrite previous radiance integral as L (, x ω) = L (, x ω) + f (, x x' x, ω) L ( x' xv ) (, x x') G(, x x') da' o e r i S S is the set of all surface points Use notation L ( x' x) to denote the radiance leaving x' in the direction towards x i 1 if x and x' are mutually visible V is the visibility function, V = 0 otherwise 2 April 21, 2004 Realistic Image Synthesis (Spring 2004) 6

More Details About the Integral With the new notation, we have L ( x' x) = L ( x' x) + o e S f ( x" x' x) L ( x" x') V( x', x") G( x', x") da" r i This integral differs from the original rendering equation in the geometry term, which encodes the occlusion of surface points by other surface points The term is missing for the emitted radiance from position x. In this case, we consider position x is always visible to the observer When the definition is recursive, is this true in general? April 21, 2004 Realistic Image Synthesis (Spring 2004) 7

More Details About the Integral This integral is recursive, we can use Neumann series expansion to evaluate the equation L = gl + gml m = 0 (1 gm ) I = K( x" x' x) = fr ( x" x' xv ) ( x", x') G( x", x') April 21, 2004 Realistic Image Synthesis (Spring 2004) 8 1 L = (1 gm) gl if M < 1 2 3 e e ( ) e ( ) e S S S m = 0 e gmg ( ) Kx (, x, x ) Kx (, x, x ) k k 1 k 2 1 0 1 L ( x x ) dada da e k k 1 k k 1 0 m gl L = gl + gmgl + g Mg L + g Mg L + = = L e e e

Classical Ray Tracing Light can be traced backwards from observer to the light sources At each intersection point the direct illumination is computed The visibility of the light source is evaluated using shadow rays (dotted lines) If the surface is specular then a specular ray is traced in the reflected or transmitted direction rx (, ω) = x+ d ω April 21, 2004 Realistic Image Synthesis (Spring 2004) 9

Classical Ray Tracing At intersection point x, we find the outgoing radiance in the direction of the ray (, ) (,, ') ω ' n 2 (, ) Φl Lr x ω = fr x ω ω V x p p x 4 π fr is the BRDF n is surface normal p is the position of the light Φl is the power of the light ω ' = ( p x)/ p x, the unit vector in the direction of the light source 0 if x is in shadow V is the visibility function, V = 1 otherwise April 21, 2004 Realistic Image Synthesis (Spring 2004) 10

Classical Ray Tracing Algorithm render image using ray tracing for each pixel pick a ray from the eye through this pixel pixel color = trace(ray) trace(ray) find nearest intersection with scene compute intersection point and normal color = shade(point, normal) return color shade(point, normal) color = 0 for each light source trace shadow ray to light source if shadow ray intersect light source color = color + direct illumination if specular color = color + trace(reflected / refracted ray) return color [Realistic Image Synthesis Using Photon Mapping] April 21, 2004 Realistic Image Synthesis (Spring 2004) 11

Deficiencies Not a full global illumination algorithm Can not compute indirect illumination on diffuse surfaces LD?S*E Basic algorithm can not compute soft chadows, depth of field, and motion blur Need Monte Carlo sampling for these effects April 21, 2004 Realistic Image Synthesis (Spring 2004) 12

A Ray Tracing Example http://graphics.ucsd.edu/~henrik/images/ April 21, 2004 Realistic Image Synthesis (Spring 2004) 13

Path Tracing An extension to classic ray tracing Possible to compute a complete global illumination solution Simulate all possible light bounces in a model L(S D)*E Distributed ray tracing Use stochastic sampling to compute effects such as soft shadows, motion blur, and depth of field Path tracing extends distributed ray tracing by stochastically sampling all possible light paths April 21, 2004 Realistic Image Synthesis (Spring 2004) 14

Path Tracing Mathematically, it s a continuous Markov chain random walk technique for solving the rendering equation Only use one reflected ray to estimate the indirect illumination If use several rays per scattering event, it results in an exponential growth in the number of rays To compute an accurate estimate, use several (a number of) primary rays and average the result April 21, 2004 Realistic Image Synthesis (Spring 2004) 15

Variance in Path Tracing Recall that a property of Monte Carlo integration is the standard error is proportional to 1/ N for N samples Variance in the estimates shows up as noise in the image 1000-10000 path per pixel is typical for noise free images The result is mostly depending on the complexity of the scene Slow varying indirect illumination need lower number of samples We will learn more about Sampling Theory in next lecture April 21, 2004 Realistic Image Synthesis (Spring 2004) 16

Path Tracing Algorithm render image using path tracing for each pixel color = 0 for each sample pick ray from observer through random position in pixel pick a random time and lens position for the ray color = color + trace(ray) pixel color = color / # of samples trace(ray) find nearest intersection with scene compute intersection point and normal color = shade(point, normal) return color shade(point, normal) color = 0 for each light source test visibility of random position on light source if visible color = color + direct illumination color = color + trace(a random reflected ray) return color [Realistic Image Synthesis Using Photon Mapping] April 21, 2004 Realistic Image Synthesis (Spring 2004) 17

Path Tracing Examples This image shows the noisy result after combining only 16 samples for each pixel. It also demonstrates the support of spherical light sources, diffuse inter reflections and soft shadows. [http://www.cs.princeton.edu/~jlawrenc/] April 21, 2004 Realistic Image Synthesis (Spring 2004) 18

Path Tracing Examples April 21, 2004 Realistic Image Synthesis (Spring 2004) [http://www.cs.princeton.edu/~jlawrenc/] 19

Bidirectional Path Tracing An extension to the path tracing algorithm, which traces paths starting from both the eye as well as the light sources Certain paths are easier to sample from the lights Caustics (LS+DE) In situations where the event has small probability but significant contribution, traditional path tracing will produce more noise It is easier to start from the light and trace the ray through specular to diffuse surface, then project to the image plane. April 21, 2004 Realistic Image Synthesis (Spring 2004) 20

Bidirectional Path Tracing Trace two paths: from the eye, path x, and from the light, path y Combine the results by connecting all vertices, including the end points (light and eye) For each vertex-vertex pair, the visibility function V is evaluated with a shadow ray, and compute the individual contribution from the light path vertices to the eye path Light propagates flux, we can t just add the radiance at the vertices ( yj xi) nx L, ( 1) ( 1) (, ) i i j xi xi = fr yj xi xi V xi yj I( y ) 2 j xi x y The radiant intensity for a vertex on the light path is Iy ( x) = Φ ( y) ( y x) n f( y y x) Φ j i i j j i y r j 1 j i ( y ) is the flux of the incoming photon at y from y i j j j 1 April 21, 2004 Realistic Image Synthesis (Spring 2004) 21 j i j

Bidirectional Path Tracing The weighted sum of the contributions from all paths is N p i, j i, j i= 0 j= 0 ij, j i= 0 N i must be normalized in, i N L = w L w w j = 1 for N = 0,1, 2, 3, April 21, 2004 Realistic Image Synthesis (Spring 2004) 22

Bidirectional Path Tracing One choice of weights is use power heuristic w ij, i+ j k = 0 β ij, p =, where β = 2 p β ki, + j k p is the probability density for generating the path x,, x, y, y ( x x ) n ( x x ) n i+ 1 px ( x )= p ( x x ) ij, 0 i j 0 i i+ 1 xi i i+ 1 x i i+ 1 fr i i+ 1 2 xi xi+ 1 p ( x x ) is the probability f i i+ 1 r density for sampling the direciton xi x i + 1 with respect to the projected solid angle April 21, 2004 Realistic Image Synthesis (Spring 2004) 23

Bidirectional Path Tracing Algorithm render image using bidirectional path tracing for each pixel for each sample pos = random position in pixel trace paths(pos) trace path( pixel pos) trace primary ray from observer through pixel pos generate an eye path of scattering events from the primary ray emit random photon from the light source generate a light path of scattering events from the photon combine(eye path, light path) combine(eye path, light path) for each vertex y j on the light path for each vertex x i on the eye path if Vx ( i, y j) == 1 compute weight for the xi yj path add weighted contribution to the corresponding pixel [Realistic Image Synthesis Using Photon Mapping] April 21, 2004 Realistic Image Synthesis (Spring 2004) 24

Bidirectional Path Tracing Properties Bidirectional path tracing uses few samples per pixel than path tracing, but path tracing may still be faster because bidirectional path tracing combines two paths Still has noise Better than path tracing when rendering caustics, except when the caustic is reflected by mirror, where bidirectional path tracing is not better April 21, 2004 Realistic Image Synthesis (Spring 2004) 25

References Books Principles of Digital Image Synthesis, Andrew Glassner Realistic Image Synthesis Using Photon Mapping, Henrik Wann Jensen An Introduction to Ray Tracing, Andrew Gassner Papers Kajiya, J. T., "The rendering equation", Proceedings of the 13th annual conference on Computer graphics and interactive techniques 1986, pp. 143-150. April 21, 2004 Realistic Image Synthesis (Spring 2004) 26