Global Illumination and the Rendering Equation

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

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

Global Illumination and Radiosity

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

The Rendering Equation and Path Tracing

Introduction to Radiosity

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

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

The Rendering Equation & Monte Carlo Ray Tracing

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

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

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

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

CS770/870 Spring 2017 Radiosity

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

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

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

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

CS770/870 Spring 2017 Radiosity

Lecture 7 - Path Tracing

Assignment 3: Path tracing

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

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

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

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

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

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

Global Illumination The Game of Light Transport. Jian Huang

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

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

Core ideas: Neumann series

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

Precomputation-Based Real-Time Rendering

Ambien Occlusion. Lighting: Ambient Light Sources. Lighting: Ambient Light Sources. Summary

Global Illumination. COMP 575/770 Spring 2013

Lightscape A Tool for Design, Analysis and Presentation. Architecture Integrated Building Systems

Recent Advances in Monte Carlo Offline Rendering

The Rendering Equation. Computer Graphics CMU /15-662

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

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

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

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

COMPUTER GRAPHICS COURSE. LuxRender. Light Transport Foundations

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

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

6. Illumination, Lighting

Shadow and Environment Maps

BRDF Computer Graphics (Spring 2008)

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

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

THE goal of rendering algorithms is to synthesize images of virtual scenes. Global illumination

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

Local vs. Global Illumination & Radiosity

Precomputed Radiance Transfer: Theory and Practice

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

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

Illumination Algorithms

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

Anti-aliasing. Images and Aliasing

CS 428: Fall Introduction to. Radiosity. Andrew Nealen, Rutgers, /7/2009 1

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

x ~ Hemispheric Lighting

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

Introduction to Radiosity

Photometric Stereo. Lighting and Photometric Stereo. Computer Vision I. Last lecture in a nutshell BRDF. CSE252A Lecture 7

Simple Lighting/Illumination Models

Sources, shadows and shading

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

Lecture 22: Basic Image Formation CAP 5415

Stochastic Path Tracing and Image-based lighting

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

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)

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

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

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Illumination models: Radiosity analysis

SOME THEORY BEHIND REAL-TIME RENDERING

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

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

Lecture 7: Monte Carlo Rendering. MC Advantages

Illumination Under Trees. Nelson Max University of Tokyo, and University of California, Davis

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

Choosing the Right Algorithm & Guiding

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Illumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2

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

Radiosity. Johns Hopkins Department of Computer Science Course : Rendering Techniques, Professor: Jonathan Cohen

A Frequency Analysis of Light Transport

CS635 Spring Department of Computer Science Purdue University

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

Introduction to Physically-Based Illumination, Radiosity and Shadow Computations for Computer Graphics

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

Chapter 1 Introduction

Other approaches to obtaining 3D structure

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

Computer Graphics. Illumination and Shading

Irradiance Gradients. Media & Occlusions

Transcription:

CS294-13: Special Topics Lecture #3 Advanced Computer Graphics University of California, Berkeley Handout Date??? Global Illumination and the Rendering Equation Lecture #3: Wednesday, 9 September 2009 Lecturer: Ravi Ramamoorthi Scribe: Daniel Ritchie 1 Introduction to Global Illumination Thus far in this course we have mainly considered local illumination; that is, light cast directly from light sources to surfaces. Needless to say, considering only local illumination leaves out a large number of visual effects that are critical for generating realistic imagery. We now turn our attention to global illumination, characterized by multiple bounces of light between light sources and objects. This allows us to capture a variety of interesting effects. Some of them, such as shadows, reflections, and refraction, we have already seen in our discussion of ray tracing (Indeed, ray tracing is a form of global illumination algorithm, as we will see shortly). Others, such as caustics and color bleeding, are new (see Figure 1). We will need to develop a more sophisticated rendering framework in order to capture these effects. Figure 1: Color bleeding demonstrated in the Cornell Box (left); caustics produced by a wineglass (right).

2 CS294-13: Lecture #3 Diffuse Inter-reflection/Color Bleeding: Diffuse inter-reflection refers to indirect light reflected off of diffuse surfaces onto nearby surfaces. In particular, if the diffuse surfaces have strong coloration, this leads to color bleeding, wherein the color of one surface appears to leak, or bleed, onto nearby surfaces. The Cornell box, originally designed by early global illumination researchers at Cornell University, is a classic testing environment for global illumination algorithms. Caustics: When light focuses through a dielectric object, it produces a bright spot known as a caustic. An effect not reproducible by conventional radiosity methods, it has been the subject of much investigation in the late 1980 s, 1990 s, and even today. 2 Overview In this lecture, we ll present a unified theory for all global illumination methods, including ray tracing, path tracing, and radiosity. We ll first review the reflectance equation, then derive the Rendering Equation [Kajiya 86], a more complete description of light transport. This, it turns out, will give us a unified framework for all of our global illumination algorithms. We ll then discuss existing approaches to global illumination as special cases of Kajiya s Rendering Equation. We ll give particular attention to deriving the equations for radiosity, a method for solving a simplified version of the Rendering Equation by assuming that all surfaces are perfect Lambertian (diffuse) reflectors. Path tracing, another popular global illumination algorithm, will be discussed in the next set of lectures. Figure 2: Local geometry for the reflectance equation.

