Title: CS 655 Computer Graphics
1CS 655 Computer Graphics
2Radiosity
- Problems with ray tracing
- Doesnt handle diffuse object intereactions
- Doesnt accurately model nature (?)
- Idea behind radiosity
- Model light interactions between every object in
the scene - Object A will receive some light from Object B.
Of that light - some will be absorbed
- some will be reflected back to B
- some will be reflected to other objects
3Radiosity Method
- Assume a closed environment
- Split the scene into patches
- Each patch has a constant radiosity
- The radiosity of a patch is the total rate of
energy leaving that patch - Emitted Reflected
- Determine the energy transmitted between all
patches in the environment
B
A
4Radiosity Method
- Attempts to handle color bleeding
- Handles diffuse surface interaction well
- Eliminates the ray tracing ambient term
- The idea comes from the heat transfer literature
- Argument most ray tracing scenes are contrived
- Radiosity models real-world scenes better (??)
5Radiosity Image
6Radiosity Image
7Radiosity
- Very time consuming 10X ray tracing
- Not as amenable to speed-up techniques
- View independent
- Pro Can move the view anywhere in the
environment and not have to recompute - Con No specularity
- Objects are perfect (Lambertian) diffusors,
reflectors, or emitters - Incident light reflects equally in all directions
- The accuracy of the solution depends on the
initial discretization of the scene
8More Images
9More Images
10And yet More Images
11(No Transcript)
12(No Transcript)
13(No Transcript)
14Ray tracing vs. Radiosity
- Ray tracing
- Handles specularity well
- Amenable to curved objects
- Transparencies
- Radiosity
- Handles diffuse lighting well
- Color bleeding
- View independent
- The argument for radiosity
15Actual sculpture
Original sculpture vertical slabs White on the
front side, colored on the back Positioned offset
and behind one another Lighting is from behind
the sculpture
16Ray Tracing of the Sculpture
Ray traced image of the sculpture white light in
the scene
17Radiosity Solution
Radiosity image of the sculpture, white light
behind the sculpture
18Computing Radiosity
- We need to compute the radiosity of each patch
- To do this, we need to know
- The emittance of the patch
- How much energy is received by the patch
- How much energy is absorbed by the patch
- The emittance is given as a patch material
property - The absorption is given as a patch material
property - We need to somehow compute the energy received by
each patch
19Form Factors
- We will do this by computing form factors
- A form factor specifies the amount of energy
leaving one patch that makes it to another patch - Dependent on
- The areas of the patches
- The orientations of the patches
- The radiosities of the patches
20Computing Radiosities
21Computing Radiosities
- In a closed environment, energy transport will be
in equilibrium - We divide the environment into N patches, with
the assumption that the radiosity is constant
across a patch - This gives
22Radiosity Computation
- Due to the manner in which form factors are
defined and computed, the following relationship
exists - so,
- hence,
23Radiosity Computation
- This gives the radiosity for a single patch Bi
- Each patch has a similar equation, so in matrix
form we get
24Observations
- The Eis will only be nonzero for emitting
surfaces - This equation is actually valid only for a single
wavelength - The Eis and the ris are both wavelength
dependent, thus the equation must be solved for
each color band - FNN is 0 for planar and convex surfaces
- none of the light leaving this surface will
strike this surface directly -
25Radiosity Computation
- ri gt 0 for all i
- Thus, the matrix is diagonally dominant
- Hence, it is guaranteed to converge using
Gauss-Sidel - The system is solved using Gauss-Sidel, and the
radiosities are stored - Then, the environment can be rendered using any
standard rendering technique - Radiosities are computed per patch
- To get smoothly shaded objects, radiosities of
neighboring patches are combined to produce
vertex radiosities
26Computing Vertex Radiosities
B2
B3
Bv
Bv ¼ (B1 B2 B3 B4)
B1
B4
- Vertex radiosities are then used for shading
27Steps in Radiosity
- Discretize the environment
- Compute form factors
- Solve the set of equations for the Bs
- Render
- Most of the computation time is in the form
factor calculation - An order of magnitude greater than solving the
set of equations and rendering - The quality of the image depends on the size and
number of patches - Subdivide areas of large change
- If a patch has small change over it, leave the
patch large
28Substructuring
- An approach at getting better results in areas of
large change without significantly increasing
computation time - Avoid the N2 problem of inserting new patches
- Idea
- Divide areas of large change into smaller
elements - Compute patch radiosities
- Compute element radiosities assuming that all
other patches remain undivided
29Substructuring
Patch
Element
30Element Radiosities
- Assume patch Pi is subdivided into mi elements,
pq, with 1 q mi, then the radiosity of an
element is given by - To compute this, we must first compute
element-to-patch form factors and patch
radiosities
31Element-to-patch Form Factors
- Element-to-patch form factors are computed the
same way as patch-to-patch form factors (more on
computing form factors later) - The total number of elements in the system is
- so this generates an M x N matrix for the form
factors - Note form factors are computed element to
patch, not element to element
32Patch to Patch Form Factors
- Once the element-to-patch form factors have been
computed, we then compute the patch-to-patch form
factors - This gives an N x N matrix of form factors
33Patch Radiosities
- Once the patch-to-patch form factors are
computed, we solve the N x N matrix using
Guass-Sidel to compute patch radiosities
34Element Radiosities
- Once the patch radiosities have been computed, we
use them, along with the element-to-patch form
factors, to compute element radiosities
35Substructuring Summary
36Table no Adaptive Subdivision
37Table some Adaptive Subdivision
38Table more Adaptive Subdivision
39Table even more Adaptive Subdivision
40Another Adaptive Subdivision Image
41Progressive Refinement Radiosity
- Radiosity is very time consuming, with no results
until the final solution is achieved - Is it possible to get partial results earlier,
that are not the full solution, but are a good
approximation? - Progressive refinement radiosity attempts to do
this - Idea
- Get lower quality images quickly
- Iteratively refine the image, getting better
results with more time
42Progressive Refinement
- In standard radiosity, for each iteration we
solve one row of the matrix, which gives the
radiosity of one patch - i.e., given the outgoing radiosities for all of
the patches we know, we compute the radiosity for
one new patch - Continue this process until we have the
radiosities for all patches
43Progressive Refinement
- Instead of this approach, what if we updated all
patches from one patch, rather than updating one
patch from all others?
Standard Radiosity
Progressive Refinement
44Progressive Refinement
- The radiosity algorithm is reordered to allow for
this - One patch shoots out its energy
- All patches are updated to account for this
- The radiosity of patch i due to patch j is given
by - so
45Progressive Refinement
- We can use this relationship for all patches Bj
- A patch Bi shoots energy and all patches Bj are
updated - Then, another patch shoots its light, and so
forth until convergence - Order the patches so that most of the light is
shot in the first few iterations - Emitting patches first
- Patches that receive the most light from the
light sources next - etc.
- This gives a dark to light progression
- You can view the image early on later
iterations dont change the image significantly
46Progressive Refinement
47More Progressive Refinement
1 iteration 2 iterations 3 iterations
48Ambient Light
- An ambient term can be introduced to reduce the
large jumps between iterations - As the solution nears convergence, the ambient
term decreases, then finally goes away - The ambient term is calculated from approximate
form factors
49Ambient Light
- Then an average reflectivity of all patches is
computed by - Since light can be reflected any number of times,
we define an overall reflection factor m as - so
50Ambient Light
- The ambient light is then estimated with
- Where DBj is the difference in estimates of Bj
between the current and last iteration
51Progressive Refinement with Ambient
52Progressive Refinement Summary
- Find the patch with the greatest radiosity or
emitted energy - Evaluate a column from the matrix, i.e., the form
factors from this patch to all other patches - Update the radiosities of all receiving patches
- Reduce the ambient term as a function of the DBs
53Radiosity Terminology
- Gathering
- Standard radiosity at each iteration, one
patchs radiosity is updated by accounting for
contributions from all other patches - Shooting
- the technique used in progressive refinement in
which at each iteration, one patch shoots its
energy and all patches that receive energy from
that one are updated - Shooting and ambient
- An ambient term is introduced to lessen the
variation in the image from iteration to
iteration. As the solution converges, the
ambient term goes away
54Radiosity Summary
- Handles diffuse reflections well
- View independent
- No specularity
- Can move viewpoint anywhere in the environment
and not have to recompute the radiosities - Time consuming
- gt 90 in computing form factors
- lt 10 solving the system of equations
- 0 in rendering