Foundations of Computer Graphics (Fall 2012)

25
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 26: Global Illumination http://inst.eecs.berkeley.edu/~cs184

description

Foundations of Computer Graphics (Fall 2012). http:// inst.eecs.berkeley.edu /~cs184. CS 184, Lecture 26: Global Illumination. Illumination Models. So far considered mainly local illumination Light directly from light sources to surface Global Illumination: multiple bounces - PowerPoint PPT Presentation

Transcript of Foundations of Computer Graphics (Fall 2012)

Page 1: Foundations of Computer Graphics  (Fall  2012)

Foundations of Computer Graphics (Fall 2012)

CS 184, Lecture 26: Global Illumination

http://inst.eecs.berkeley.edu/~cs184

Page 2: Foundations of Computer Graphics  (Fall  2012)

Illumination ModelsSo far considered mainly local illumination

Light directly from light sources to surface

Global Illumination: multiple bounces Already ray tracing: reflections/refractions

Some images courtesy Henrik Wann Jensen

Page 3: Foundations of Computer Graphics  (Fall  2012)

Global IlluminationDiffuse interreflection, color bleeding [Cornell Box]

Page 4: Foundations of Computer Graphics  (Fall  2012)

Global IlluminationCaustics: Focusing through specular surface

Major research effort in 80s, 90s till today

Page 5: Foundations of Computer Graphics  (Fall  2012)

Overview of lecture Theory for all methods (ray trace, radiosity) We derive Rendering Equation [Kajiya 86]

Major theoretical development in field Unifying framework for all global illumination

Discuss existing approaches as special cases

Fairly theoretical lecture (but important). Not well covered in any of the textbooks. Closest are 2.6.2 in Cohen and Wallace handout (but uses slightly different notation, argument [swaps x, x’ among other things])

Page 6: Foundations of Computer Graphics  (Fall  2012)

Outline

Reflection Equation (review) Global Illumination Rendering Equation As a general Integral Equation and Operator Approximations (Ray Tracing, Radiosity) Surface Parameterization (Standard Form)

Page 7: Foundations of Computer Graphics  (Fall  2012)

Reflection Equation

r

x

Reflected Light(Output Image)

Emission Incident Light (fromlight source)

BRDF Cosine of Incident angle

Page 8: Foundations of Computer Graphics  (Fall  2012)

Reflection Equation

r

x

Reflected Light(Output Image)

Emission Incident Light (fromlight source)

BRDF Cosine of Incident angle

Sum over all light sources

Page 9: Foundations of Computer Graphics  (Fall  2012)

Reflection Equation

r

x

( , ) ( , ) ( , ) ( , , ) cosr r e r i i i r iiL x L x L x df x

Reflected Light(Output Image)

Emission Incident Light (fromlight source)

BRDF Cosine of Incident angle

Replace sum with integral

id

Page 10: Foundations of Computer Graphics  (Fall  2012)

Global Illumination

r

x

Reflected Light(Output Image)

Emission ReflectedLight (fromsurface)

BRDF Cosine of Incident angle

id

Surfaces (interreflection)

dA

Page 11: Foundations of Computer Graphics  (Fall  2012)

Rendering Equation

r

x

Reflected Light(Output Image)

Emission ReflectedLight

BRDF Cosine of Incident angle

id

Surfaces (interreflection)

dA

UNKNOWN UNKNOWNKNOWN KNOWN KNOWN

Page 12: Foundations of Computer Graphics  (Fall  2012)

Rendering Equation (Kajiya 86)

Page 13: Foundations of Computer Graphics  (Fall  2012)

Outline

Reflectance Equation (review) Global Illumination Rendering Equation As a general Integral Equation and Operator Approximations (Ray Tracing, Radiosity) Surface Parameterization (Standard Form)

The material in this part of the lecture is fairly advanced andnot covered in any of the texts. The slides should be fairlycomplete. This section is fairly short, and I hope some of youwill get some insight into solutions for general global illumination

Page 14: Foundations of Computer Graphics  (Fall  2012)

