Talk slides

advertisement
Rendering & Reconstructing
Under Complex BRDF’s
AGENDA

Introduction


Motivation
Basic concepts

Photometric Stereo

Image Based Rendering (IBR)

Summary
Introduction
In this lecture we will discuss the way light
interacts with matter and how to improve
realism in CV and in other related areas such as
computer graphics, using this knowledge.
Motivation (1) – Constructing
Geometry of an Object



Left: no light .
Right: A spot light is pointing down on the object from
above and behind, reflecting off the surface of the sphere.
This simple highlight gives the viewer a completely different
reading of the scene.
Motivation (2) – Giving Clues To an
Object's Material

The objects reflects highlights differently.

Left: soft - as though the object were made of chalk.

Right: glossy - creates the perception of very shiny plastic.
Motivation (3) – Image Based
Rendering - Changing View Point
Motivation (4) – Image Based
Rendering - Changing Lights Direction

Given 1 object image (face) taken under single
light source (unknown direction).
Motivation (4) – Image Based
Rendering - changing lights

render same face under new lighting direction:
Basic Concepts









Radiometry
Solid angle
Radiance
Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surface & Fong Model
Local vs. Global Illumination
Radiometry
Deals with the following Questions:



How do we measure light?
How “bright” will surfaces be?
How does light interacts with
surfaces?
Radiometry – Some Answers..
Brightness of a surface
How much of the received
light is reflected
How much light the surface
receives
N
L
Surface material
Example
Same light source hitting two different surfaces:
Light hits the surface directly
Light hits the surface
at an angle
As a result the right surface receives less light per square inch !
Light Behavior
Absorbed
transmitted
reflected
Combination
Fluorescence
Absorbing light at one
wavelength, and radiate
light at different
wavelength.
Simplifying Assumptions



The light leaving a point on a surface is
due only to light arriving at this point.
No Fluorescence
Surfaces do not generate light internally
- treating sources separately.
Radiometry – Formalization
N
R
V
(o,  o)
L
(i,i)
Radiometry – Formalization
Around any point there is a hemisphere of
directions:
Spherical Coordinates
x = r sinq cosf
y= r sinq sinf
z= r cosq
Basic Concepts









Radiometry
Solid angle
Radiance
Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surfac & Fong Model
Local vs. Global Illumination
Intro. To Solid Angle
Light is form of energy
light is measured in terms of flow through an area
light coming from a single direction
light coming from a small region
Solid Angle - Definition


The solid angle is the area of
the projection of the object
onto the unit sphere.
Units : steradians, abbreviated sr.
Solid Angle of a Small Patch
The solid angle subtended by a small patch area dA is:
dA cos q
d 
2
r
d  sin qdqdf
dA
Basic Concepts








Radiometry
Solid angle
Radiance & Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surfac & Fong Model
Local vs. Global Illumination
Radiance
Amount of energy traveling at some point in a specified
direction, per unit time, per unit area perpendicular to the
direction of travel, per unit solid angle


Denoted: L(x,q,f)
Units: Wm-2sr-1 .
Radiance is Constant Along a
Straight Line

Assuming light does not interact with
the medium through which it travels –
i.e. that we are in
.
Irradiance


How much light is arriving at a surface.
A surface experiencing radiance L(x,q,f) coming in from
d experiences irradiance:
Eix,,   Lx, ,   cos d


Note: While the radiance is per area
perpendicular to the direction of
travel, the Irradiance is not.
Units: W*m -2
d cosq
q
d
Basic Concepts









Radiometry
Solid angle
Radiance
Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surfac & Fong Model
Local vs. Global Illumination
Radiosity
Total power leaving a
surface, per unit area on
the surface.
To get it, integrate radiance
over the hemisphere of
outgoing directions:
X
Bx   L(x,q , f ) cosqd

Exitance


Light sources emit light, they are sources of
radiance
Exitance is the equivalent of radiosity for
emitters:
E x    Le (x,q , f ) cos qd

Basic Concepts









