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

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

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

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

Global Illumination The Game of Light Transport. Jian Huang

Global Illumination and the Rendering Equation

CS770/870 Spring 2017 Radiosity

CS770/870 Spring 2017 Radiosity

The Rendering Equation & Monte Carlo Ray Tracing

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

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

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

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Introduction to Radiosity

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

Radiometry and reflectance

The Rendering Equation and Path Tracing

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

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

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

Lecture 7 - Path Tracing

CS184 LECTURE RADIOMETRY. Kevin Wu November 10, Material HEAVILY adapted from James O'Brien, Brandon Wang, Fu-Chung Huang, and Aayush Dawra

Global Illumination and Radiosity

The Design and Implementation of a Radiosity Renderer. Alexandru Telea

The Rendering Equation. Computer Graphics CMU /15-662

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

Capturing light. Source: A. Efros

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

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

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

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

Local vs. Global Illumination & Radiosity

Reflection models and radiometry Advanced Graphics

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

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

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

6. Illumination, Lighting

Measuring Light: Radiometry and Cameras

The Light Field. Last lecture: Radiometry and photometry

782 Schedule & Notes

And if that 120MP Camera was cool

Image Formation: Light and Shading. Introduction to Computer Vision CSE 152 Lecture 3

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

Modelling of radiative heat transfer applying computer graphics software

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

Radiometry & BRDFs CS295, Spring 2017 Shuang Zhao

dq dt I = Irradiance or Light Intensity is Flux Φ per area A (W/m 2 ) Φ =

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

Electromagnetic waves and power spectrum. Rays. Rays. CS348B Lecture 4 Pat Hanrahan, Spring 2002

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

Lights, Surfaces, and Cameras. Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons

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

Illumination. Courtesy of Adam Finkelstein, Princeton University

Lighting and Reflectance COS 426

CS667 Lecture Notes: Radiometry

Lecture 22: Basic Image Formation CAP 5415

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

Light Field = Radiance(Ray)

Announcements. Image Formation: Light and Shading. Photometric image formation. Geometric image formation

Biased Monte Carlo Ray Tracing

Radiometry, Radiosity and Photon Mapping

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

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

Announcements. Radiometry and Sources, Shadows, and Shading

Anti-aliasing. Images and Aliasing

BRDF Computer Graphics (Spring 2008)

Simple Lighting/Illumination Models

Measuring Light: Radiometry and Photometry

CS667 Lecture Notes: Radiometry

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

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

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Rays and Throughput. The Light Field. Page 1

Precomputed Radiance Transfer: Theory and Practice

Radiometry. Radiometry. Measuring Angle. Solid Angle. Radiance

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

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

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

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

13 Distribution Ray Tracing

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

Engineered Diffusers Intensity vs Irradiance

Spectral Color and Radiometry

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

Reflectance & Lighting

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

Understanding Variability

Illumination and Shading - II

Realtime Shading of Folded Surfaces

Measuring Light: Radiometry and Photometry

Radiometry. Computer Graphics CMU /15-662, Fall 2015

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

Introduction to Radiosity

dq dt I = Irradiance or Light Intensity is Flux Φ per area A (W/m 2 ) Φ =

Parallel Monte Carlo Sampling Scheme for Sphere and Hemisphere

Clustering for Glossy Global Illumination

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

EE Light & Image Formation

Surface Rendering Methods

Radiometry. Reflectance & Lighting. Solid Angle. Radiance. Radiance Power is energy per unit time

A Frequency Analysis of Light Transport

Transcription:

Introduction to Physically-Based Illumination, Radiosity and Shadow Computations for Computer Graphics Eugene Fiume Department of Computer Science University of Toronto 1 CSC2522 Lecture Notes January, 2015

Overview physically-based illumination models for computer graphics are maturing. tutorial on concepts of physically-based models. introduction to light transport (rendering equation). overview ofradiosity-based approach. 2 CSC2522 Lecture Notes January, 2015

Solid Angle dθ r sin θ r da dω θ φ dφ Differential surface element da on sphere ofradius r: da = (longitudinal arc length) (latitudinal arc length) = (r dθ )(r sin θ dφ) = r 2 sin θ dθ dφ. Differential solid angle dω (on sphere of radius 1): dω = da r 2 = sin θ dθ dφ. Solid angle (in steradians) requires (messy) contour integral. 3 CSC2522 Lecture Notes January, 2015

