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

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

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

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

Global Illumination and the Rendering Equation

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

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

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

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

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

Motivation: Monte Carlo Path Tracing. Sampling and Reconstruction of Visual Appearance. 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)

Global Illumination and Radiosity

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

Illumination Algorithms

The Rendering Equation and Path Tracing

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

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

Recent Advances in Monte Carlo Offline Rendering

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

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

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

Global Illumination and Monte Carlo

BRDF Computer Graphics (Spring 2008)

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. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

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

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

Monte Carlo Integration COS 323

Global Illumination The Game of Light Transport. Jian Huang

Lecture 7 - Path Tracing

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

Assignment 3: Path tracing

Monte Carlo Path Tracing. The Rendering Equation

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

rendering equation camera all

Choosing the Right Algorithm & Guiding

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

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

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

Announcement. Lighting and Photometric Stereo. Computer Vision I. Surface Reflectance Models. Lambertian (Diffuse) Surface.

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

The Rendering Equation & Monte Carlo Ray Tracing

Biased Monte Carlo Ray Tracing

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

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

Global Illumination. COMP 575/770 Spring 2013

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

SOME THEORY BEHIND REAL-TIME RENDERING

COMPUTER GRAPHICS COURSE. LuxRender. Light Transport Foundations

Stochastic Path Tracing and Image-based lighting

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

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

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

And if that 120MP Camera was cool

Realistic Image Synthesis

Lecture 7: Monte Carlo Rendering. MC Advantages

Realistic Image Synthesis

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

CS 563 Advanced Topics in Computer Graphics Monte Carlo Integration: Basic Concepts. by Emmanuel Agu

The Rendering Equation. Computer Graphics CMU /15-662

Physically Realistic Ray Tracing

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

Monte Carlo Integration COS 323

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

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

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

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

Introduction. Chapter Computer Graphics

Radiometry and reflectance

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

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

Local vs. Global Illumination & Radiosity

Effects needed for Realism. Computer Graphics (Fall 2008) Ray Tracing. Ray Tracing: History. Outline

CS-184: Computer Graphics. Today. Lecture #16: Global Illumination. Sunday, November 8, 2009

Biased Monte Carlo Ray Tracing:

Shading. Brian Curless CSE 557 Autumn 2017

Monte Carlo Integration

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

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

CSE 681 Illumination and Phong Shading

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

Analysis of Planar Light Fields from Homogeneous Convex Curved Surfaces Under Distant Illumination

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

TDA361/DIT220 Computer Graphics, January 15 th 2016

A Survey of Radiosity and Ray-tracing. Methods in Global Illumination

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

Chapter 1 Introduction

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

6. Illumination, Lighting

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

A Frequency Analysis of Light Transport

Retro-rendering with Vector-Valued Light: Producing Local Illumination from the Transport Equation

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

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

Numerical Integration

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

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

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Transcription:

Sampling and Reconstruction of Visual Appearance CSE 74 [Winter 8], Lecture 3 Ravi Ramamoorthi http://www.cs.ucsd.edu/~ravir Motivation: Monte Carlo Rendering Key application area for sampling/reconstruction Modern methods for denoising now popular -3 order of magnitude speedups in mature area Denoising now standard in production rendering This week: Basic background in rendering Reflection and Rendering Equations Monte Carlo Integration Path Tracing (Basic Monte Carlo rendering method) A review for those who have taken CSE 68 Illumination Models Local Illumination Light directly from light sources to surface No shadows (cast shadows are a global effect) Global Illumination: multiple bounces (indirect light) Hard and soft shadows Reflections/refractions (already seen in ray tracing) Diffuse and glossy interreflections (radiosity, caustics) Caustics Caustics: Focusing through specular surface Major research effort in 8s, 9s till today Some images courtesy Henrik Wann Jensen Overview of lecture Theory for all global illumination methods (ray tracing, path tracing, radiosity) We derive Rendering Equation [Kajiya 86] Major theoretical development in field Unifying framework for all global illumination Introduced Path Tracing: core rendering method Discuss eisting approaches as special cases Outline Reflectance Equation Global Illumination Rendering Equation As a general Integral Equation and Operator Approimations (Ray Tracing, Radiosity) Surface Parameterization (Standard Form) Fairly theoretical lecture (but important). Not well covered in tetbooks (though see Eric Veach s thesis). See reading if you are interested.

