Reading

Recommended :

 , Chapter 10.

18. Radiosity

: Optional

 M. F. Cohen and J. R. Wallace. Radiosity and Realistic

Image Synthesis. Academic Press. 1993.

2 1

Physically-based rendering Physically-based rendering, cont'd

Basic Why physically-based?

 Physics of and color  Insights into problem of rendering

 Geometrical optics  Illumination engineering

 Ray \metaphor"  Quest for realism

 Re ection and transmission  A \grand challenge" problem in graphics

 Radiative transfer  The light holo deck...someday

 Measurement: and

 Transp ort theory and integral equations

4 3

Radiometry

So far we have considered b ouncing of light around ro om In graphics and illumination engineering, the measure of

using . energy along a ray is called radiance.

What is the fundamental quantity that is b ouncing around? Rougly sp eaking, radiance is the power per unit area per unit

direction passing through a p oint p in a particular direction

u:

This quanitity is a function of some variables. What are they?

Lp; u

For the moment, we are ignoring dep endence.

One of the most imp ortant prop erties of radiance: radiance

is constant along a ray travel ling through empty space.

6 5

The BRDF The grand scheme

en an incoming direction and an outgoing direction, only Giv /light

Physics

p ortion of the light is re ected dep ending on the surface

a Transport theory

material prop erties.

Mathematics

Lp; u 

Lp; u 

out Integral equations

in Radiometry u

out Computer Science u in Algorithms

p Numerics dA Surface balance

equation This re ection function is called the BRDF, or Bi-directional

Re ectance Distribution Function.

Surface rendering

equation

Lp; u 

out

f p; u ! u  

r in out

Lp; u 

in

use the  sign here, b ecause, strictly sp eaking we need to

I Radiosity equation

include a di erential and a cosine. Let's stick with our

intuitive de nition.

7 8

Surface balance equation The surface rendering equation

We can decomp ose the radiance coming from a surface in Our ob jective is to solve for the radiance function, Lp; u 

out

terms of: over all surfaces in all directions.

[outgoing] = [emitted] + [re ected] + [transmitted]

Given the geometric relationship between two patches:

Lp; u  = L p; u  + L p; u  + L p; u 

p

out e out r out t out

j

n

j

j

dA

j

In our derivations, we will ignore transmission.

Lp ; u 

i out

n

i

Lp ; u 

i in

i

p

i

dA

i

The equation we are trying to solve is:

Lp ; u  = L p ; u 

i out e i out

Z

+ f p ; u ! u Gp ; p Lp ; u dA

r i in out i j i in j

M

Where M refers to all surfaces in the scene and Gp ; p 

i j

describ es how eciently light is transp orted from surface j to

surface i. This equation is known as the surface

rendering equation.

10 9

Radiosity Radiosity and re ectance

Solving the full blown rendering equation is very hard. What We could just go ahead and work on solving the new

happ ens when we have only di use surfaces in a scene? rendering equation, but we must ob ey some conventions

rst...

Light is re ected equally in all directions, so:

Radiosity, B p, is the power per unit area leaving a

surface.

f p; u ! u  = f p

r in out r;d

For a di use surface, it is related to the radiance by:

In addition, the radiance from each p oint is equal in all

directions:

B p = L p

d

Lp; u  = L p

out d

Re ectance, p, is the ratio of the power per unit area

leaving a surface to the power per unit area striking a surface.

After dropping angular dep endencies, the rendering equation

b ecomes:

Re ectance varies from 0 to 1 and is related to the BRDF of

a di use surface by:

Z

f p Gp ; p L p dA L p  = L p +

r;d i i j o j j d i e i

M

p = f p

r;d

Thus, we now need to solve for a function L p over 2D

d

surfaces only.

11 12

The radiosity equation Intuition for the radiosity equation

After making some subsitutions, we arrive at: To solve for the discrete radiosity function, we will break a

scene into patches and solve a light transp ort equation.

Z

Gp ;p 

i j

Bp dA B p  = E p + p 

j j i i i



M

Z

B p  = E p +p  Fp ;p Bp dA

i i i i j j j

M

The discrete form of this equation is:

A room containinfg a light and one object Break up the room into ”patches”

X

B = E +  F B

i i i ij j j

Each patch receives light from other patches...... and reflects light back to these patches.

13 14

Intuition for the radiosity equation, cont'd The form factor

Consider the transp ort of energy from patch j to i:

Consider the light impinging on one patch:

r

ij

j

j

j

i

i

i

Transport path Geometrical notation

Now let's vary the size, orientation, visibility, and distance

between the patches:

j

i

j