Radiometry
Solid angle
Radiance
Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surfac & Fong Model
Local vs. Global Illumination
Intuition: BRDF is a function
that specifies the
ratio between the
incident light in one
direction and the
emitted light in a
second direction.
The function defines
properties of the surface
(shininess,..)
BRDF – more formally
the ratio of the radiance in the outgoing direction to
the incident irradiance at a point on the surface
Outgoing radiance
Lo o , o 
Lo o , o 
brdf o , o ,i , i , 

Eii , i  Li i , i  cos i d
irradiance
Range: [0,infinity] (surprising?)
Units: inverse steradians = sr -1
Basic Concepts









Radiometry
Solid angle
Radiance
Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surfac & Fong Model
Local vs. Global Illumination
Helmholtz Reciprocity Rule
brdf is symmetric:
 o , o ,i , i ,   i , i ,o , o 
brdf
(i,fi)
brdf
(r,fr)
=
(i,fi)
(r,fr)
Basic Concepts









Radiometry
Solid angle
Radiance
Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surfac & Fong Model
Local vs. Global Illumination
Isotropic vs. Anisotropic


Isotropic reflection - reflection that does not
vary as the surface is rotated about the normal
(the  angle).
Isotropic – useful assumption.
Basic Concepts









Radiometry
Solid angle
Radiance
Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surfac & Fong Model
Local vs. Global Illumination
Special BRDFs
Diffuse Light

Illumination that a surface reflects
equally in all directions.

BRDF is constant:
 brdf x,q o , fo ,q i , fi    brdf x 


The brightness is independent of the
observer position.
Also called “Lambertian” Reflection.
Ideal Diffuse Surfaces –
ALBEDO definition

Albedo - The fraction of the incident radiance in a
given direction that is reflected by a point on
diffuse surface (in all possible directions).
 d x    brdf x  cos q o do

 brdf x  cos q o do



 brdf x 
Denoted d.
Also called diffuse reflectance.
Lambert’s Law

N
The radiant energy I from a diffuse
surface:
L

I   * I L * Lˆ  Nˆ   * L  Nˆ
radiant
albedo
intensity of light source
Unit
normal
Light unit vector
Specular Surface


Light reflected from the
surface unequally to all
directions.
These are the bright spots
on objects (polished metal,
apple ...).
Phong Model – Specular Light
• How much reflection light you can see depends on where
you are
Different BRDF
q
Perfectly
Specular
“Mirror”
n∞
Different BRDF
Reflected
Light
Slightly
scattered
Specular:
Surface
Normal
Incident
Light
Ray
Different BRDF
Surface
Normal
perfectly Diffuse
Incident
Light
Ray
Different BRDF
Combination of
Diffuse and Specular
Surface
Normal
Incident
Light
Ray
Basic Concepts









Radiometry
Solid angle
Radiance
Irradiance
Radiosity & Exitance
BRDF
“Helmholtz” Reciprocity Rule
Isotropic vs. Anisotropic
Special BRDF



Diffuse surface & Lambertian Low
Specular surfac & Fong Model
Local vs. Global Illumination
Local vs. Global Illumination
Local illumination


Local illumination
Everything is lit only by light
sources
Global illumination
Everything is lit by everything
else
global illumination
O.K. So Now What?!
Photometric Stereo
The Problem

Given a set of images of the same
object, from the same view point, under
different given light sources…
Can We Recover The 3D
Shape of The Object?
General Schema
Recover surface normal
Recover shape out of normals
Overview

Classic approach



Recover surface normal when the light is
known
Recover surface normal when the light is
unknown
New idea – “shape by example”
Classic Approach - Basic Idea

Since we keep the camera and the
scene intact, each image pixel of the
three images correspond to the same
3D point :
Classic Approach

Assumptions:



N
L
“Lambertian” surfaces
Point light sources that are distant
Lambert’s law:

I   * I L * Lˆ  Nˆ   * L  Nˆ
Image intensity
albedo
normal
intensity of light source
light vector
Vector Form
For each pixel p, the normals are the same and we
get 3 conditions respectively:

Ii p   * Li p * Np
i = 1,2,3
For each pixel p we get a vector :
Lp = 3*3 matrix

 L1 p 
I 1p 
 


Ip   I 2 p    *  L 2 p  * Nˆ p   * Lp * Nˆ p
 

 I 3 p 
 L 3 p 
Simple Case – Light is Known

In that case we get for each pixel:
Ip   * Lp * Nˆ p
 * Nˆ p  Lp Ip
1
N is a unit vector
1
L
p Ip
Nˆ p 
Lp 1 Ip
More Complex – Light is Not
Known - Factorization




For each pixel: Ip  Lp * Np


ˆ
ˆ
Lp  I L * L p
Np   * N
For f frames and p pixels, we get:
I  LN
f*p intensity matrix
F*3 light matrix
3*p normals matrix
Factorization


If there is no noise, then rank (I) = 3.
By Singular Value Decomposition (SVD):

IU 


V
T

~ ~
 L*N
But, there are many solutions, since:
~
~
~ ~ ~
~
~
~
1
I  L * N  L * A* A N  L * N
Shape and Materials by Example:
A Photometric Stereo Approach
Aaron Hertzmann, University of Toronto
&
Steve Seitz, University of Washington
The Idea
Consider the simple case of two objects photographed together
Orientation-Consistency Cue
Suppose, we would like to determine the shape of the bottle.
Under the right conditions it holds that:
“Two points with the same surface
orientation reflect the same light
toward the viewer”
Orientation-Consistency Cue
For example, if a point is in highlight on the bottle, then it must
have the same surface normal as the region in highlight on the
sphere.
Ambiguous


But, what happens when:
 There are multiple highlights on the sphere?
 Multiple points on the sphere with the same intensity.
Solution: taking pictures under more lighting conditions.
More Lighting Conditions…
General Assumptions
•
At least one reference object of the same or similar material
must be imaged under the same illumination.
•
The shape of the reference object (sphere) is known.
•
Lighting is distant.
•
The camera is orthographic.
•
Local illumination only – shadows, intereflection and so on
are ignored.
Formalization

Given multiple images of reference and target objects same viewpoint, different illuminations :



Ir1 , . . . , Irn - the reference images.
It1, . . . , Itn - target images.
Corresponding reference Iri and target Iti images are
captured under the same illumination.
Formalization – cont.

Let Ir1,p be the intensity of pixel p in
reference image #1.

Define vector V to be the intensities at a
same pixel over the n images.


Vrp = [Ir1,p , . . . , Irn,p]T
Vtp = [It1,p , . . . , Itn,p]T
Basic Algorithm
Pixels p and q have the same normal if
||Vp – Vq|| is minimized.
Given Pixel p on the target object look for pixel q on the
reference object s.t. ||Vp – Vq|| is minimized.
Determining Normal of a Point
-
=
Determining Normal of a Point
-
=
=
Limitations of Basic Algorithm (1)
Distant light
Reference object Target object
Must have uniform BRDF for each point on target object
Limitations of Basic Algorithm (2)
Distant light
Reference object
Target object
Reference and target object are made of the same material
Target Object Has Different
BRDF’s


To overcome it, target object must be either
pure diffuse or pure specular.
For diffuse object use lambert’s low:
I t p   t p * np *  l
light
normal
albedo
I
r
p

r
*
Light source (direction & intencity)
np *  l
light
Target object has different
BRDF’s – The Trick
p and q have the same normal if
t
r
Vp V q
 r
t
Vp Vq
is minimized
Target Object Made of Multiple
Materials

Assume every material can be represented as linear
combination of k (base) materials .

Use k (independent) reference objects.

Each pixel in target material can be represented as a
linear combination of the k reference materials.

Find material coefficient and pixel q for best
corresponding with pixel p.
Advantages

The BRDF may be arbitrary.

BRDF may vary over the surface.

The illumination may be unknown.