Reflection Equation Reflection Equation ω i ω r ω i ω r L r (,ω r ) = L e (,ω r ) + L i (,ω i )f (,ω i,ω r )(ω i i n) Emission Incident BRDF Light (from light source) Cosine of L r (,ω r ) = L e (,ω r ) + L i (,ω i )f (,ω i,ω r )(ω i i n) Emission Incident BRDF Light (from light source) Sum over all light sources Cosine of dω i Reflection Equation ω i ω r L (, ω ) L (, ω ) L(, ω ) f(, ω, ω )cosθdω = + Replace sum with integral r r e r i i i r i i Emission Incident BRDF Cosine of Light (from light source) Environment Maps Light as a function of direction, from entire environment Captured by photographing a chrome steel or mirror sphere Accurate only for one point, but distant lighting same at other scene locations (typically use only one env. map) Blinn and Newell 976, Miller and Hoffman, 984 Later, Greene 86, Cabral et al. 87 The Challenge L (, ω ) L (, ω ) L(, ω ) f(, ω, ω )cosθdω = + r r e r i i i r i i Computing reflectance equation requires knowing the incoming radiance from surfaces But determining incoming radiance requires knowing the reflected radiance from surfaces Rendering Equation Surfaces (interreflection) da dω i ω i ω r L r (,ω r ) = L e (,ω r ) + L (, ω r i i r i i Emission Reflected Light BRDF Cosine of UNKNOWN KNOWN UNKNOWN KNOWN KNOWN

Outline Rendering Equation (Kajiya 86) Reflectance Equation (review) Global Illumination Rendering Equation As a general Integral Equation and Operator Approimations (Ray Tracing, Radiosity) Surface Parameterization (Standard Form) Rendering Equation as Integral Equation L r (,ω r ) = L e (,ω r ) + L (, ω r i i r i i Emission Reflected Light BRDF Cosine of UNKNOWN l(u) = e(u) + KNOWN UNKNOWN KNOWN KNOWN Is a Fredholm Integral Equation of second kind [etensively studied numerically] with canonical form l(v) K(u,v)dv Kernel of equation Linear Operator Theory Linear operators act on functions like matrices act on vectors or discrete representations ( ) hu ( ) = Mo f ( u) M is a linear operator. f and h are functions of u a and b are scalars Basic linearity relations hold f and g are functions M o( af + bg) = a( M of ) + b( M og) Eamples include integration and differentiation ( K o f )() u = k(,) u v f () v dv f ( Do f )( u) = ( u) u Linear Operator Equation lu () = eu () + lv () Ku (,) v dv Kernel of equation Light Transport Operator L = E + KL Can be discretized to a simple matri equation [or system of simultaneous linear equations] (L, E are vectors, K is the light transport matri) Solving the Rendering Equation Too hard for analytic solution, numerical methods Approimations, that compute different terms, accuracies of the rendering equation Two basic approaches are ray tracing, radiosity. More formally, Monte Carlo and Finite Element. Today Monte Carlo path tracing is core rendering method Monte Carlo techniques sample light paths, form statistical estimate (eample, path tracing) Finite Element methods discretize to matri equation 3

Solving the Rendering Equation General linear operator solution. Within raytracing: General class numerical Monte Carlo methods Approimate set of all paths of light in scene L = E + KL IL KL = E (I K)L = E L = (I K) E Binomial Theorem L = (I + K + K + K 3 +...)E L = E + KE + K E + K 3 E +... Term n corresponds to n bounces of light Ray Tracing L = E + KE + K E + K 3 E +... Emission directly From light sources Direct Illumination on surfaces Global Illumination (One bounce indirect) [Mirrors, Refraction] (Two bounce indirect) [Caustics etc] Ray Tracing L = E + KE + K E + K 3 E +... Emission directly From light sources Direct Illumination on surfaces OpenGL Shading Global Illumination (One bounce indirect) [Mirrors, Refraction] (Two bounce indirect) [Caustics etc] Outline Reflectance Equation (review) Global Illumination Rendering Equation As a general Integral Equation and Operator Approimations (Ray Tracing, Radiosity) Surface Parameterization (Standard Form) Rendering Equation Surfaces (interreflection) da ωi ω r ω i : L (, ω ) = L (, ω ) + L (, ω ) f(, ω, ω )cosθ dω r dω i UNKNOWN r e r r i i r i Emission Reflected BRDF Light Cosine of KNOWN UNKNOWN KNOWN KNOWN i 4

Change of Variables Lr(, r) = Le(, r) + Lr(, i) f(, i, r)cosθid i Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables) ω ω ω ω ω ω Change of Variables Lr(, r) = Le(, r) + Lr(, i) f(, i, r)cosθid i Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables) ω ω ω ω ω ω cosθi cosθo Lr(, ωr) = Le(, ωr) + Lr(, ωi) f(, ωi, ωr) all visible to θ o θ i ω i ω i dω i cosθo dωi = cosθo dωi = cosθicosθo G (, ) = G (, ) = Rendering Equation: Standard Form Lr(, ωr) = Le(, ωr) + Lr(, ωi) f(, ωi, ωr)cosθidωi Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables) cosθi cosθo Lr(, ωr) = Le(, ωr) + Lr(, ωi) f(, ωi, ωr) all visible to Domain integral awkward. Introduce binary visibility fn V L (, ω) = L (, ω) + L (, ω) f(, ωω, ) G( V, ) (, ) r r e r r all surfaces i i r Same as equation.5 Cohen Wallace. It swaps primed And unprimed, omits angular args of BRDF, - sign. Same as equation above 9.3 in Shirley, ecept he has no emission, slightly diff. notation cosθo dωi = cosθicosθo G (, ) = G (, ) = Summary Theory for all global illumination methods (ray tracing, path tracing, radiosity) We derive Rendering Equation [Kajiya 86] Major theoretical development in field Unifying framework for all global illumination Discuss eisting approaches as special cases Motivation: Monte Carlo Integration Eample: Soft Shadows Rendering = integration Reflectance equation: Integrate over incident illumination Rendering equation: Integral equation Many sophisticated shading effects involve integrals Antialiasing Soft shadows Indirect illumination Caustics Most Sampling/Reconstruction treats actual rendering as a black bo. But still helpful to know some basics 5

