lecture10.ppt

Download Report

Transcript lecture10.ppt

CS 551/651:
Advanced Computer Graphics
Radiosity Continued
David Luebke
1
7/27/2016
Recap: Assignment 1
Check out web page
 Go over exam

David Luebke
2
7/27/2016
Recap: Radiosity Fundamentals

Definition:

The radiosity of a surface is the rate at which
energy leaves the surface
 Radiosity
= rate at which the surface emits energy + rate
at which the surface reflects energy

Simplifying assumptions



Environment is closed
All surfaces have Lambertian reflectance
Surface patches emit and reflect light uniformly
over their entire surface
David Luebke
3
7/27/2016
Recap: Radiosity Matrix
1 - 1F11
- 2F21
.
.
.
- pnFn1




David Luebke
- 1F12
1 - 2F22
.
.
.
- nFn2
… - 1F1n
… - 2F2n
…
.
…
.
…
.
… 1 - nFnn
B1
B2
.
.
.
Bn
E1
E2
.
.
.
En
Note: Ei values zero except at emitters
Note: Fii is zero for convex or planar patches
Note: sum of form factors in any row = 1
Solving the system gives radiosity at each patch (How?)
4
7/27/2016
Evaluating Form Factors:
Analytic: difficult, almost impossible
 Sampling:


Hemicube/Ray-casting
 Ultimately

still can get aliasing
Sample from patch center/sample from vertices
 Ultimately
still visibility, an approximation to the real
form factor
David Luebke
5
7/27/2016
Substructuring
More patches  better results
 Problem: # form factors grows quadratically
with # patches
 Substructuring: adaptively subdivide patches
into elements where high radiosity gradient is
found

David Luebke
6
7/27/2016
Substructuring

Elements are second-class patches:


When a patch is subdivided, form factors are
computed from the elements to other patches
But form factors from the other patches to the
elements are not computed
 However,
the form factors from other patches to the
subdivided patch are updated using more accurate areaweighted average of elements
David Luebke
7
7/27/2016
Substructuring

Elements vs. patches, cont.



Elements “gather” radiosity from other patches
But those other patches only gather radiosity from
the “parent” patch, not the individual elements
So an element’s contribution to other patches is
approximated coarsely by it’s patch’s radiosity
David Luebke
8
7/27/2016
Substructuring

Bottom line:


Substructuring allows subpatch radiosities to be
computed without changing the size of the formfactor matrix
Show examples:
 W&W

plate 38, F&vD plate III.21
Note: texts aren’t clear about adaptive subdivision
vs substructuring
David Luebke
9
7/27/2016
Progressive Radiosity
Good news: iterative solver of radiosity matrix
will converge
 Bad news: can take a long time
 Progressive radiosity: reorder computation to
allow viewing of partial results

David Luebke
10
7/27/2016
Progressive Radiosity

Radiosity as described uses Gauss-Seidel
iterative solver


Must do an entire iteration to get an estimate of
patch radiosities
Must precompute and store all O(n2) form factors
David Luebke
11
7/27/2016
Progressive Radiosity
1 - 1F11
- 2F21
.
.
.
- pnFn1


David Luebke
- 1F12
1 - 2F22
.
.
.
- nFn2
… - 1F1n
… - 2F2n
…
.
…
.
…
.
… 1 - nFnn
B1
B2
.
.
.
Bn
E1
E2
.
.
.
En
Evaluating row i estimates radiosity of patch i based on
all other patches
We say the patch gathers light from the environment
12
7/27/2016
Progressive Radiosity

Progressive radiosity shoots light from a patch
into the environment:
Bj due to Bi = j Bj Fji
Bi due to Bj = i Bj Fij

j
j
rather than
Given an estimate of Bi, evaluating this
equation estimates patch i’s contribution to the
rest of the scene
David Luebke
13
7/27/2016
Progressive Radiosity

A problem: evaluating the equation
Bj due to Bi = j Bj Fji j
requires knowing Fji for each patch j
 Determining these values requires a hemicube
computation per patch
 Use reciprocity relationship to get
Bj due to Bi = j Bj Fij (Ai/Aj)
David Luebke
14
j
7/27/2016
Progressive Radiosity

Now evaluation requires only a single
hemicube about patch i



Compute, use, and discard form factors
Drastically reduces total storage!
Reorder radiosity computation:

Pick patch w/ highest estimated radiosity
 Shoot
to all other patches
 Update their estimates

David Luebke
Pick new “brightest” patch and repeat
15
7/27/2016
Progressive Radiosity
We can look at the scene after every
iteration through this loop
 Q: How will it look after 1 loop?
 Q: 2 loops?
 Q: If m = # of light sources, how will it
look after m loops? After 2m loops?

David Luebke
16
7/27/2016
Progressive Radiosity

Subtleties:

Pick patch with most energy to shoot
 Energy


= radiosity * area = Bj Ai
A patch may be selected to shoot again after new
light has been shot to it
So don’t shoot Bj , shoot Bj, the amount of
radiosity patch i has received since it was last shot
David Luebke
17
7/27/2016
The End
David Luebke
18
7/27/2016