Any number of light source.
Result – Uniform BRDF
Bottle Reconstruction
8 in total
Result – Unifrom BRDF
Velvet Reconstruction
14 in total
reference
target
Result – Multiple materials
Cat Reconstruction
13 in total
Gray, diffuse sphere
Ceramic cat
Shiny, black sphere
Image Based Rendering
Image Based Rendering (IBR)



Input: Dense set of images from different
viewpoints or different illumination.
Goal: Create pictures of synthetic scenes
under new illumination conditions or
from new viewpoints.
The picture should be undistinguishable from
photographs of real environments.
Rendering Algorithms

Differ in the assumptions made regarding
lighting and reflectance in the scene and in the
solution space.


local vs. global illumination algorithms.
view dependent vs. view independent
solutions.
Agenda



Local illumination, view dependent
algorithm for rendering a human face
Global illumination, view independent
algorithm for acquiring the reflectance
properties of complete scenes
Summary
Local Illumination
View Dependent
Acquiring the Reflectance Field
of a Human Face
Paul Debevec, Tim Hawkins, Chris Tchou,
Haarm-Pieter Duiker, Westley Sarokin, Mark Sagar
SIGGRAPH 2000
Goals



Acquire images of the face from 2 viewpoints
under a dense sampling of incident illumination
directions.
Construct a reflectance function for each pixel.
Render the face under new illumination
conditions.
Challenges
• Complex and individual shape
of the face.
• Subtle and spatially varying
reflectance properties of the
skin.
• Complex deformation of the
face during movement.
• Viewers are extremely sensitive
to the appearance of other
people’s faces.
Light Stage
Constructing Reflectance
Functions



For each pixel location (x, y) in each camera,
that location on the face is illuminated for 64 x
32 directions of q and f.
For each pixel we keep all radiance values under
2000 different illumination direction (reflectance
function).
Rxy(q, f) corresponding to the ray through the
pixel (x,y) with illumination direction (q, f) .
Novel Form of Illumination

Rxy(q, f) represents how much light is reflected
towards the camera by pixel (x,y) as a result of
the illumination from direction (q, f).
Solid angle covered by each
of the illumination
directions
Illumination Map

One can capture illumination at a point
in the real world with a single spherical
“photograph” or environment map.
Two different projections of the same spherical image
Novel Form of Illumination
Results
Grace Cathedral in San Francisco ,St. Peter's Basilica, The Uffizi
Gallery in Florence ,the UC Berkeley Eucalyptus Grove and a
synthetic test environment.
Watching a movie…
Render a human face summary



2000 images taken from a fixed
viewpoint under different illumination
conditions
A reflectance function for each pixel
was created using these images
A linear combination for each pixel
together with the illumination map
enable rendering the face from natural
illumination conditions
Global Illumination
View Independent
Global illumination , view
independent

Some basis


The Global illumination equation
Basic Radiosity methods

New idea – Inverse Global Illumination

Summary
Recall
Radiance – Amount of light.
BRDF – Ratio between out going radiance
and coming irradiance.
Radiosity - Total power leaving a surface.
Exitance – Total power leaving a point on
a light source.
Global Illumination Equation

Total power leaving a point in a specified direction:
L(x,qo , fo )  Le (x,qo , fo )   brdf (x,qo , fo ,q , f ) Li (x,q , f ) cosqd

Radiance
Exitance
BRDF
Irradiance
Total The
light
reflected by
incoming
The fraction of the
incoming
Radiance emitted from
the
surface
Total
radiance
irradiance
at
point
irradiance at point x, in
thepoint
suracexat point x in
x,
in
direction
(,f)
leaving
the
direction (,f) which is
direction (o,fo) , equal
on thein surface
in
reflected by the surface
zero for non light
direction (o,fosources
)
direction (o,fo)
Basic Radiosity Methods

Originally
introduced in
1950s as a
method for
computing radiant
heat exchange
between surfaces
Radiosity Algorithms


Solve the global illumination
equation under a restrictive
set of assumptions
 All surfaces are perfectly
diffuse
 Surfaces can be broken