Idon t think this is very clear The longitudinal arc is on a circle of radius r that slices through the sphere and includes the origin. So, what s the arc length of part of a circle? Let s suppose that this circle is parameterised by X(θ ) = r sin θ, Y (θ ) = r cos θ. The arc length of a part of the circle described by angle θ is But look at the integrand: θ + θ θ Ẋ 2 + Ẏ 2 dθ. Ẋ 2 + Ẏ 2 = r 2 (sin 2 θ + cos 2 θ ) = r. So, the length of the longitidinal arc is just r dθ. Remember the parametric definition of a sphere: x(θ, φ) = r sin θ sin φ, y(θ, φ) = r sin θ cos φ, z(θ ) = r cos θ. Holding θ constant gives us a latitudinal circle of radius r sin θ in the z=r cos θ plane. So the length of the latititudinal arc is r sin θ dφ. 4 CSC2522 Lecture Notes January, 2015

Solid Angle Properties Surface area of unit hemisphere = 2π steradians (sr). Surface area of unit sphere = 4π steradians (sr). Just do the integral: S 0 2π sin φ dφ dθ, where S=π /2 for the hemisphere and π for the sphere. Practical Solid Angle Computation 0 N θ r polygon P with area A R ω O 1 Solid angle of P: projected area of P onto sphere in direction of O. Approximation: if r << R so that projection of P on sphere is almost planar, then approximate solid angle definition by w = A cos θ R 2. 5 CSC2522 Lecture Notes January, 2015

Geometry of Basic Projection Suppose we have a beam of thickness L projecting onto a locally planar region with normal N. Assume the beam make has an incidence angle of θ with the plane. N cos θ = L / M L θ π/2 θ M L = M cosθ M = L / cosθ θ Then we have the above relations. 6 CSC2522 Lecture Notes January, 2015

Physical Lighting Terminology What is this intensity stuff anyway? They are all measures of power density w.r.t. solid angles and area (and power is a measure of energy density w.r.t. time). Radiant power (Φ): Rate at which light energy is transmitted (energy/unit time, or Watts, W). Physical term: flux. Radiant Intensity (I): Flux radiated onto a unit solid angle in a given direction (W/sr). E.g., "intensity" of apoint light source. Radiance (L): Radiant intensity per unit projected surface area (W/(m 2 sr )). E.g., "intensity" of reflection of a surface. Irradiance (E): Incident flux density on a locally planar area, in units of flux per unit surface area (W/m 2 ). This is a direction-independent quantity. Radiosity (B): Exitant flux density from a locally planar area, in units of flux per unit surface area (W/m 2 ). These are radiometric quantities, i.e., physical measurements of electromagnetic energy. There are comparable photometric quantities corresponding to psychovisual measurement. 7 CSC2522 Lecture Notes January, 2015

Relationships Between Radiometric Quantities Radiant power: Φ. Irradiance/Radiosity: E, B = dφ da, where dφ = ( Ω is the visible hemisphere, and L is incoming or outgoing radiance. L cos θ dω ) da, Ω Radiant Intensity: I(ω ) = dφ dω. Radiance: the quantity from which we construct the others. Call it L(x, ω ), which is power per unit area radiated to point x along direction ω. Use radiance to denote light carried by a ray in a ray tracer. (NO inverse square law innon-participating media.) Use radiant intensity to denote energy distributions of light sources. (Follows inverse square law.) 8 CSC2522 Lecture Notes January, 2015

Incident Irradiance Suppose incoming radiance from differential solid angle dω i along direction ω i is L i. L i L r N dωi θ i θr φ r φ i Then incident irradiance is E i = L i cos θ i dω i Bidirectional Reflectance Distribution Function To characterise arbitrary reflection functions, write down an expression that relates incident irradiance to outgoing radiance in direction ω r : or f i r = L r E i L r (ω r ) = f i r (θ i, φ i, θ r, φ r ) E i, so bidirectional reflectance distribution function (BRDF) f i r proportion of incident irradiance that is reflected in direction ω r. is 9 CSC2522 Lecture Notes January, 2015

BRDF and Reflectance Units of BRDF are sr 1,and gives density of flux per steradian. BRDF is always positive, and is in fact a true distribution (and really should only be used under an integral). But it is possible for a BRDF to be an "impulse", meaning perfect specular reflection in one direction. Reflectivity or the Reflectance Reflectance acts like a BRDF, but is instead a unitless proper fraction in [0,1]. It is defined as ρ = reflected flux incoming flux = dφ r dφ i. The region of integration gives different kinds of canonical reflectances. Of particular interest to us is this fact: if the surface is Lambertian or diffuse, meaning that incoming light is equally likely to be scattered in all directions, then the hemispheric reflectance is or ρ d = π f i r, f i r = ρ d π. Another nice fact: ρ d = B E. 10 CSC2522 Lecture Notes January, 2015