CS294-13: Lecture #3 3 3 Deriving the Rendering Equation Recall the reflectance equation (Figure 2): L r (x, ω r ) = L e (x, ω r ) + L i (x, ω i )f(x, ω i, ω r )(ω i n) This equation describes the reflected radiance L r from a surface x in direction ω r due to incident radiance L i from a single light source. To bring this equation closer to a global description of light transport, we can first extend it to a sum over all light sources in the scene: L r (x, ω r ) = L e (x, ω r ) + L i (x, ω i )f(x, ω i, ω r )(ω i n) This, however, is still an oversimplification. The incident irradiance on a surface is not all due to direct light sources; as we ve seen, a significant portion of it comes from light reflected off of other nearby surfaces. Figure 3: Local geometry for the rendering equation. To capture this idea, we will generalize our equation. Instead of a sum over light sources, we can integrate over all solid angles in the visible hemisphere. We also replace the incident radiance L i with the reflected radiance L r from some other surface in the scene: L r (x, ω r ) = L e (x, ω r ) + = L e (x, ω r ) + Ω Ω L i (x, ω i )f(x, ω i, ω r ) cos θ i dω i L r (x, ω i )f(x, ω i, ω r ) cos θ i dω i

4 CS294-13: Lecture #3 Light sources can be represented as emissive surfaces, so this equation is now fully general (see Figure 3). This equation now globally describes the light transport in a scene, so we ought to be able to celebrate at this point. However, we ve also gotten ourselves into a bind. In order to know the reflected radiance from a surface, we need to know the incident radiance from the other surfaces in the scene but in order to know that, we need to know the reflected radiance from those surfaces, too! Put another way, In order to know L r, we must first know L r. In the equation above, L e and f are known. The crux of the problem lies with the fact that the unknown quantity L r is on the left-hand side of the equation and inside the integral. Fortunately for us, this type of problem has already been the subject of extensive study. In the mathematics community, it is known as a Fredholm Integral Equation of the second kind and has the following canonical form: l(u) = e(u) + l(v)k(u, v)dv where l is the unknown, e is known, and K is the kernel of the integral equation. For the inquisitive, more information is available here. 4 Solving the Rendering Equation The Rendering Equation seems impenetrable as we ve currently written it. Let s apply some linear operator theory to make things more manageable. 4.1 Linear Operator Theory A linear operator acts on functions the way a matrix acts on vectors. In fact, one can think of a real-valued function as an infinite-dimensional vector where each element gives the value of the function when it is evaluated at a particular point. h(u) = (M f)(u) Where M is a linear operator and f and h are functions of u. Just like in the discrete linear algebra with which we re familiar, basic linearity rules still hold (they are called linear operators, after all): M (af + bg) = a(m f) + b(m g) Many common operations on functions can be expressed as linear operators, including (and of interest to us) differentiation and integration: (K f)(u) = k(u, v)f(v)dv

CS294-13: Lecture #3 5 (D f)(u) = df du (u) We also define the idenity operator I, analagous to the identity matrix in the discrete case, to be the operator that takes every function to itself. In other words, I f = f for all functions f. 4.2 Solving in Linear Operator Form With this new knowledge at our disposal, we can rewrite the Rendering Equation in linear operator form: L = E + KL Here, K is the operator representing integration against the kernel (which in our case is the BRDF f modulated by a cosine factor). E and L represent L e and L r not the functions evaluated at a particular location and direction, but the functions themselves. If discretized, E becomes the vector of known light sources, L is the unknown reflected radiance at each measured surface point and outgoing angle, and K (which characterizes the reflectance of light around the scene) is typically called the light transport matrix. With this notational simplification in place, it becomes straightforward to solve the Rendering Equation: IL KL = E (I K)L = E L = E + KL L = (I K) 1 E = (I + K + K 2 + K 3 +...)E = E + KE + K 2 E + K 3 E +... The last two steps invoke the binomial series expansion of (I K) 1. This result, in addition to its simplicity, has an amazingly intuitive physical explanation. The first term, E, gives the emission directly from the light sources. The next term, KE, describes the direct illumination on surfaces. The following term, K 2 E, represents one-bounce indirect lighting. This sequence continues indefinitely, with the (n 2) nd term representing n-bounce indirect lighting. If we sum up infinitely many terms in this sequence, the sum converges to the exact solution of the Rendering Equation (see Figure 4). 4.3 Practical Approaches Instead, ap- Solving the Rendering Equation analytically proves intractably difficult. proximation solutions are used in practice.