into patches with
constant radiosity
Assumptions allow us to
simplify the global
illumination equation
The Radiosity Algorithm For
Image Synthesis
Input of
scene geometry
Form Factor
Calculation
Input of
reflectance properties
(albedo for each patch)
Solution to
the system
of equations
Viewing direction
Radiosity
solution
Radiosity algorithm
Visualization
Radiosity
image
The Form Factor

The form factor Fij is the fraction of the
total radiance leaving a patch i which is
received by patch j

A function of the scene geometry only

Sum to unity
i,  j 1 Fij  1
N
The Discrete Radiosity
Equation
L(x,qo ,fo )  Le (x,qo ,fo )   brdf (x,qo ,fo ,q ,f ) Li (x,q ,f ) cosqd

the
radiance
From TotalFrom
radiance
From
leaving
integration of
emitted
by
point x inover
a
point
x in a specific
irradiance
From BRDF tothe
direction to to the
directionspecific
to the hemisphere
radiosity
albedo
the
exitance
leaving
leaving a patch
sum
i over all the
patch j patches
N
Bi  Ei   i  Fij B j
j 1
The Discrete Radiosity
Equation
N
Bi  Ei   i  Fij B j
j 1
 B1   E1    1F 11  1F 12
 B 2   E 2    2 F 21  2 F 22
   
       

    
 BN   EN   NFN 1 NFN 2
B = E +

  1F 1N   B1 

   B 2 

   
 
 NFNN   BN 
F
E = MB where M = (IN - F)
x
B
The Discrete Radiosity Equation
(cont)

E=
M
 E1  1   1F 11   1F 12
 E 2     2 F 21 1   2 F 22
 
   


  
 EN    NFN 1  NFN 2

x
B
  1F 1N   B1 





  B2 
  


 
 1  NFNN   BN 

Dimension of M is given by the number of
patches in the scene: N xN


It’s a big system
Iterative solution
Radiosity Algorithm –
Pro & Cons



Needs only be calculated once for
different viewing conditions
when geometry changes there is a need
to recalculate the form factors
If lighting changes then only the
equation needs resolving
Radiosity Algorithm - Results
Walking through the scene
Inverse Global Illumination
Recovering Reflectance Models of
Real Scenes from Photographs
Yizhou Yu, Paul Debevec, Jitendra Malik & Tim Hawkins
Computer Science Division
University of California at Berkeley
Global Illumination
Reflectance
Properties
Radiance
Images
Geometry
Illumination
Inverse Global Illumination
Reflectance
Properties
Radiance
Images
Geometry
Illumination
Inverse Global illumination
Outline



Motivation
Goal
Partial solutions





Inverse Radiosity
Specular Parameters
Mutual Illumination
Results
Conclusion
Motivation



Most Image Based Rendering methods
allow novel viewpoints, but not changes
in lighting.
This paper shows recovery of
reflectance parameters of a scene.
Can then relight scene.
Motivation - cont

Many authors have previously recovered
reflectance parameters. e.g.,




Specular and diffuse parameters
Spatially varying BRDFs
However, this is done in laboratory with
controlled illumination
Good for individual objects, but not for
an entire scene
Goal



Estimation of the reflectance properties
of all surfaces in the scene at once.
Surfaces are illuminated in situ rather
than as isolated samples.
Perform all of this from a relatively
sparse set of photographs.
Simplifying Assumptions






No transmission
Known geometry
Known light source positions
Known cameras positions
Radiance maps
Specular reflectance parameters
constant over large surface regions
Simplifying Assumptions - cont



Each surface point captured in at least
one image
Each light source captured in at least
one image
Image of highlight in each specular
surface region in at least one image
First Step Toward The Full
Solution

Inverse radiosity


Pure diffuse scenes
The environment is broken into patches
with constant diffuse albedo
Inverse Radiosity

Input:




Scene Geometry
Lighting conditions
Radiance distribution
Output:

Diffuse albedo at each patch in the
environment
Input -Geometry and Camera Positions
Input - Light Sources
Inverse Radiosity