Physically-Plausible Reflectance Models The use of BRDF allows specification of anisotropic reflection models: fixing i and r but rotating the surface will change directional reflectance. fully plausible, energy-conserving, empirically validated illumination models. models that are really really expensive to compute. Really! How does this sit with traditional illumination models? In fact, it s not that hard to make current models more plausible. Traditionally, local illumination models have been defined as intensity at a point = ambient + diffuse + + specular. That is, I P = k a I a + k d I d + k s I s. As a first step, to translate to physical models, use radiance, and define BRDF as ρ = k d ρ d + k s ρ s, k d +k s = 1, where ρ d is Lambertian reflector and ρ s is your favourite specular reflection function this week. Leave ambient component ad hoc. So, L r = k a L a + (k d ρ d + k s ρ s )E i = k a L a + (k d ρ d + k s ρ s ) L i cos θ i dω i Sum or integrate as appropriate over all light sources. 11 CSC2522 Lecture Notes January, 2015

Rendering Equation (Kajiya and Hanrahan) Characterise all interactions of light from any point x on any surface s with a point x on a surface. The result is an outgoing radiance value. The rendering equation describes a two-point (i.e., one-bounce) light transport. Multi-point transport is got by cascading the equation to get full ray transport problem. Based on radiance. L(x, ω ) = L e (x, ω ) + f (x ; x) L(x, ω ) G(x, x ) V (x, x )da, S where S is all surfaces, and da is a differential element of S, L e (x, ω ) isself-emission, V (x, x ) is1if x is visible to x, and is 0 otherwise, G(x, x ) isageometric scale factor, f (x ; x) is BRDF (actually depends on all angles): light reflected about x from x. Notice that radiance to be computed appears on LHS and under integral. Kajiya proposed some (theoretically) nice ways to compute the equation (including Monte Carlo path tracing and a series expansion). 12 CSC2522 Lecture Notes January, 2015

Radiosity Equation Under Lambertian assumption, the BRDF is independent of incoming, outgoing directions, and can be taken out of the integral. Furthermore, outgoing radiance is direction independent, so we can work with irradiance/radiosity instead. In fact, L(x, ω ) = B(x) π, (*) so we can rewrite the rendering equation as a radiosity equation: B(x) = E(x) + ρ d(x) π B(x ) G(x, x ) V (x, x )da S Notes: This reformulation in terms of radiosity/irradiance can be easily got by multiplying rendering equation by π and changing units. Notice the change from BRDF f to reflectance ρ d. So far, so good, but notice again that radiosity appears on LHS and under integral. From now on, we will bury the visibility term V and 1/π into geometric term G. G will resurface as the integrand for a form factor. 13 CSC2522 Lecture Notes January, 2015

Discretisation of the Radiosity Equation Even the radiosity equation is intractable (let alone the rendering equation), so work with that first. Break all surfaces up into patches or elements and make assumptions about the nature of radiosity. Let there be n patches A i, i= 1,..., n. (By convention, areas of the patches will have same name ouch!) The easiest assumption is that radiosity is constant across a surface. If we can solve for radiosities, then, each element i will have constant radiosity B i. In that case, we get n B i = E i + ρ i Σ B j F ij. To make the derivation clearer, multiply through by A i,which is allowed because A i >0: j=1 n B i A i = E i A i + ρ i Σ B j F ij A i. Physically, what this does is turn an equation in flux density to an equation in flux. We ll see why this is useful on the next slide, when we talk about F ij,the form factor. j=1 14 CSC2522 Lecture Notes January, 2015

Form Factors θ i da i θj r V(x,x ) P i da j A j The term F ij is a form factor and denotes the fraction of energy leaving A i and arriving at A j : F ij = 1 A i A i cos θ i cos θ j V π r 2 ij da j da i. A j That means that A i F ij = A j F ji, so that F ji = F ij A i A j. This is called form-factor reciprocity. 15 CSC2522 Lecture Notes January, 2015

The Radiosity System of Equations Folding form factors back into the radiosity equation, we see that since n B i A i = E i A i + ρ i Σ B j F ij A i. j=1 n = E i A i + ρ i Σ B j F ji A j. Dividing through by A i again gives us j=1 n A B i = E i + ρ i Σ j B j F ji j=1 n = E i + ρ i Σ B j F ij. This expression states that the radiosity (i.e., outgoing flux density) of element i is an accumulation from the emitted flux density of this element, and of contributions of flux radiated onto element i from all other elements. Now, the E i (initial emissions) are the knowns, so rewrite equation in terms of knowns and unknowns in matrix form: j=1 A i E 1 E 2... E n = 1 ρ 1 F 11 ρ 2 F 21... ρ n F n1...... ρ 1 F 1n ρ 2 F 2n... 1 ρ n F nn B 1 B 2... B n 16 CSC2522 Lecture Notes January, 2015

More problems than solutions matrix is O(n 2 )insize, where n, the number of patches, is usually much larger than number of polygons. restricted to closed polyhedral environments. norefraction, specularity, translucency. form-factor computation is very costly, and must be redone whenever a single object moves (but not in principle when the camera moves). how are patches chosen? how to scale up geometric complexity? extension to curved surfaces? how to reconstruct continuous tone images from constant-radiosity patches. costly visibility computations. vast amounts of aliasing. fast shadows? But solution is view independent (?), and independent of initial emissions E i. 17 CSC2522 Lecture Notes January, 2015

