Computer graphics III – Rendering equation and its solution

Slides:



Advertisements
Similar presentations
The Radiance Equation.
Advertisements

Computer graphics & visualization Global Illumination Effects.
Lecture 14 Illumination II – Global Models
Many-light methods – Clamping & compensation
Advanced Computer Graphics
Photorealistic Rendering. Ray tracing v. photorealistic rendering What illumination effects are not captured by ray tracing? What illumination effects.
The Radiance Equation Mel Slater. Outline Introduction Light Simplifying Assumptions Radiance Reflectance The Radiance Equation Traditional Rendering.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Photon Tracing with Arbitrary Materials Patrick Yau.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 10: Global Illumination Ravi Ramamoorthi Some images courtesy.
Everything on Global Illumination Xavier Granier - IMAGER/UBC.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
Recent Advances in Radiosity Philippe Bekaert Department of Computer Science K.U.Leuven.
The Radiosity Method Donald Fong February 10, 2004.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity
Paper by Alexander Keller
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
1 Dr. Scott Schaefer Radiosity. 2/38 Radiosity 3/38 Radiosity Physically based model for light interaction View independent lighting Accounts for indirect.
CSCE 441 Computer Graphics: Radiosity Jinxiang Chai.
Computer Graphics (Spring 2008) COMS 4160, Lecture 22: Global Illumination
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Global Illumination Jian Huang, CS 594, Fall 2002 This set of slides reference text book and the course note of Dutre et. al on SIGGRAPH 2001.
Global Illumination. Direct Illumination vs. Global Illumination reflected, scattered and focused light (not discreet). physical-based light transport.
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
-Global Illumination Techniques
02/16/05© 2005 University of Wisconsin Last Time Re-using paths –Irradiance Caching –Photon Mapping.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Global Illumination Models THE WHITTED IMAGE - BASIC RECURSIVE RAY TRACING Copyright © 1997 A. Watt and L. Cooper.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Radiosity K. H. Ko School of Mechatronics Gwangju Institute.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
111/17/ :21 Graphics II Global Rendering and Radiosity Session 9.
Radisoity Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New.
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.
Instant Radiosity Alexander Keller University Kaiserslautern Present by Li-Fong Lin.
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.
Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces ­Not real scenes Rendering equation describes general shading problem.
02/12/03© 2003 University of Wisconsin Last Time Intro to Monte-Carlo methods Probability.
Computer Graphics III – Monte Carlo integration Direct illumination
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Stochastic Path Tracing Algorithms K. H. Ko School of Mechatronics Gwangju.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
1. Ray Casting Surface intersection Visible surface detection Ray Tracing Bounce the ray Collecting intensity Technique for global reflection and transmission.
Global Illumination (3) Photon Mapping (1). Overview Light Transport Notation Path Tracing Photon Mapping –Photon Tracing –The Photon Map.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
Distributed Ray Tracing. Can you get this with ray tracing?
Graphics Lecture 14: Slide 1 Interactive Computer Graphics Lecture 14: Radiosity - Computational Issues.
Distributed Ray Tracing. Can you get this with ray tracing?
CS552: Computer Graphics Lecture 33: Illumination and Shading.
Computer graphics III – Multiple Importance Sampling Jaroslav Křivánek, MFF UK
Computer Graphics: Illumination
Computer graphics III – Path tracing Jaroslav Křivánek, MFF UK
Advanced Computer Graphics
Advanced Computer Graphics
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Sampling and Reconstruction of Visual Appearance
The Rendering Equation
Path Tracing (some material from University of Wisconsin)
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Radiosity.
CSCE 441 Computer Graphics: Radiosity
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Lecture 25 Radiosity.
Foundations of Computer Graphics (Spring 2012)
Advanced Computer Graphics
OPTICS III, IV: Global Illumination
Presentation transcript:

Computer graphics III – Rendering equation and its solution Jaroslav Křivánek, MFF UK Jaroslav.Krivanek@mff.cuni.cz

Global illumination – GI Direct illumination Global = direct + indirect 2

Review: Reflection equation “Sum” (integral) of contributions over the hemisphere: dwi Lo(x, wo) qo n Li(x, wi) qi Total outgoing rad. Emitted radiance Reflected rad. Lr(x, wo)

From local reflection to global light transport Reflection equation (local reflection) Where does the incoming radiance Li(x, wi) come from? From other places in the scene ! x r(x, wi) Li(x,wi) Lo( r(x, wi), -wi) = Ray casting function CG III (NPGR010) - J. Křivánek 2015

From local reflection to global light transport Plug for Li into the reflection equation Incoming radiance Li drops out Outgoing radiance Lo at x described in terms of Lo at other points in the scene CG III (NPGR010) - J. Křivánek 2015

CG III (NPGR010) - J. Křivánek 2015 Rendering equation Remove the subscript “o” from the outgoing radiance: Description of the steady state = energy balance in the scene Rendering = calculate L(x, wo) for all points visible through pixels, such that it fulfils the rendering equation CG III (NPGR010) - J. Křivánek 2015