j
B j Fij
B j Fij
Bi
Bii  Eii  
? B j Fij
?i 
j
i  ( Bi  Ei ) /(  B j Fij )
j
Bj
Second Step Toward The Full
Solution

Local illumination

Single surface

Single known light source.

Uniform BRDF’s – allows both diffuse and
specular reflection
Local Illumination



Radiance Li  obtained by a
measurement of each
Irradiance Ei  obtained by known
light source
Goal  BRDF estimation using (Li , Ei)
Ei
Li
Ward Reflectance Model


Variant of Phong model.
Using Ward’s model, the radiance of a patch is given
by:
 d

Li  
  s K (a , Qi )  I i
 


d - albedo

s K(a, Q) - specular term


K - nonlinear function of Q, the incident and
viewing directions .
a - surface roughness (blur) vector.
Ward Reflectance Model
isotropic specular highlight
(a is scalar)
anisotropic specular highlight
(a is 3-component vector)
Local Illumination
 d

Li  
  s K (a , Qi )  I i
 





Li is radiance at Pi
Ei is irradiance at Pi
Qi
Ei
Li
Qi is light & camera position
3 or 5 unknown parameters: d, s and a
to be estimated
Local Illumination
One equation for each pixel of surface in
image

Can be solved using nonlinear optimisation

d

2
arg min
(
L

I


K
(
a
,
Q
)
I
)

i
i
s
i
i


 ,  ,a
i
d
s
Ready For The
Real thing ….
Mutual Illumination



Very similar to
inverse radiosity
Before, radiance
towards Pi from Aj
was same as
radiance towards Ck

LPi Aj FPi Aj
j

Cv
With specular surface, no longer true
LCk Aj
Ck
LCv Pi  ECvPi   d  LPi Aj FPi Aj   s  LPi Aj KCv Pi Aj (a , Qi)
j
j
Mutual Illumination

We can express the difference between
the two as S
LPi Aj  LCk Aj  SCk Pi Aj

This is purely due to specularity

e.g. Aj might look diffuse from Pi’s
viewpoint, but have a specular highlight
from camera’s viewpoint
Mutual Illumination

To recover all BRDF parameters for all
the surfaces we need:




Radiance images covering the whole scene
Each surface patch needs to be assigned a
camera from which its radiance image is
selected
At least one specular highlight on each
surface needs to be visible in the set of
images
Each sample point gives an equation
Mutual Illumination

Idea for iterative algorithm:


assume zero S initially
do




calculate L radiances from S estimates using
global illumination
update all d, s, a using L radiances
re-estimate S using d, s, a and L
loop until convergence
Mutual Illumination




Highlight regions need special treatment:
detect in advance.
No guarantees for convergence.
No error bound on the recovered BRDF
parameter values.
In practice work well.
Results
Results
Inverse Global Illumination Summary


Inverse radiosity
Recovering specular reflectance properties
from direct illumination



The reflected light was divided into diffuse and
specular components
Specular component was modeled using Ward’s
model
A new technique for determining reflectance
properties of entire scenes taking into
account mutual illumination.
Rendering & Reconstructing Under
Complex BRDF’s - Summary

Few basic concepts

Photometric Stereo

Image Based Rendering (IBR)
The End
From Normals to Shape


 nx 
 
Given pixel (x,y) and its normal n =  n y  ,
we wish to find the z coordinate.  n 
 z
The corresponding surface point is
(x,y,Z(x,y))

The x component of n: (1,0,Zx)

The y component of n: (0,1,Zy)
Factorization – cont.


Since the normal is orthogonal to its x
and y components we get:
(1,0,Zx) x (0,1,Zy) = (-Zx, -Zy, 1)
And after normalization:
 nx 
 
 n y   nˆ 
 
 nz 
 Zx

1
 Z
y
2
2
Zx  Z y 1 
1







Factorization – cont.
 nx 
 
 n y   nˆ 
 
 nz 

 Zx

1
 Z
y
2
2

Zx  Z y 1
1







 nx