Monte Carlo Algorithms based on statistical sampling and random numbers Coined in the beginning of 94s. Originally used for neutron transport, nuclear simulations Von Neumann, Ulam, Metropolis, Canonical eample: D integral done numerically Choose a set of random points to evaluate function, and then average (epectation or statistical average) Monte Carlo Algorithms Advantages Robust for comple integrals in computer graphics (irregular domains, shadow discontinuities and so on) Efficient for high dimensional integrals (common in graphics: time, light source directions, and so on) Quite simple to implement Work for general scenes, surfaces Easy to reason about (but care taken re statistical bias) Disadvantages Noisy Slow (many samples needed for convergence) Not used if alternative analytic approaches eist (but those are rare) Integration in D We can approimate f ()d =? f ()d g()d f() f() g() Standard integration methods like trapezoidal rule and Simpsons rule Advantages: Converges fast for smooth integrands Deterministic = = Disadvantages: Eponential compleity in many dimensions Not rapid convergence for discontinuities Slide courtesy of Peter Shirley Slide courtesy of Peter Shirley Or we can average f ()d = E(f ()) Estimating the average f ()d = N f ( ) i N i= f() = E(f()) f() N Monte Carlo methods (random choose samples) E(f()) Advantages: Robust for discontinuities Converges reasonably for large dimensions Can handle comple geometry, integrals Relatively simple to implement, reason about Slide courtesy of Peter Shirley Slide courtesy of Peter Shirley 6

f() Other Domains b a f ()d < f > ab = b a N N i= f ( i ) Multidimensional Domains Same ideas apply for integration over Piel areas Surfaces Projected areas Directions f ()d = N Eye N f ( ) i UGLY i= Camera apertures Time Paths Piel =a =b Slide courtesy of Peter Shirley Surface Random Variables Epected Value Describes possible outcomes of an eperiment In discrete case, e.g. value of a dice roll [ = -6] Probability p associated with each (/6 for dice) Continuous case is obvious etension Epectation For Dice eample: Discrete: E() = p i i n i= Continuous: E() = p()f () d n E() = 6 i = 6 + + 3 + 4 + 5 + 6 i= ( ) = 3.5 Sampling Techniques Problem: how do we generate random points/ directions during path tracing? Non-rectilinear domains Importance (BRDF) Stratified Eye Surface 7

Generating Random Points Uniform distribution: Use random number generator Generating Random Points Specific probability distribution: Function inversion Rejection Metropolis Probability Probability W W Common Operations Want to sample probability distributions Draw samples distributed according to probability Useful for integration, picking important regions, etc. Common distributions Disk or circle Uniform Upper hemisphere for visibility Area luminaire Comple lighting like an environment map Comple reflectance like a BRDF Generating Random Points Cumulative Probability W 8

Rejection Sampling Probability W More formally 9

Importance Sampling Put more samples where f() is bigger E(f()) f ()d = N Y i Y i = f ( i ) p( i ) N i= N Importance Sampling Importance Sampling This is still unbiased E(f()) N E Y i = Y()p()d = f () p() p()d = f ()d for all N Zero variance if p() ~ f() E(f()) N p() = cf () Y i = f ( i ) p( i ) = c Var(Y) = Less variance with better importance sampling

Stratified Sampling Estimate subdomains separately E k (f()) Arvo Stratified Sampling Less overall variance if less variance in subdomains E k (f()) Var F N = M N k= N i Var F i N N More Information Veach PhD thesis chapter (linked to from website) Course Notes (links from website) Mathematical Models for Computer Graphics, Stanford, Fall 997 State of the Art in Monte Carlo Methods for Realistic Image Synthesis, Course 9, SIGGRAPH