Reflection equation vs. Rendering equation Similar form – different meaning Reflection equation Describes local light reflection at a single point Integral that can be used to calculate the outgoing radiance if we know the incoming radiance Rendering equation Condition on the global distribution of light in scene Integral equation – unknown quantity L on both sides

Rendering Equation – Kajiya 1986 CG III (NPGR010) - J. Křivánek 2015

Path tracing sketch

Recursive unwinding of the RE Angular form of the RE To calculate L(x, wo), we need to calculate L(r(x, w’), -w’) for all directions w’ around the point x For the calculation of each L(r(x, w’), -w’), we need to do the same thing recursively, etc. r( r(x,w’), w’) w’’ r(x, w’) w’ wo x CG III (NPGR010) - J. Křivánek 2015

Path tracing, v. zero (recursive form) getLi (x, ω): y = traceRay(x, ω) return Le(y, –ω) + // emitted radiance Lr (y, –ω) // reflected radiance Lr(x, ω): ω′ = genUniformHemisphereRandomDir( n(x) ) return 2p * brdf(x, ω, ω′) * dot(n(x), ω′) * getLi(x, ω′) CG III (NPGR010) - J. Křivánek 2015

Back to the theory: Angular and area form of the rendering equation

Angular vs. area form of the RE Angular form integral over the hemisphere in incoming directions Substitution CG III (NPGR010) - J. Křivánek 2015

Angular vs. area form of the RE Integral over the scene surface scene surface visibility 1 … y visible from x 0 … otherwise geometry term CG III (NPGR010) - J. Křivánek 2015

CG III (NPGR010) - J. Křivánek 2015 Angular form Add radiance contributions to a point from all directions For each direction, find the nearest surface Implementation in stochastic path tracing: For a given x, generate random direction(s), for each find the nearest intersection, return the outgoing radiance at that intersection and multiply it with the cosine-weighted BRDF. Average the result of this calculation over all the generated directions over the hemisphere. CG III (NPGR010) - J. Křivánek 2015

CG III (NPGR010) - J. Křivánek 2015 Area form Sum up contributions to a point from all other points on the scene surface Contribution added only if the two points are mutually visible Implementation in stochastic path tracing: Generate randomly point y on scene geometry. Test visibility between x and y. If mutually visible, add the outgoing radiance at y modulated by the geometry factor. Typical use: direct illumination calculation for area light sources CG III (NPGR010) - J. Křivánek 2015

Most rendering algorithms = (approximate) solution of the RE Local illumination (OpenGL) Only point sources, integral becomes a sum Does not calculate equilibrium radiance, is not really a solution of the RE Finite element methods (radiosity) [Goral, ’84] Discretize scene surface (finite elements) Disregard directionality of reflections: everything is assumed to be diffuse Cannot reproduce glossy reflections CG III (NPGR010) - J. Křivánek 2015

Most rendering algorithms = (approximate) solution of the RE Ray tracing [Whitted, ’80] Direct illumination on diffuse and glossy surfaces due to point sources Indirect illumination only on ideal mirror reflection / refractions Cannot calculate indirect illumination on diffuse and glossy scenes, soft shadows etc. … Distributed ray tracing [Cook, ’84] Estimate the local reflection using the MC method Can calculate soft shadows, glossy reflections, camera defocus blur, etc. CG III (NPGR010) - J. Křivánek 2015

Most rendering algorithms = (approximate) solution of the RE Path tracing [Kajiya, ’86] True solution of the RE via the Monte Carlo method Tracing of random paths (random walks) from the camera Can calculate indirect illumination of higher order CG III (NPGR010) - J. Křivánek 2015

From the rendering equation to finite element radiosity

From the rendering equation to radiosity Start from the area form of the RE: The Radiosity method– assumptions Only diffuse surfaces (BRDF constant in wi and wo) Radiosity (i.e. radiant exitance) is spatially constant (flat) over the individual elements CG III (NPGR010) - J. Křivánek 2015

From the rendering equation to radiosity Diffuse surfaces only The BRDF is constant in wi and wo Outgoing radiance is independent of wo and it is equal to radiosity B divided by p CG III (NPGR010) - J. Křivánek 2015

From the rendering equation to radiosity Spatially constant (flat) radiosity B of the contributing surface elements Radiosity of the j-th element Geometry factor between surface element j and point x CG III (NPGR010) - J. Křivánek 2015

From the rendering equation to radiosity Spatially constant (flat) radiosity of the receiving surface element i: Average radiosity over the element … form factor CG III (NPGR010) - J. Křivánek 2015

Classic radiosity equation System of linear equations Form factors Conclusion: the radiosity method is nothing but a way to solve the RE under a specific set of assumptions CG III (NPGR010) - J. Křivánek 2015