Partial Solutions Matrix Size 1. Use iterative methods to solve system row-wise (i.e., for each B i ). Corresponds to gathering radiosity from other patches. 2. Still costly, solook at system in another way. Think instead about distributing radiosity from B i other patches in proportion to form factor. out to In fact, this turns out to solve the system column-wise (incrementally), because for each iteration, i is fixed, corresponding to a column of the radiosity matrix. Corresponds to shooting radiosity. After each iteration, a valid (though incomplete) image can be rendered, so this technique is called progressive refinement. A full radiosity matrix is not needed (only the current column, assuming form factors are cheap to compute). 3. Hierarchical Approaches. Observe that not all patches (via form factors and radiosity matrix) affect each other at the same scale. Create a hierarchy of interactions by grouping together patches with respect to a scale-preserving distance criterion. Related to clustering algorithms for n-body systems in applied physics. Can have O(n) convergence. 18 CSC2522 Lecture Notes January, 2015

Form Factor Computations 1. Use a projection technique called the Nusselt analogue. Use it to discretise the hemisphere into a hemicube. Can have substantial approximation error. 2. Analytic form factor techniques for simple polygons. Mathematically very nice, especially for a reference model, but the functions involved are quite expensive to compute (complex dilogarithm). 3. Ray tracing approaches: used differential form factor computations (area/point to point) to approximate area-area form factors. 4. Hierarchical radiosity techniques reduce the number of form-factors to compute at any time. Optical Phenomena Beyond Diffuse Reflection 1. Some work on participating media: light interacts with environment (e.g., dust, smoke, mist) producing scattering effects. 2. Multipass Algorithms: Do a first-pass radiosity step and use the result like an environment map in a subsequent specular (ray-tracing) pass. 19 CSC2522 Lecture Notes January, 2015

Decomposition into Patches Meshing extremely difficult problem. originally, meshing was done by hand and not talked about. trade-off between view-dependence and the creation of meshes that were far to fine. current approaches now inv olve tracking discontinuities in radiance function due to shadow boundaries and polygon edges. Very active research area. (See video). adaptive meshing, mesh filtering to reduce mesh size. Aliasing and Approximation Error constant radiosity syndrome has now been cured. patch elements are now no longer assumed to carry constant radiosity. In finite element terminology, constant radiosity assumption means that order 1 elements are used. now, patches are assumed to carry variable radiosity. A polynomial basis (usually degree 1 or 2 lagrange basis) is imposed over patch, permitting subsampling of radiosity over patch. improves the approximation, avoids ad hoc reconstruction techniques, and avoids some aliasing error. 20 CSC2522 Lecture Notes January, 2015

Shadow Computations for Area Light Sources possibly the hardest problem of them all. needed for discontinuity meshing. extensive geometric computations. use of aspect graphs to accelerate computation. An aspect graph characterises the parts of a scene that have topologically similar view ofanarea light source. can exploit this structure to scan convert a penumbral shadow. most substantial progress in this area is by U of Toronto! 21 CSC2522 Lecture Notes January, 2015

Most Recent Work at U of Toronto accelerated shadow computations (two papers at SIGGRAPH 94). structured sampling techniques for occluded and unoccluded environments (award winning paper at Eurographics 93). nonuniform radiant intensity distributions for area light sources (CVGIP GMIP 93). illumination in the presence of participating media (SIG- GRAPH 93,95). discontinuity meshing (Graphics Interface 86, TVCG 1997). incremental visibility. Cast of researchers on illumination at UofT includes: Eugene Fiume Sherif Ghali Marc Ouellette Michiel van de Panne James Stewart Jeff Tupper 22 CSC2522 Lecture Notes January, 2015

References The last word on heat transfer (including light): Robert Siegel and John Howell, Thermal Radiation Heat Transfer, Third Edition, Hemisphere Publishing Corporation, 1992. One recent book on this material (despite the backward title): Michael Cohen and John Wallace, Radiosity and Realistic Image Synthesis, Academic Press, 1993. Amore unified and clearer treatment: Francois Sillion and Claude Puech, Radiosity and Global Illumination, Morgan Kaufmann, 1994. Amodern treatment of physically based light transport: Matt Pharr and Greg Humphreys Physically Based Rendering: From Theory to Implementation, Second Edition, Morgan Kaufmann, 2010. And of course the basic literature. 23 CSC2522 Lecture Notes January, 2015

Discussion/Open Questions Isthe radiosity-based technique worth the trouble? What does a physically-plausible illumination model add to my animated toothpaste commercial? Doshadows really need to be computed precisely? 24 CSC2522 Lecture Notes January, 2015