Title: Radiosity Part I Mathematical Foundations
1Radiosity Part IMathematical Foundations
2Goal
- To obtain a mathematical basis for radiosity.
- Next, the practical details.
- Computing form factors
- Solving the matrix
- Meshing
3Radiosity Equation
4Where are we?
- We have an expression relating radiosity at a
patch to radiosity at ALL other patches - But no method to solve for the values
5Radiosity Method
- Subdivide the model into elements.
- Select locations (nodes) on elements at which to
solve for radiosity. - Select basis functions to approximate radiosity
across the element, based on values at nodes.
Most common is to assume constant value of
radiosity across the element, so a single node is
placed in the middle. - Select finite error metric. This will result in a
set of linear equations.
6Radiosity Method (cont.)
- Compute coefficients of linear system. These are
based on the geometric relationships between
elements, called the form factors. - Solve the system of linear equations.
- Reconstruct the radiosity function (often just
assign radiosity values to vertices). - Render often Gouraud interpolation of radiosity
values at vertices.
7Basis Functions
- Approximate radiosity using finite set of basis
functions and radiosities at the nodes. - Choose functions with support only within
element. - Most common basis function is constant across
element.
8Example in 1D
92D Example
10Nodes
- Constant most common
- Lischinski used quadratic
11Nodes not for Display!
- Nodes used for solution not necessarily where
color stored for display. - Usually node values interpolated to per-vertex
color. - We used quadratic interpolation.
12Error
- Would like to minimize error
- But we dont know the solution!
13Residual
- Can express error as a residual
- that we want to minimize.
- Note that and r are defined over all
space but the is computed using a finite
number of points ( ).
14Reducing Residual
- Cant in general make residual zero
- Basis functions cant match real
- Lower dimensionality of residual computation
- Can use similar method to basis functions
15Weighting Residual
- Weight the residual with function that has only
local support - where
16Point Collocation
- Simplest way to deal with residuals. Measure only
at the nodes. - Note that this is defined only at the nodes.
17Galerkin Formulation
- Instead of measuring residual only at nodes,
- measure over element.
- Specifically, Galerkin method uses same basis
function for measuring residual as for computing
node radiosity
18Residual
- Substituting basis function
19Expanding and Grouping
- We get something of form with
20Constant Basis Function
- Suppose we use constant basis
- Look at each of the terms
21- Basis function has value 1 within the element,
and 0 elsewhere - So this integral is only valid when ij, and is
then the area of the element
22- Integral only valid over elements i and j
- Assume reflectivity constant over element
23- Emissivity assumed constant over element,
therefore
24Now we have
- Dividing by Ai and putting into form KBE
- or
25Form Factor
- Express as
- where
- Fij is known as the Form Factor.
26Rearranging
- gives the more familiar form
27Intuitive Interpretation
- Add area term
- Use reciprocity of form factors
- to get
- which can be interpreted as
28Total power leaving an element i
29Total power leaving an element i
Is sum of emitted light
30Total power leaving an element i
and reflected light
is sum of emitted light
31Total power leaving an element i
and reflected light
is sum of emitted light
Reflected light depends on contribution from
every other element
32Total power leaving an element i
and reflected light.
weighted by geometric relationship, area, and
reflectivities.
is sum of emitted light
Reflected light depends on contribution from
every other element
33What do we have?
- A mathematical basis for radiosity.
- We have a matrix equation of the form
- to solve.
Note diagonal
34Next
- How do we compute form factors?
- Hemicube method
- How do we solve the matrix?
- Shooting
- Progressive Radiosity
35Form Factor
- Expanding, we get
- where Vij is the visibility
36Alternative
37Computing the Form Factor
38Computing the Form Factor
39Closed form
- Only feasible for simple cases
- Visibility is hard
- Polygon-to-polygon solution by Schroeder and
Hanrahan
40Numerical approximation
41Nusselt Analog
42Why?
- Imagine a unit hemisphere centered around patch
(or node) i. - Projection onto sphere mechanically computes the
term - Projection of solid angle due to patch j.
next
43Solid Angle
44Area on Base
Also, ? is area of unit circle, so division is
appropriate, resulting in
45Hemicube
- Also obeys Nusselts analog
46Hemicube
- For convenience, a cube 1 unit high with a top
face 2 x 2 is used. Side faces are 2 wide by 1
high. - Â Decide on a resolution for the cube. Say 512 by
512 for the top.
47Compute Delta Form Factors
- Store in table.
- Note the symmetry
48Specifically
- Scan convert all primitives onto 5 faces
- Z buffer as usual
- Keep an item buffer
49Aliasing
50Other Problems
- Sampling is not even
- Must render complete dataset
- Should cull
- Could you use levels of detail?
51Monte Carlo
- Sample by casting rays to estimate Nusselts
analog. - Distribute the rays to get a good sampling of the
sphere
52Area
53Area Sampling
- Subdivide the primitive j into small pieces and
cast a ray to the center of each area to
determine visibility
54Summary
- Many ways to find form factors
- Hemicube most common
- Hardware acceleration
- Monte Carlo methods also used
55Next
- How do we solve the matrix?
- Shooting
- Progressive Radiosity
- Meshing
56References
- Cohen and Wallace, Radiosity and Realistic Image
Synthesis, Chapters 3-4.
57(No Transcript)
58Unused Slides
59Point Collocation
60Expanding
- Expanding
- Grouping (note Bj independent of x)
61Matrix Form
62Whats the Significance?
- We are computing the radiosities only at the
nodes. - However, depending on basis function we may have
to consider values over element.
Nj may be dependent on values over element j
63Constant Basis Function
- is the Kronecker delta function, 1
if i j, 0 otherwise. - Now
- where