csce 641 computer graphics: radiosity jinxiang chai
TRANSCRIPT
![Page 1: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/1.jpg)
CSCE 641 Computer Graphics: Radiosity
Jinxiang Chai
![Page 2: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/2.jpg)
Rendering: Illumination Computing
Direct (local) illumination
Light directly from light sources
No shadows
Indirect (global) illumination
Transparent, reflective surfaces, and hard shadows (Ray tracing)
Diffuse interreflections, color bleeding, and soft shadow (radiosity)
![Page 3: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/3.jpg)
Rendering: Illumination Computing
Direct (local) illumination
Light directly from light sources
No shadows
Indirect (global) illumination
Transparent, reflective surfaces, and hard shadows (Ray tracing)
Diffuse interreflections, color bleeding, and soft shadow (radiosity)
![Page 4: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/4.jpg)
Review: Ray Tracing Assumption
The illumination of a point is determined by
- illumination/shadow ray (direct lighting from light sources)
![Page 5: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/5.jpg)
Review: Ray Tracing Assumption
The illumination of a point is determined by
- illumination/shadow ray (direct lighting from light sources)
![Page 6: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/6.jpg)
Review: Ray Tracing Assumption
The illumination of a point is determined by
- illumination/shadow ray (direct lighting from light sources)
- reflection ray (light reflected by an object)
![Page 7: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/7.jpg)
Review: Ray Tracing Assumption
The illumination of a point is determined by
- illumination/shadow ray (direct lighting from light sources)
- reflection ray (light reflected by an object)
- transparent ray (light passing through an object)
![Page 8: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/8.jpg)
Review: Ray Tracing Assumption
The illumination of a point is determined by
- illumination/shadow ray (direct lighting from light sources)
- reflection ray (light reflected by an object)
- transparent ray (light passing through an object)
![Page 9: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/9.jpg)
Ray Tracing Assumption
The illumination of a point is determined by
- illumination/shadow ray (direct lighting from light sources)
- reflection ray (light reflected by an object)
- transparent ray (light passing through an object)
![Page 10: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/10.jpg)
Pros and Cons of Ray Tracing
Advantages of ray tracing
All the advantages of the local illumination model
Also handles shadows, reflection, and refraction
Disadvantages of ray tracing
Computational expense
No diffuse inter-reflection between surfaces (i.e., color bleeding)
Not physically accurate
Radiosity handles these shortcomings for diffuse surfaces!
![Page 11: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/11.jpg)
Radiosity vs. Local Illumination
![Page 12: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/12.jpg)
Radiosity
![Page 13: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/13.jpg)
Physical Image vs. Radiosity Rendering
![Page 14: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/14.jpg)
Radiostiy
Definition: The radiant (luminous) exitance is the radiant flux/power per unit area leaving a surface.
( ) odM x
dA
2 2
W lmlux
m m
![Page 15: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/15.jpg)
Radiosity
Model light effects by considering the physical laws governing the radiant energy transfer;
The radiosity model computes radiant-energy interactions between all the surfaces in a scene
![Page 16: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/16.jpg)
Radiosity: Key Idea #1
![Page 17: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/17.jpg)
Diffuse Surface
![Page 18: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/18.jpg)
Radiosity: Key Idea #2
![Page 19: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/19.jpg)
Constant Surface Approximation
![Page 20: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/20.jpg)
Radiosity Equation
N
jjijiselfi RadiosityaRadiosityRadiosity
1,
![Page 21: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/21.jpg)
Radiosity Equation
N
jjjself RadiosityaRadiosityRadiosity
111,1
N
jjjself RadiosityaRadiosityRadiosity
122,2
N
jjNjNselfN RadiosityaRadiosityRadiosity
1,
![Page 22: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/22.jpg)
Radiosity Algorithm
![Page 23: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/23.jpg)
Energy Conservation Equation
N
jjiiei ijF
1, )(
![Page 24: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/24.jpg)
N
jjiiei ijF
1, )(
Energy Conservation Equation
The total rate of radiant energy leaving surface i per unit square
![Page 25: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/25.jpg)
N
jjiiei ijF
1, )(
Energy Conservation Equation
The rate of energy emitted from surface i per unit area
- zero if surface i is not a light source
![Page 26: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/26.jpg)
N
jjiiei ijF
1, )(
Energy Conservation Equation
Reflectivity factorPercent of incident light that is reflected in all
directions
![Page 27: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/27.jpg)
N
jjiiei ijF
1, )(
Energy Conservation Equation
Form factor
Fractional amount of radiant energy from surface j that reaches surface i
![Page 28: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/28.jpg)
Compute Form Factors
ji
AA xy
yx
j
dAdAyxVrA
ijFji
),(coscos1
)(,
2
The form factor specifies the fraction of the energy leaving one patch and arriving at the other. In other words, it is an expression of radiant exchange between two surface patches!
![Page 29: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/29.jpg)
Compute Form Factors
ji
AA xy
yx
j
dAdAyxVrA
ijFji
),(coscos1
)(,
2
Radiant energy reaching Ax from Ay
Radiant energy leaving Ay in all directions
The form factor specifies the fraction of the energy leaving one patch and arriving at the other. In other words, it is an expression of radiant exchange between two surface patches!
![Page 30: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/30.jpg)
Form Factor: Reciprocity
yx
AA xy
yx
j
dAdAyxVrA
ijFji
),(coscos1
)(,
2
xy
AA xy
yx
i
dAdAyxVrA
jiFji
),(coscos1
)(,
2
ji AijFAjiF )()(
![Page 31: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/31.jpg)
Radiosity Equation
Radiosity for each polygon
Linear system:
- : radiosity of patch I (unknown)
- : emission of patch I (known)
- : reflectivity of patch I (known)
- : form-factor (known)
N
jjiiei ijFi
1, )(:
i
i
jiF
ie,
![Page 32: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/32.jpg)
Linear System
3,
2,
1,
2
1
21
22222122
11211111
......
1...
............
...1
...1
e
e
e
NNNNNNNN
N
N
FFF
FFF
FFF
A X = B
![Page 33: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/33.jpg)
Radiosity Algorithm
![Page 34: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/34.jpg)
Form Factors for Infinitesimal Surfaces
),(coscos
)(2
yxVdAr
ijF ixy
yx
• Visibility
- if not visible, receive zero power
![Page 35: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/35.jpg)
Form Factors for Subdivided Patches
ji
AA xy
yx
j
dAdAyxVrA
ijFji
),(coscos1
)(,
2• Visibility
- if not visible, receive zero power
![Page 36: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/36.jpg)
Form Factor: How to compute?
Closed Form
- analytical
Hemicube
![Page 37: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/37.jpg)
Form Factor: Analytical
yx
AA xy
yx
j
dAdAyxVrA
ijFji
),(coscos1
)(,
2
![Page 38: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/38.jpg)
Form Factor: How to compute?
Closed Form
- analytical
Hemicube
![Page 39: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/39.jpg)
Form Factor: Nusselt Analog
Nusselt developed a geometric analog which allows the simple and accurate calculation of the form factor between a surface and a point on a second surface.
3D diagram
![Page 40: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/40.jpg)
Form Factor: Nusselt Analog
The form factor is, then, the area projected on the base of the hemisphere divided by the area of the base of the hemisphere, or (A/B)
AB
2D diagram
![Page 41: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/41.jpg)
Form Factor: Nusselt Analog
![Page 42: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/42.jpg)
Form Factor: Nusselt Analog
So how can we use Nusselt Analog to compute the form factor?
![Page 43: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/43.jpg)
Form Factor: Nusselt Analog
So how can we use Nusselt Analog to compute the form factor?
- answer: precomputing
![Page 44: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/44.jpg)
Form Factor: HemiCube
![Page 45: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/45.jpg)
Form Factor: HemiCube
• Project path on hemicube
• Add hemicube cells to compute form factors
AB
2D diagram
![Page 46: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/46.jpg)
Precomputing Form Factor
How to calculate the form factor for each cell?
![Page 47: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/47.jpg)
Delta Form Factor: Top Face
Top of hemicube
![Page 48: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/48.jpg)
Delta Form Factors: Side Faces
Side of hemicube
![Page 49: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/49.jpg)
The Hemicube in Action
![Page 50: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/50.jpg)
Form Factors: HemiCube
![Page 51: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/51.jpg)
Form Factors
![Page 52: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/52.jpg)
Radiosity Algorithm
![Page 53: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/53.jpg)
How to Solve Linear System?
Matrix conversion
Iterative approaches
- Jacobian (gathering)
- Gauss-Seidel (gathering)
- progressive refinement (shooting)
![Page 54: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/54.jpg)
Matrix Conversion
3,
2,
1,
1
21
22222122
11211111
2
1
...
1...
............
...1
...1
...
e
e
e
NNNNNNN
N
N
N FFF
FFF
FFF
- Computational cost: O(N3)
- Very slow for a large set of polygons
![Page 55: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/55.jpg)
Iterative Approaches
N
jjiiei ijF
1, )(
![Page 56: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/56.jpg)
Jacobian Iterations
For all patches i, i=1,…,N,
While not converged:
for all patches i=1,…,N
iei ,0
N
j
iterjiie
iteri ijF
1
1, )(
![Page 57: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/57.jpg)
Jacobian Iterations
For all patches i, i=1,…,N,
While not converged:
for all patches i=1,…,N
iei ,0
N
j
iterjiie
iteri ijF
1
1, )(
Update of one patch requires evaluation of N Form Factors
What’s the computational cost?
![Page 58: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/58.jpg)
Successive Approximation
eL
e eL K L eL
eK L eK K L eK K K L
2e eL K L 3
e eL K L
![Page 59: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/59.jpg)
Rendering
- The final Φi's can be used in place of intensities in a standard renderer (Gouraud, per-veretx shading)
- Radiosities are constant over the extent of a patch
- A standard renderer requires vertex intensities (or radiosities)
- If the radiosities of surrounding patches are know, vertex radiosities can be estimated using bilinear interpolation
![Page 60: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/60.jpg)
Vertex Intensity: Bilinear Interpolation
![Page 61: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/61.jpg)
Consolation Room
![Page 62: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/62.jpg)
Theatre
![Page 63: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/63.jpg)
Steel Mills
![Page 64: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/64.jpg)
Radiosity: Benefit
Global illumination method: modeling diffuse inter-reflection
Color bleeding: a red wall next to a white one casts a reddish glow on the white wall near the corner
Soft shadows – an “area” light source casts a soft shadow from a polygon
No ambient term hack, so when you want to look at your object in low light, you don’t have to adjust parameters of the objects – just the intensities of the lights!
View independent: it assigns a brightness to every surface
![Page 65: CSCE 641 Computer Graphics: Radiosity Jinxiang Chai](https://reader036.vdocuments.net/reader036/viewer/2022062313/56649d705503460f94a526b9/html5/thumbnails/65.jpg)
Radiosity: Limitation
Radiation is uniform in all directions
Radiosity is piecewise constant
– usual renderings make this assumption, but then interpolate cheaply to fake a nice-looking answer
– this introduces quantifiable errors
No surface is transparent or translucent
Reflectivity is independent of directions to source and destination