CG III (NPGR010) - J. Křivánek 2015 Radiosity method Classical radiosity Form facto calculation (Monte Carlo, hemicube, …) Solve the linear system (Gathering, Shooting, …) Stochastic radiosity Avoids explicit calculation of form factors Metoda Monte Carlo Radiosity is not practical, not used Scene subdivision -> sensitive to the quality of the geometry model (but in reality, models are always broken) High memory consumption, complex implementation CG III (NPGR010) - J. Křivánek 2015

The operator form of the RE

RE is a Fredhom integral equation of the 2nd kind General form the Fredholm integral equation of the 2nd kind Rendering equation: equation “kernel” unknown function known functions CG III (NPGR010) - J. Křivánek 2015

CG III (NPGR010) - J. Křivánek 2015 Linear operators Linear operators act on functions (as matrices act on vectors) The operator is linear if the “acting” is a linear operation Examples of linear operators CG III (NPGR010) - J. Křivánek 2015

CG III (NPGR010) - J. Křivánek 2015 Transport operator Rendering equation CG III (NPGR010) - J. Křivánek 2015

Solution of the RE in the operator form Rendering equation Formal solution unusable in practice – the inverse cannot be explicitly calculated CG III (NPGR010) - J. Křivánek 2015

Expansion of the rendering equation Recursive substitution L n-fold repetition yields the Neumann series CG III (NPGR010) - J. Křivánek 2015

Expansion of the rendering equation If T is a contraction (tj. ||T|| < 1, which holds for the RE), then Solution of the rendering equation is then given by CG III (NPGR010) - J. Křivánek 2015

A different derivation of the Neumann series Formal solution of the rendering equation Proposition Proof CG III (NPGR010) - J. Křivánek 2015

CG III (NPGR010) - J. Křivánek 2015 Rendering equation Solution: Neumann series CG III (NPGR010) - J. Křivánek 2015

Progressive approximation CG III (NPGR010) - J. Křivánek 2015

Progressive approximation Each application of T corresponds to one step of reflection & light propagation OpenGL shading one-bounce indirect illumination emission direct illumination two-bounce indirect illumination CG III (NPGR010) - J. Křivánek 2015

CG III (NPGR010) - J. Křivánek 2015 Contractivity of T Holds for all physically correct models Follows from the conservation of energy It means that repetitive application of the operator lower the remaining light energy (makes sense, since reflection/refraction cannot create energy) Scenes with white or highly specular surfaces reflectivity close to 1 to achieve convergence, we need to simulate more bounces of light CG III (NPGR010) - J. Křivánek 2015

Alright, so what have we achieved? Rendering equation Solution through the Neumann series We have replaced an integral equation by a sum of simple integrals Great we know how to calculate integrals numerically (the Monte Carlo method), which means that we know how to solve the RE, and that means that we can render images, yay! Recursive application to T corresponds to the recursive ray tracing from the camera CG III (NPGR010) - J. Křivánek 2015

What exact integral are we evaluating, then? CG III (NPGR010) - J. Křivánek 2015

Paths vs. recursion: Same thing, depends on how we look at it Paths in a high-dimensional path space Recursive solution of a series of nested (hemi)spherical integrals: CG III (NPGR010) - J. Křivánek 2015

Recursive interpretation We’ve seen this already, right? But unlike at the beginning of the lecture, by now we know this actually solves the RE. Angular form of the RE To calculate L(x, wo) I need to calculate L(r(x, w’), -w’) for all directions w’ around the point x. For the calculation of each L(r(x, w’), -w’) I need to do the same thing recursively etc. r( r(x,w’), w’) w’’ r(x, w’) w’ wo x CG III (NPGR010) - J. Křivánek 2015

Path tracing, v. zero (recursive form) getLi (x, ω): y = traceRay(x, ω) return Le(y, –ω) + // emitted radiance Lr (y, –ω) // reflected radiance Lr(x, ω): ω′ = genUniformHemisphereRandomDir( n(x) ) return 2p * brdf(x, ω, ω′) * dot(n(x), ω′) * getLi(x, ω′) CG III (NPGR010) - J. Křivánek 2015

Path tracing, v. 2012, Arnold Renderer © 2012 Columbia Pictures Industries, Inc. All Rights Reserved. CG III (NPGR010) - J. Křivánek 2015

Ale samozrejme nechceme nase know-how pouze vyvazet ven a proto jsme zalozili domaci firmu, ktera vyviji renderovaci software jmenem Corona Renderer. Hlavnim vyvojarem a tahounem tohoto projektu je nas byvaly doktorand Ondra Karlik na teto fotce.

CG III (NPGR010) - J. Křivánek 2015 Path tracing [Kajiya86] Only one secondary ray at each intersection Random selection of interaction (diffuse reflection, refraction, etc., …) Direct illumination: two strategies Hope that the generated secondary ray hits the light source, or Explicitly pick a point on the light source Trace hundreds of paths through each pixel and average the result Advantage over distributed ray tracing: now branching of the ray tree means no explosion of the number of rays with recursion depth CG III (NPGR010) - J. Křivánek 2015