Top Banner
Foundations of Computer Foundations of Computer Graphics (Spring 2010) Graphics (Spring 2010) CS 184, Lecture 21: Radiosity http://inst.eecs.berkeley.edu/~cs184
22

Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Foundations of Computer Graphics Foundations of Computer Graphics (Spring 2010)(Spring 2010)

CS 184, Lecture 21: Radiosity

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

Page 2: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

RadiosityRadiosityCornell box with color bleeding [Goral et al 84]

Page 3: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Photograph of a sculpture.The front faces are all diffuse whiteThe color is because of reflectionfrom rear-facing colored faces

Raytracing makes all faces white.It can handle specular reflection andshadows, but not diffuse-diffuse interreflection or color bleeding

Radiosity correctly captures the color bleeding from the back of the boards to the front.

Page 4: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Advantages and DisadvantagesAdvantages and Disadvantages

Radiosity methods track rate at which energy (radiosity) leaves [diffuse] surfaces

Determine equilibrium of light energy in a view-independent way

Allows for diffuse interreflection, color bleeding, and walkthroughs

Difficult to handle specular objects, mirrors

Page 5: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

General ApproachGeneral Approach

Assume diffuse surfaces discretized into a finite set of patches or finite elements

Radiosity equation is a matrix equation or set of simultaneous linear equations derived by approximations to the rendering equation

Solve iteratively using numerical methods

Page 6: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Earliest Radiosity picturesEarliest Radiosity pictures

Radiosity was first developed in other fields Heat transport, Lighting Design In graphics: Goral et al. 84

Parry Moon and Domina Spencer (MIT), Lighting Design, 1948

Page 7: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

OutlineOutline

Rendering equation review

Radiosity equation

Form factors

Methods to compute form factors

High-level overview only. Best textual reference is probably Sections 16.3.1 and 16.3.2 in FvDFH. This will be handed out. If curious, read the rest of 16.3 and parts of Cohen and Wallace.

Page 8: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Rendering Equation

ir

x

( , ) ( , , ) c( , ) ( , ) ose r i rr r i ir iL x L xL x f x d

Reflected Light(Output Image)

Emission ReflectedLight

BRDF Cosine of Incident angle

id

Surfaces (interreflection)

dAx

UNKNOWN UNKNOWNKNOWN KNOWN KNOWN

i x x

Page 9: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

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

x

x

dA

i

i

i

o

id2

cos

| |o

i

dAd

x x

Page 10: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

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

2

cos

| |o

i

dAd

x x

all visible2

to

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

| |i o

r r e r r i i r

x x

L x L x L x f xx

dx

A

2

cos cos( , ) ( , )

| |i oG x x G x x

x x

Page 11: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

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

2

cos

| |o

i

dAd

x x

all visible2

to

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

| |i o

r r e r r i i r

x x

L x L x L x f xx

dx

A

2

cos cos( , ) ( , )

| |i oG x x G x x

x x

all surfaces

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

x

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 12: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Radiosity Equation

all surfaces

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

x

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

Drop angular dependence (diffuse Lambertian surfaces)

( ) ( ) ( ) ( ) ( , ) ( , )S

r e rL x L x f x L x G dAx x V x x Change variables to radiosity (B) and albedo (ρ)

( , ) ( , )( ) ( ) ( ) ( )

S

G x x V x xB x E x x B x dA

Same as equation 2.54 in Cohen Wallace handout (read sec 2.6.3)Ignore factors of π which can be absorbed.

Expresses conservation of light energy at all points in space

Page 13: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

OutlineOutline

Rendering equation review

Radiosity equation

Form factors

Methods to compute form factors

Section 16.3.1,2 (eqs 16.63-65) in FvDFH

Page 14: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Discretization and Form FactorsDiscretization and Form Factors

( , ) ( , )( ) ( ) ( ) ( )

S

G x x V x xB x E x x B x dA

ji i i j j i

j i

AB E B F

A

F is the form factor. It is dimensionless and is the fraction of energy leaving the entirety of patch j (multiply by area of j to get total energy) that arrives anywhere in the entirety of patch i (divide by area of i to get energy per unit area or radiosity).

Page 15: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Form FactorsForm Factors

jdA

i

j

idA

rjA

iA

( , ) ( , )i i j j j i i j

G x x V x xA F A F dA dA

2

cos cos( , ) ( , )

| |i oG x x G x x

x x

Page 16: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Matrix EquationMatrix Equation

ji i i j j i

j i

AB E B F

A

( , ) ( , )i i j j j i i j

G x x V x xA F A F dA dA

i i i j i jj

B E B F i i j i j i

j

B B F E

ij j i ij ij i i jj

M B E MB E M I F

Page 17: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

OutlineOutline

Rendering equation review

Radiosity equation

Form factors

Methods to compute form factors

Section 16.3.2 in FvDFH

Page 18: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Nusselt’s AnalogNusselt’s Analog

Analytically projectinto hemisphere abovepoint. Then project onto hemisphere base

Form factor is ratio of area on base to area of entire base

This computes differentialpoint to patch form factor

Why does it work?

Page 19: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

HemicubeHemicube

Page 20: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

HemicubesHemicubes

Each small hemicube cell has a precomputed delta form factor: add up to get final value

We can render the scene using normal Z-buffer scan conversion onto the faces of the hemicube!

Ar

F pip

2

coscos

Page 21: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.

Monte Carlo Ray TracingMonte Carlo Ray Tracing

Can be used to find form factors (slow)

Can be used directly to shoot energy

Page 22: Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 21: Radiosity cs184.