Rendering Equation as Integral Equation

Reflected Light(Output Image)

Emission ReflectedLight

BRDF Cosine of Incident angle

UNKNOWN UNKNOWNKNOWN KNOWN KNOWN

Is a Fredholm Integral Equation of second kind [extensively studied numerically] with canonical form

Kernel of equation

Page 15: Foundations of Computer Graphics  (Fall  2012)

Linear Operator Equation

( ) ( )( ) ( , )l u e u K u dvl v v Kernel of equationLight Transport Operator

Can be discretized to a simple matrix equation[or system of simultaneous linear equations] (L, E are vectors, K is the light transport matrix)

Page 16: Foundations of Computer Graphics  (Fall  2012)

Solution Techniques All global illumination methods try to solve

(approximations of) the rendering equation– Too hard for analytic solution: numerical methods– General theory of solving integral equations

Radiosity (next lecture; usually diffuse surfaces)– General class numerical finite element methods (divide

surfaces in scene into a finite set elements or patches)– Set up linear system (matrix) of simultaneous equations– Solve iteratively

Page 17: Foundations of Computer Graphics  (Fall  2012)

Ray Tracing and extensions– General class numerical Monte Carlo methods– Approximate set of all paths of light in scene

Binomial Theorem

Page 18: Foundations of Computer Graphics  (Fall  2012)

Ray Tracing

Emission directlyFrom light sources

Direct Illuminationon surfaces

Global Illumination(One bounce indirect)[Mirrors, Refraction]

(Two bounce indirect) [Caustics etc]

Page 19: Foundations of Computer Graphics  (Fall  2012)

Ray Tracing

Emission directlyFrom light sources

Direct Illuminationon surfaces

Global Illumination(One bounce indirect)[Mirrors, Refraction]

(Two bounce indirect) [Caustics etc]

OpenGL Shading

Page 20: Foundations of Computer Graphics  (Fall  2012)

Outline

Reflectance Equation (review) Global Illumination Rendering Equation As a general Integral Equation and Operator Approximations (Ray Tracing, Radiosity) Surface Parameterization (Standard Form)

Page 21: Foundations of Computer Graphics  (Fall  2012)

Rendering Equation

x

Reflected Light(Output Image)

Emission ReflectedLight

BRDF Cosine of Incident angle

Surfaces (interreflection)

UNKNOWN UNKNOWNKNOWN KNOWN KNOWN

Page 22: Foundations of Computer Graphics  (Fall  2012)

Change of Variables

Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables)

( , ) ( , ) ( , ) ( , , ) cosr r e r r i i r i iL x L x L x df x

i

Page 23: Foundations of Computer Graphics  (Fall  2012)

Change of Variables

Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables)

( , ) ( , ) ( , ) ( , , ) cosr r e r r i i r i iL x L x L x df x

all visible2

to

cos cos( , ) ( , ) ( , ) ( , , )| |

i or r e r r i i r

x x

L x L x L x f xx

dx

A

Page 24: Foundations of Computer Graphics  (Fall  2012)

Rendering Equation: Standard Form

Integral over angles sometimes insufficient. Write integral in terms of surface radiance only (change of variables)

Domain integral awkward. Introduce binary visibility fn V

( , ) ( , ) ( , ) ( , , ) cosr r e r r i i r i iL x L x L x df x

all visible2

to

cos cos( , ) ( , ) ( , ) ( , , )| |

i or r e r r i i r

x x

L x L x L x f xx

dx

A

all surfaces

( , ) ( , ) ( , ) ( , , ) ( , ) ( , )r r e r rx

i i rL x L x L x f x G x dAx x V x

Same as equation 2.52 Cohen Wallace. It swaps primedAnd unprimed, omits angular args of BRDF, - sign.

Page 25: Foundations of Computer Graphics  (Fall  2012)

Overview

Theory for all methods (ray trace, radiosity) We derive Rendering Equation [Kajiya 86]

Major theoretical development in field Unifying framework for all global illumination

Discuss existing approaches as special cases