Graphics & Visualization
Chapter 16
GLOBAL ILLUMINATION ALGORITHMS
Graphics & Visualization: Principles & Algorithms Chapter 16
GLOBAL ILLUMINATION ALGORITHMS Graphics & Visualization: - - PowerPoint PPT Presentation
Graphics & Visualization Chapter 16 GLOBAL ILLUMINATION ALGORITHMS Graphics & Visualization: Principles & Algorithms Chapter 16 Introduction Global Illumination Algorithms: Deal with the realistic computation of light
Graphics & Visualization: Principles & Algorithms Chapter 16
Graphics & Visualization: Principles & Algorithms Chapter 16
Deal with the realistic computation of light transport in a scene
Estimate indirect illumination, i.e. light reaching a point through multiple surface
inter-reflections
Compute both direct illumination and indirect light
The reflection properties of all materials are described by BRDFs
The light sources are radiometrically modeled
The transport of light through the scene is computed accurately
The display of the image uses accurate tone-mapping operators
2
Graphics & Visualization: Principles & Algorithms Chapter 16
Is the most fundamental equation for photorealistic synthesis
Expresses the equilibrium of light distribution in a 3D scene
Takes into account:
3
Graphics & Visualization: Principles & Algorithms Chapter 16
Expresses excitant radiance Lr in direction (φr , θr ) versus incident irradiance Ei from direction (φi , θi ): (16.1)
( , ) ( , ) ( , , , ) ( , ) ( , )cos( )
r r r r r r r r r i i i i i i i i i i
dL dL f dE L d
i
r r r i i i r r r i i i i r r r i i i r r r i i i i
4
Graphics & Visualization: Principles & Algorithms Chapter 16
i
r r r e r r i i i r r r i i i i
5
(16.2)
Graphics & Visualization: Principles & Algorithms Chapter 16
y: the first visible surface point seen from point x in direction (φi,θi)
(φi yθy ) : the direction pointing from y towards x
rxy: the distance between x and y
Svisible: the set of all visible surfaces as seen from x
6
2
y i
xy
2
cos( )cos( ) ( , ) ( , ) ( , ) ( , , , )
Visible
i y r r r e r r S i i i r r r i i
L L L f dA r
xy
(16.3)
Graphics & Visualization: Principles & Algorithms Chapter 16
the product of both cosine terms divided by rxy
2
defined on the surfaces:
7
i i i i i i r y y
2
cos( )cos( ) ( , )
i y
G r
xy
x y
Graphics & Visualization: Principles & Algorithms Chapter 16
8
Visible
r r r e r r S r y y r r r i i
Graphics & Visualization: Principles & Algorithms Chapter 16
Advantage: Single integration domain, identical for all points x
9
1 , and are mutually invisible V( ) 0 , otherwise x y x,y
r r r e r r r y y r r r i i S
Graphics & Visualization: Principles & Algorithms Chapter 16
10
1
( , , ) ( , , ) ( , , , ) ( , ) ( , )
r r r S e y y r r r i i
L L f G V dA x y x y x y
1
( , , ) ( , , ) ( , , , ) ( , ) ( , )
j
L r r r S e y y r r r i i j
L L f G V dA
x y x y x y
Graphics & Visualization: Principles & Algorithms Chapter 16
11
Graphics & Visualization: Principles & Algorithms Chapter 16
12
( , ) ( , ) ( , , , )cos( )
i
r r r e i i r r r i i i i
L L f d
Graphics & Visualization: Principles & Algorithms Chapter 16
Light energy per surface patch (usually individual polygons)
The hemisphere of all outgoing directions
13
Graphics & Visualization: Principles & Algorithms Chapter 16
points
14
Graphics & Visualization: Principles & Algorithms Chapter 16
Is the flux per surface area, or
Radiance integrated over the hemisphere of outgoing directions at x
self-emitted radiance Le and the BRDF fr do not depend on incoming or
15
1 ( , , )cos( )
i
i S r r r r i i
B L d dA A
x
x ( ) ( ) ( , , ) ( )cos( )
x
r e i i i r i i
L L L f d
x x x x
Graphics & Visualization: Principles & Algorithms Chapter 16
depends on incident direction
corresponds to the exitant radiance Lr(y) emitted towards x by the point y visible from x along the direction (φi,θi)
Radiosity and radiance are related
B(x) = π Lr(x) and Be(x) = π Le(x)
16
r e r r S
y
Graphics & Visualization: Principles & Algorithms Chapter 16
Multiply by π
and left- hand side of the above equation where
and
17
( ) ( ) ( ) ( , ) ( )
e S
B B K B dA
y
x x x x y y
i i i
i S r r i S r S i i i
x
16.4
Graphics & Visualization: Principles & Algorithms Chapter 16
B(x) = Bi for all x Si
18
( ) ( ) ( ) ( , ) ( ) 1 1 1 ( ) ( ) ( ) ( , ) ( ) 1 1 1 ( ) ( ) ( ) ( , ) ( ) 1 ( ) ( , )
i i i i i i j i j
e y S S x S e x S y x S i i i S x S e x S S y x j i i i i ei j S S y x j i
B x B x K x y B y dA B x dA B x dA K x y B y dA dA A A A B x dA B x dA K x y B y dA dA A A A B B B K x y dA dA A
x x x x
Graphics & Visualization: Principles & Algorithms Chapter 16
i.e. ρ(x) = ρi for all x Si
the following classical radiosity system of equations results:
represent the amount of energy transfer between 2 surface patches i and j
are nontrivial 4D integrals
depend on the geometry of the scene
do not depend on any specific configuration of light sources
19
i ei i ij j j
B B F B
1 ( , )
i j
ij S S y x i
K x y F dA dA A
Graphics & Visualization: Principles & Algorithms Chapter 16
Generates random points in the integration domain
Evaluates the integrand in each random sample
Averages these evaluations
Slow converge rate: when drawing N samples, we expect a converge rate of
1/ N
20
Graphics & Visualization: Principles & Algorithms Chapter 16
1
( ) I f x dx
1
1 ( )
N i i
I f x N
1 1 1 1 1 1
1 1 1 [ ] [ ( )] [ ( )] ( ) 1 · · ( ) ( )
N N N i i i i i
E I E f x E f x f x dx N N N N f x dx f x dx I N
21
Graphics & Visualization: Principles & Algorithms Chapter 16
σ2 decreases linearly with N σ decreases with
Is lower than that of many other integration techniques, but
Is independent of the number of dimensions in the integral
1/ N
2 2 2 2 1 1 1 1 2 2 2
1 1 [ ] [ ( )] [ ( )] 1 1 · · ( ( ) ) ( ( ) )
N N i i i i
I f x f x N N N f x I dx f x I dx N N
22
Graphics & Visualization: Principles & Algorithms Chapter 16
Be strictly larger than 0 over the entire integration domain
Integrate to 1:
2 2 1
( ) 1 1 ( ) , [ ] ( ) ( ) ( )
N b i a i i
f x f x I I I dx N p x N p x
b a p x dx
23
Graphics & Visualization: Principles & Algorithms Chapter 16
Compute the cumulative distribution function P(x): P(x): is a monotonic increasing function over [a,b] P(a) = 0 and P(b) = 1
If a random number t is generated uniformly over [0,1], then x = P-1(t) is distributed according to p(x)
Compute the inverse cumulative function
Store it as a table
Use binary search to compute the inverse value
( ) ( )
x a
P x p y dy
24
Graphics & Visualization: Principles & Algorithms Chapter 16
Works in the same way as 1D integration
If the integral is defined over a domain [a, b]×[c, d]:
simple to implement
Very robust
Provides an answer independent of:
The error is hard to control and cannot be expressed by explicit lower and upper bounds
25 1
( , ) 1 ( , ) , ( , )
N b d i i a c i i i
f x y I f x y dxdy I N p x y
Graphics & Visualization: Principles & Algorithms Chapter 16
Compute the reflected radiance value
camera)
26
Graphics & Visualization: Principles & Algorithms Chapter 16
Is a 2D pdf
Generates 2 coordinates u and v
Transformed to a 3D point on the surface with a proper mapping
The mapping is identical to the texture-mapping procedure
27 1
( , , ) ( , , , ) ( , ) ( , ) 1 ( , , ) ( )
j j
N e j y y r r r i i j r r r j j
L f G V L N p
j
y x y x y x y
Graphics & Visualization: Principles & Algorithms Chapter 16
Some parts of the light source will not be sampled
The estimated radiance will be biased
28
Graphics & Visualization: Principles & Algorithms Chapter 16
// direct illumination from a single light source // for a surface point x, direction phi, theta directIllumination (x, phi, theta) estimatedRadiance = 0; for all shadow rays generate point y on light source; estimatedRadiance += Le(y,phi_y,theta_y)*BRDF*radianceTransfer(x,y)/pdf(y); estimatedRadiance = estimatedRadiance / #shadowRays; return(estimatedRadiance);
29
Graphics & Visualization: Principles & Algorithms Chapter 16
// transfer between x and y // 2 cosines, distance and visibility taken into account radianceTransfer(x,y) transfer = G(x,y)*V(x,y); return(transfer);
Shoot a shadow ray from x towards y
Check whether any objects are blocking the visibility
30
Graphics & Visualization: Principles & Algorithms Chapter 16
31
Graphics & Visualization: Principles & Algorithms Chapter 16
V(x, yi) = 1 yi light source fully visible to x
V(x, yi) = 0 yi light source fully occluded
Otherwise, artifacts will occur
Increase the number of samples to smooth the soft shadow
The number of samples depends on the size of penumbra region
Not a problem when the light source is small
When it is large, for points x located close to it:
takes on arbitrary large values (instability)
32
Graphics & Visualization: Principles & Algorithms Chapter 16
If the BRDF values vary largely, the picture has additional noise
Can choose any pdf
Usually is uniform over the source light
33
Graphics & Visualization: Principles & Algorithms Chapter 16
Individual light sources
Combined light sources
All light sources are individual contributors to the illumination of a single point:
34
Graphics & Visualization: Principles & Algorithms Chapter 16
Apply Monte Carlo integration to the combined integral
Shadow rays can be directed to any of the light sources
May even compute the direct illumination with a single shadow ray for each point (although this can be very noisy)
Still need access to any of the light sources
35
Graphics & Visualization: Principles & Algorithms Chapter 16
Assign each light a probability value for it being chosen
A discrete pdf pL(k) generates a randomly selected light source ki among NL lights
(k) p(y|k): the combined pdf
for the sampled point yi
area of all light sources
The total estimator, using N shadow-rays, is:
36 1
( , , ) ( , , , ) ( , ) ( , ) 1 ( , , ) ( ) ( | )
j j
N e i y y r r r i i i i r r r i L i i i
L f G V L N p k p k
y x y x y x y
Graphics & Visualization: Principles & Algorithms Chapter 16
// direct illumination from multiple light sources // for surface point x, direction phi, theta directIllumination (x, phi, theta) estimatedRadiance = 0; for all shadow rays select light source k; generate point y on light source k; estimatedRadiance += Le(y, phi_y, theta_y) * BRDF * radianceTransfer(x,y) / (pdf(k) * pdf(y|k)); estimatedRadiance = estimatedRadiance / #shadowRays; return(estimatedRadiance);
37
// transfer between x and y // 2 cosines, distance and // visibility taken into account radianceTransfer(x,y) transfer = G(x,y)*V(x,y); return(transfer);
Graphics & Visualization: Principles & Algorithms Chapter 16 38
Graphics & Visualization: Principles & Algorithms Chapter 16
Uniform source selection / uniform area sampling
Power-proportional source selection / uniform sampling
39
Graphics & Visualization: Principles & Algorithms Chapter 16
Both PDFs are uniform: pL (k) = 1/NL and p(y|k) = 1/SLk
Every light source will receive an equal number of shadow rays
The shadow rays are distributed uniformly
Disadvantage Equal number of shadow rays for both:
40 1
( , , ) ( , , ) ( , , , ) ( , ) ( , )
k j j
N L r r r L e i y y r r r i i i i i
N L S L f G V N
x y x y x y
Graphics & Visualization: Principles & Algorithms Chapter 16
pL (k) = Pk /Ptotal with Pk: the radiant power of light source k Ptotal: the total power emitted by all light sources
Bright sources receive more shadow rays than dim sources
Estimator:
If all lights are diffuse:
Superior approach
Results in slower converge at pixels where:
41
1
( , , ) ( , , , ) ( , ) ( , ) ( , , )
k j j
N L e i y y r r r i i i i total r r r i k
S L f G V P L N P
y x y x y x
, 1
( , , ) so ( , , , ) ( , ) ( , )
N total k k e k r r r r r r i i i i i
P P S L L f G V N
x x y x y
Graphics & Visualization: Principles & Algorithms Chapter 16
One to select the light source k
2 to select a specific surface point
42
Graphics & Visualization: Principles & Algorithms Chapter 16
Encode the total illumination on the hemisphere of directions around a point
Are usually captured in natural environments with digital cameras
Mathematically: is a stepwise continuous function
Each pixel corresponds to a small solid angle ΔΩ around point x
Intensity of each pixel corresponds to incident radiance value
Most common techniques: I. A light probe in conjunction with a digital camera II. A digital camera equipped with a fisheye lens
43
( , , ) , ( , )
i i i i
L with x
Graphics & Visualization: Principles & Algorithms Chapter 16
Light probe: a specularly reflective ball
Probe is positioned at the point where the incident illumination needs to be captured
44
Graphics & Visualization: Principles & Algorithms Chapter 16
Capture 2 photos 90 degrees apart
45
Graphics & Visualization: Principles & Algorithms Chapter 16 46
Graphics & Visualization: Principles & Algorithms Chapter 16
47
Graphics & Visualization: Principles & Algorithms Chapter 16
48
Graphics & Visualization: Principles & Algorithms Chapter 16
Other surfaces prevent the light from reaching x
The object to which x belongs can cast a self-shadow onto x
49
( , , ) ( , ) ( , , , )cos( )
r r r map i i r r r i i i i
L L f d
x
x
( , , ) ( , ) ( , , , ) ( , , )cos( )
r r r map i i r r r i i i i i i
L L f V d
x
x x
, , , , , , , 1 , ,
( , , ) ( , , , ) ( , , )cos( ) 1 ( , , ) ( , )
N map i j i j r r r i j i j i j i j i j r r r j i j i j
L f V L N p
x x x
Graphics & Visualization: Principles & Algorithms Chapter 16
Integration domain has a large extent
Environment map ≈ textured light source high frequencies and discontinuities
Product of environment map and BRDF. Specular BRDF peaks and environment map peaks do not coincide in general, resulting in sharp variations of their dot product
Visibility discontinuities
50
Graphics & Visualization: Principles & Algorithms Chapter 16
Direct illumination map sampling
BRDF sampling
Sampling the product
51
Graphics & Visualization: Principles & Algorithms Chapter 16
Extends the basic ray tracing algorithm
Does not limit itself to direct illumination only
Includes all possible indirect illumination effects
Applies Monte Carlo integration directly to the hemispherical rendering equation
Ray-Tracing Set-up
Generation of truly random paths
Recursive path tracing
Termination
52
Graphics & Visualization: Principles & Algorithms Chapter 16
Attribute a radiance value Lpixel to each pixel
This value is a weighted measure of radiance values incidents on the image plane where p : a point on the imageplane h(p): a weighting or filtering function x : the visible point seen from the eye through p
Cast a ray from the eye through p, in order to find x
Evaluate the rendering equation.
53
( ) ( ) ( , , ) ( )
pixel r r r imageplane imageplane
L L h d L h d
p p p x p p
Graphics & Visualization: Principles & Algorithms Chapter 16
Pixel-driven rendering algorithm // pixel-driven rendering algorithm computeImage(eye) for each pixel radiance = 0; H = integral(h(p)); for each viewing ray pick uniform sample point p such that h(p) <> 0; construct ray at origin eye, direction from eye to p; radiance = radiance + rad(ray)*h(p); radiance = radiance / (#viewingRays*H); rad(ray) find closest intersection point x of ray with scene; computeRadiance(x, direction eye to p);
54
Graphics & Visualization: Principles & Algorithms Chapter 16
Computes the radiance along the primary ray:
finds the intersection point x
computes the radiance leaving surface point x in the direction of the eye
average over the total number of viewing rays
take into account the normalizing factor of the uniform PDF over the domain
55
Graphics & Visualization: Principles & Algorithms Chapter 16
uses the rendering equation to evaluate the appropriate radiance value
applies a basic and straightforward Monte Carlo integration scheme to Eq(16.2)
evaluates the integral by using Monte Carlo integration:
, θi )
The estimator for Lr(x, φr, θ
r) is then given by :
56
, , , , , 1 , ,
N i j i j r r r i j i j i j r r r j i j i j
Graphics & Visualization: Principles & Algorithms Chapter 16
evaluated by accessing the scene description
Have a recursive procedure to evaluate L(x,φi,j,θi,j)
A path, or a tree of paths, is traced through the scene
57
Graphics & Visualization: Principles & Algorithms Chapter 16
does not occur very often because
the light sources usually are small compared to the other surfaces
very few of the paths will yield a contribution to the radiance value
the resulting image will mostly be black
The pixel will be attributed a color only when a path hits a light source
58
Graphics & Visualization: Principles & Algorithms Chapter 16
the generated paths would be of infinite length
the algorithm would not come to a halt
to limit the length of the paths
but still be able to obtain a correct solution
59
Graphics & Visualization: Principles & Algorithms Chapter 16
Is cutting off the recursive evaluations after a fixed number of evaluations
Puts an upper bound on the amount of rays that need to be traced
Important light transport might have been ignored
The image will be biased
A typical fixed path length is set at 4 or 5
The path length should be dependent on the scene to be rendered
Scenes with many specular surfaces will require a larger path length
Scenes with mostly diffuse surfaces can usually use a shorter path length
60
Graphics & Visualization: Principles & Algorithms Chapter 16
Use an adaptive cut-off length
When a path hits a light source the radiance found at the light source is multiplied by all cosine factors and BRDFs at all previous intersection
Store the accumulating multiplication factor with the lengthening path
More efficient technique
Still the final image will still be biased
Addresses the problem of keeping the lengths of the paths manageable
Leaves room for exploring all possible paths of any length
Produce an unbiased image
61
Graphics & Visualization: Principles & Algorithms Chapter 16
generates random points xi in the domain [0,1]
computes the weighted average of all function values f(xi)
f(x) is difficult or complex to evaluate
We want to limit the number of evaluations of f(x) necessary to estimate I
Scale f(x) by a factor P horizontally, and a factor 1/P vertically
62 1
( ) I f x dx
P RR
Graphics & Visualization: Principles & Algorithms Chapter 16
63
1 ( ) if x P if x P
RR
x f I P P
Graphics & Visualization: Principles & Algorithms Chapter 16
If f(x) be another recursive integral
Recursion stops with a probability equal to a = 1-P for each evaluation point
a: the absorption probability
in [P,1] will generate a function value equal to 0
but this is compensated by weighting the samples in [0,P] with a factor 1/P
the recursion will continue many times
the final estimator will be more accurate.
the recursion will stop sooner
the estimator will have a higher variance
64
RR
Graphics & Visualization: Principles & Algorithms Chapter 16
computeRadiance(x, dir) find closest intersection point x of ray with scene; estimatedRadiance = simpleStochasticRT(x, phi, theta); return(estimatedRadiance);
65
Graphics & Visualization: Principles & Algorithms Chapter 16
simpleStochasticRT (x, phi, theta) estimatedRadiance = 0; if (no absorption) // Russian roulette for all paths // N rays sample direction phi_i, theta_i on hemisphere; y = trace(x, phi_i, theta_i); estimatedRadiance += simpleStochasticRT(y, phi_i, theta_i)*BRDF *cos(theta_i)/pdf(phi_i, theta_i); estimatedRadiance /= #paths; estimatedRadiance /= (1-absorption) estimatedRadiance += Le(x, phi_i, theta_i) return(estimatedRadiance);
66
Graphics & Visualization: Principles & Algorithms Chapter 16
A higher number of viewing rays Np eliminates aliasing and decreases noise
The total number of shadow rays Nd cast from each point x
Selection of single source among all sources for each shadow ray
The distribution of the shadow rays over the area of a single light source
Number of indirect illumination rays Ni distributed over Ωx
Exact distribution of these rays over the hemisphere
Absorption probabilities for Russian Roulette in order to stop the recursion
67
Graphics & Visualization: Principles & Algorithms Chapter 16
//stochastic ray tracing computeImage(eye) for each pixel radiance = 0; H = integral(h(p)); for each sample // Np viewing rays pick sample point p within support of h; construct ray at eye, direction eye to p; radiance = radiance + rad(ray)*h(p); radiance = radiance/(#samples*H);
68
Graphics & Visualization: Principles & Algorithms Chapter 16
rad(ray) find closest intersection point x of ray with scene; return Le(x,dir) + computeRadiance(x, dir); computeRadiance(x, dir) estimatedRadiance += directIllumination(x, dir); estimatedRadiance += indirectIllumination(x, dir); return(estimatedRadiance);
69
Graphics & Visualization: Principles & Algorithms Chapter 16
directIllumination (x, dir) estimatedRadiance = 0; for all shadow rays // Nd shadow rays select light source k; sample point y on light source k; estimated radiance += Le * BRDF * G(x,y) * V(x,y) /(pdf(k)pdf(y|k)); estimatedRadiance = estimatedRadiance / #paths; return(estimatedRadiance);
70
Graphics & Visualization: Principles & Algorithms Chapter 16
indirectIllumination (x, dir) estimatedRadiance = 0; if (no absorption) // Russian roulette for all indirect paths // Ni indirect rays sample random direction on hemisphere; y = trace(x, random direction); estimatedRadiance += compute_radiance(y, random direction) * BRDF * cos / pdf(random direction); estimatedRadiance = estimatedRadiance / #paths; return(estimatedRadiance/(1-absorption));
71
Graphics & Visualization: Principles & Algorithms Chapter 16
Paths start at the surface point
End at the light sources
Paths start from the light sources
Record contributions to relevant pixels
Is the dual algorithm of stochastic ray-tracing
Combines both approaches
A two-pass algorithm
Generates paths starting at the light and at the surface point simultaneously
Connects both paths in the middle
Finds a contribution to the light transport between:
72
Graphics & Visualization: Principles & Algorithms Chapter 16
visible through the pixel
, x1 ,…, xk
73
Graphics & Visualization: Principles & Algorithms Chapter 16
The endpoint yk
The xl
74
1 1 1 1 1 1 1 1
, ( , , , , , , , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( )
k l e r l k l k r k r
K pdf with K L G V f G V f f G V h y y y x x x x x x x x x x y x y y y y y y y p
Graphics & Visualization: Principles & Algorithms Chapter 16
75
Graphics & Visualization: Principles & Algorithms Chapter 16
not only connect the endpoints
also connect all possible subpaths to each other
76
Graphics & Visualization: Principles & Algorithms Chapter 16
77
Stochastic ray tracing bidirectional tracing full bidirectional using only light paths ray tracing
Graphics & Visualization: Principles & Algorithms Chapter 16
78
Graphics & Visualization: Principles & Algorithms Chapter 16
A practical and robust two-pass algorithm
Traces illumination paths both from the lights and from the viewpoint
Caches and reuses illumination values in a scene for efficiency
In the first pass: Photons
In the second pass:
map
79
Graphics & Visualization: Principles & Algorithms Chapter 16
By tracing or storing only particular types of photons
Example : the caustic map: captures photons that interact with one or more specular surfaces
80
Graphics & Visualization: Principles & Algorithms Chapter 16
are traced from the light sources and
are propagated through the scene just as rays are in ray tracing
i.e. they are reflected, transmitted, or absorbed
Russian roulette
Standard Monte Carlo sampling techniques
81
Graphics & Visualization: Principles & Algorithms Chapter 16
separate out the computation of caustics from global illumination
For each scene compute 2 photon maps:
82
Graphics & Visualization: Principles & Algorithms Chapter 16
Computed efficiently
Caustics occur when light is focused
Not too many photons are needed to get a good estimate of caustics
Photon map represents incoming flux at each point in the scene
Photon density at a point estimates the irradiance at that point
Multiply the irradiance by the surface BRDF
83
Graphics & Visualization: Principles & Algorithms Chapter 16
computes direct illumination and
queries the photon map only after one diffuse or glossy bounce from the viewpoint is traced through the scene
84
Graphics & Visualization: Principles & Algorithms Chapter 16
Rays are traced through each pixel to find the closest visible surface
The radiance for a visible point is split into
85
Graphics & Visualization: Principles & Algorithms Chapter 16
Direct illumination for visible surfaces
Specular reflections and transmissions are ray traced
Caustics are computed using the caustic photon map
The remaining indirect illumination
step
86
Graphics & Visualization: Principles & Algorithms Chapter 16
87
Graphics & Visualization: Principles & Algorithms Chapter 16
1. Discretization
2. For each resulting patch i a radiosity value Bi is computed 2. Computation of form factors Fij for every pair of patches i and j 3. Numerical solution of the radiosity system of linear equations 4. Display of the solution: use any rendering algorithm that displays patches with a given color value Bi
Form factors are only computed when they are needed
Intermediate results can already be displayed during system solution
In adaptive or hierarchical radiosity, perform discretization during solution
88
Graphics & Visualization: Principles & Algorithms Chapter 16
Discretization
B(x) across each patch need to be constant
discretization
Form factor computation
rxy =0
89
Graphics & Visualization: Principles & Algorithms Chapter 16
90
Graphics & Visualization: Principles & Algorithms Chapter 16
The hemicube algorithm
Shaft culling ray- tracing acceleration
Discontinuity meshing
Adaptive and hierarchical subdivision
Clustering
Form-factor caching strategies
The use of view importance
Higher-order radiosity approximations
91
Graphics & Visualization: Principles & Algorithms Chapter 16
The self-emitted radiosity Bei
The fraction of the incident irradiance at i that is reflected
Transforming radiosity values to flux values
Pi = Ai Bi and Pei = Ai Bei
92
i ei i ij j j
ij j j
F B
Graphics & Visualization: Principles & Algorithms Chapter 16
Multiplying both sides of the equation by Ai
Using symmetry between Fij and Fji
The self-emitted power Pei
The power received and reflected from all other patches j
93
i ei i ij j i i i ei i i ij j j j i i i ei i j ji j j i ei j ji i j
B B F B A B A B A F B A B A B A F B P P P F
1
ij j
F
Graphics & Visualization: Principles & Algorithms Chapter 16
94
Graphics & Visualization: Principles & Algorithms Chapter 16
Nij : the number of these particles that land on the 2nd patch
A particle originating at a uniformly chosen location x on Si
It is distributed over the hemisphere using a cosine-distributed direction
The pdf p(x, φ, θ) is:
95
ij ij ij i
cos( ) ( , , )
i
p A x
Graphics & Visualization: Principles & Algorithms Chapter 16
96
j
1, the particle hits the patch χ ( , , ) 0, the particle doesn't hit the patch j j x
2
cos( )cos( ) 1 ( , , ) ( ) ( ) , , ,
i x i j
i j ij S j x S S y x ij i xy
P p dA d V dA dA F A r
x x x y
Graphics & Visualization: Principles & Algorithms Chapter 16
A system with n equations and n unknowns
e, x, any approximation of x : n-dimensional vectors or points
Start with an arbitrary point x(0)
Transform x(k) into the next point x(k+1) by x(k+1) = e + Ax(k)
Vectors x and e correspond to a distribution of light power over the surfaces
Each Jacobi iteration:
The solution is the equilibrium illumination distribution
97
Graphics & Visualization: Principles & Algorithms Chapter 16
j shoots its power towards all other patches i
Unshot power is propagated rather than total power
98
(0) ( 1) ( )
k k i ei i ei i ij j j
(0) ( 1) ( )
,
k k i ei i ei j ji i j
P P P P P F
(0) ( 1) ( ) ( ) ( ) i ei k k i j ji i j k k l i i l
P P P P F P P
Graphics & Visualization: Principles & Algorithms Chapter 16
Light-material interaction
Light transport
Not yet in mainstream applications
Some use in
High-quality rendering of architectural designs becomes more common
Rendering of industrial products in realistic virtual environments
99