j

j

j

i

i

i i

(a) (b) (c) (d)

We can compute the re ected radiosity, B , by re ecting and

i

summing the contributions from every other patch: j

occluder

j

X

i

B = E +  F B

i i i ij j

i j

(e) (f)

The F are called the form factors and tells us how

How do es the transp ort vary in each of a-f ?

ij

radiosity from one patch is transp orted to another. But what

form do es it take?

15 16

The form factor, cont'd Matrix form of the radiosity equation

Here again is the radiosity equation:

Let's put all these terms together:

X

B = E +  F B

i i i ij j

V A cos cos

j

ij j i j

F =

ij

2

r

ij

We can re-write this as:

X

B  F B = E

i i ij j i

j

Now we can write a matrix equation and solve!

2 3 2 2 3 3

B 1  F  F    F E

6 7 1 6 1 11 1 12 1 1n 6 7 1 7

6 7 6 6 7 7

6 7 6 6 7 7

6 7 6 6 7 7

B  F   F E

2 2 21 2 2n 2

6 7 6 6 7 7

6 7 6 6 7 7

6 7 6 6 7 7

    

6 7 6 6 7 7

6 7 6 6 7 7

=

6 7 6 6 7 7

6 7 6 6 7 7

    

6 7 6 6 7 7

6 7 6 6 7 7

6 7 6 6 7 7

6 7 6 6 7 7

 F  F  

n1 n1;1 n1 n1;n

6 7 6 6 7 7

4 5 4 4 5 5

 F    F 1  F B E

n n1 n n;n1 n nn n n

17 18

Matrix form of the radiosity equation, cont'd Solving the radiosity equation

If we de ne: Iterative metho ds will generally get you close to the solution

2 3

in fewer steps.

 F     F

1 11 1 1n

6 7

6 7

6 7

6 7

  

6 7

6 7

6 7

One p ossibility is to do a von Neumann expansion:

   K =

6 7

6 7

6 7

6 7

  

6 7

4 5

 F     F

n n1 n nn

1 2 3

I K  = I + K + K + K + :::

Then we can re-write the equation as:

so that we could compute a truncated series:

I K B = E

2 3

B = E + KE + K E + K E + :::

1

One way to solve this is to compute B = I K  E

directly.

This is really exp ensive. The matrix, I K  is generally

2

fairly dense O n  interactions, and inversion requires

3

O n  op erations.

19 20

Solving the radiosity equation, cont'd Solving the radiosity equation, cont'd

We can write this as iterative matrix multiplication: Whenever we multiply a row of K by B, we can think of this

as gathering energy into a patch.

A faster converging metho d is based on the notion of

0

B = E

\sho oting" energy from patches.

1 0 0

B = B + KB

2 1 1

B = B + KB

3 2 2

B = B + KB

Note that each multiplication by K corresp onds to b ouncing

the radiosity through the scene one more time.

2

This still converges fairly slowly and runs in O n  assuming

you can stop after a number of iterations much less than n.

22 21

Solving the radiosity equation, cont'd Solving the radiosity equation, cont'd

The idea is: Another idea is to compute the interactions hierarchical ly.

1. Sort the patches by the amount of radiosity they

If two patches are close together, then link them in the usual

currently have.

way. If they are further apart, then link their parent patches.

2. Sho ot the energy from the brightest patch to all the

other patches.

3. Mark this patch as having zero \unshot" radiosity.

4. Cho ose the next patch with the largest unshot radiosity

and iterate.

This approach is called \progressive radiosity".

The convergence is substantially faster, closer to O n in

practice.

The complexity can be shown to be linear in n, the number

of leaf no de patches.

However, the original input patches are the parent patches,

2

so if there are k input patches, there are at least O k 

2

interactions. Total complexity is then O n + k .

23 24

Final rendering Final rendering, cont'd

So, what can you do with the solution when you're done? Better yet, we can do an interactive walkthrough:

1. Given the radiosity at the center of patches e.g.,

Once we've solved for the radiosity, we can ray trace the

triangles or rectangles, estimate the radiosity at the

scene from any viewp oint without b ouncing any rays. The

vertices.

results of all the b ounces have b een pre-computed.

2. Use graphics hardware and Gouraud shading and do an

We call this a \view indedp endent solution." interactive walkthrough.

[Show video.]

25 26

Final rendering, cont'd

We can also use hybrid metho ds. Use:

 radiosity metho ds great for di use interre ections, but

no mo deling of sp ecularity

 and ray tracing lousy for di use interre ections, but

great for sp ecularity

to get some of the most realistic renderings ever pro duced! 27