Zx 
 nz
Zy 
 ny
 nz
Now, we can integrate Z over x and y to find
out Z(x,y).
Radiosity & Exitance for
diffuse surfaces

Diffuse surfaces, by definition, have outgoing radiance
that does not depend on direction
B( x )   L( x,q ,f ) cosq d

B(x)   Lo (x) cosq d  Lo (x)

E ( x )   Le ( x,q ,f ) cosq d

E ( x )   Le ( x ) cosq d  Le ( x )

Radiance to Radiosity

B(x)  L0 (x)
Recall:
E (x)  Le (x)


 d ( x)
brdf (x,q o , fo ,q i, fi ) 

Simplifying the global illumination equation gives:
Lx,qo ,fo   Le x,qo , fo    brdf x,qo ,fo ,q , f Li x,q ,f cosqd

 d x 
Lx   Le x    
Li x, q , f  cos qd


Bx  Ex  d x Li x,q , f cosqd

Switching the Domain


We still have annoying radiance
terms inside the integral
Radiance is constant along lines
Lx,q ,f   Ly,q ,f 

The radiance arriving is coming
from a diffuse surface, y :
Lx, q , f   Ly, q , f  
B y 

Switching the Domain (cont)

We can convert the integral over the hemisphere of
solid angles into one over all the surfaces in a scene:
cos q dy
r2
and yyare
aremutually
mutuallyvisible
v isible
1 if
If xx and
V x, y   
otherwise
0
d 
Bx  Ex  d x Li x,q , f cosqd

 B( y ) 
 cos q  
Bx   E x    d x  
V x, y  cos q  2  dy

yS
  
 r 
Discrete Formulation


Assume world is broken
into N disjoint patches,
Pj, j=1..N, each with
area Aj
Define:
1
Bi   B( x )dx
Ai xPi
1
Ei   E ( x )dx
Ai xPi
Discrete Formulation (cont)

1
Ai
Change the integral over surfaces to a sum over
patches:
N
cos q cos q 
Bx  E x   d x  B(y)
V x, y dy
2
yPj
r
j 1
Sum1 over all
in the
dxpatches

Ex
A
scene
i xPi 
 Bx
xPi



cos q cos q 
   d x yP B(y)
V x, y dy  dx
2
j
r
j 1

N
Sum all points
x
N
1
in patch
B E
 i B
i
i
i

j 1
j
cos q cos q 
V x, y dydx
2


Ai xPi yPj
r
The Form Factor
N
1
Bi  Ei  i  B j
Ai
j 1
1
Fij 
Ai
cos q cos q 
V x, y dydx
2


r
xPi yPj
cosq cosq 
xPi yPj r 2 V ( x, y )dydx
Fij is the proportion of the total power leaving
patch Pi that is received by patch Pj
N
Bi  Ei   i  Fij B j
j 1
Form Factor Properties
Depends only on geometry


Reciprocity: AiFij=AjFji

Additivity: Fi(jk)=Fij +Fik
•Reverse additivity is not true (F (jk)i  Fji +Fki , it’s the
area weighted average of the individual form factors)
Sum to unity (all the power leaving patch i must get
somewhere):

i,  j 1 Fij  1
N
Solving the Linear System


The matrix is very large – iterative methods are
preferred
Start by expressing each radiosity in terms of the
others:
N
M
j 1
ij
B j  Ei ,
N
1  i  N , M ij   ij  i Fij
M ij
Ei
Bi   
Bj 
,
M ii
j 1 M ii
j i
1 i  N
Relaxation Methods
Jacobi relaxation: Start with a guess for Bi, then (at
iteration m):

N
(m)
i
B
 
j 1
j i
M ij
M ii
B
( m 1)
j
Ei

,
M ii
1 i  N
Gauss-Siedel relaxation: Use values already computed in
this iteration:

i 1
(m)
i
B
 
j 1
M ij
M ii
B
(m)
j

N
M ij
M
j i 1
ii
B
( m 1)
j
Ei

, 1 i  N
M ii
Download