6 CS294-13: Lecture #3 Figure 4: Accumulating successive bounces of light. Finite element methods and Monte Carlo methods are the two most popular categories of algorithms used to solve the Rendering Equation. Finite element methods employ some form of discretization to reduce the Rendering Equation to a matrix equation. By contrast, Monte Carlo methods sample possible light paths, generating a statistical estimate of the appearance of a scene. Radiosity is a commonly-used incarnation of the finite element method, and ray/path tracing is a popular Monte Carlo approach. Radiosity initially garnered much attention and excitement in the 1980 s and early 90 s with its ability to render complex diffuse inter-reflection. However, radiosity methods struggle with capturing complex (angle-dependent) reflectance as the scene must be discretized in greater than three dimensions. This leads to difficult meshing problems. As a result, Monte Carlo methods have surpassed radiosity and other finite element methods in popularity. However, radiosity is still frequently used in fields like architecture, where the scenes to be rendered typically behave in a mostly diffuse manner, and the ability to compute illumination once and then render interactive fly-throughs is highly desirable.

CS294-13: Lecture #3 7 5 The (Final) Rendering Equation As we have thus far derived it, the Rendering Equation has this form: L r (x, ω r ) = L e (x, ω r ) + Ω L r (x, ω i )f(x, ω i, ω r ) cos θ i dω i In a practical setting, integrating over the visible hemisphere is sometimes cumbersome or insufficient. It s much more convenient to integrate over all visible surfaces in the scene. To make this change of variables, we must first derive the equivalent form of dω i : Figure 5: Deriving the surface parameterization of the rendering equation. Now the Rendering Equation looks like this: L r (x, ω r ) = L e (x, ω r ) + L r (x, ω i )f(x, ω i, ω r ) cos θ i cos θ o all visible x x x 2 da This is still cumbersome, as the domain of the integral has become somewhat awkward. We can make it an integral over all surfaces in the scene if we introduce a binary visibility function V : L r (x, ω r ) = L e (x, ω r ) + L r (x, ω i )f(x, ω i, ω r )G(x, x )V (x, x )da all x G(x, x ) = G(x, x) = cos θ i cos θ o x x 2 In this last step, we ve also packaged up some terms into G, which we call the geometry factor. We now have, modulo minor notational differences, the canonical form of the Rendering Equation.

8 CS294-13: Lecture #3 5.1 The Radiosity Equation Without much extra work, we can also derive the discretized version of the Rendering Equation used by the radiosity method. Given radiosity s assumption that all surfaces are perfectly diffuse, we can first drop the angular dependence of all terms in our equation: L r (x) = L e (x) + f(x) L r (x )G(x, x )V (x, x )da S Note that this also allows us to move the BRDF f outside the integral entirely. Next, by convention, we change variables from radiance and BRDF to radiosity and albedo: B(x) = E(x) + ρ(x) S B(x )G(x, x )V (x, x ) da π This equation concisely expresses the conservation of light energy at all points in space. Figure 6: Deriving form factors for the radiosity equation. We now take the plunge and discretize this equation over surfaces i,j in the scene: B i = E i + ρ i B j F j i The newly introduced term F j i is the form factor between i and j. Simply put, it is the fraction of light energy leaving surface patch j that arrives anywhere on patch i (see Figure 6). Methods exist to analytically compute form factors between two general polygons [Schroder & Hanrahan 93], but it is often necessary to compute form factors via j

CS294-13: Lecture #3 9 ray tracing or hemicube rasterization when the space between the polygons is occupied by occluders. The final step is to formulate this discretized version of the Rendering Equation as a matrix equation: B i ρ i B j F j i = E i j B i = E i + ρ i B j F j i M ij B j = E i j MB = E where M and E are known and we must solve for B. j M ij = I ij ρ i F i j 6 Conclusion We ve derived the Rendering Equation, a major theoretical development in physicallybased rendering and the basis for a unifying framework for all global illumination algorithms. We ve also seen how existing global illumination methods such as radiosity and ray tracing can be described as solving special cases of the problem posed by this equation. In the next set of lectures, we ll explore the practical issues of numerically solving the Rendering Equation with Monte Carlo path tracing methods.