Supplement to Lecture 17 - Department of Computer...
-
Upload
vuongthien -
Category
Documents
-
view
218 -
download
3
Transcript of Supplement to Lecture 17 - Department of Computer...
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Supplement to Lecture 17
Global Illumination: Global Diffuse
Sunday, March 10, 13
• Ray tracing is best with many highly
specular sufaces
- Not characteristic of real scenes
• Rendering equation describes general
shading problem
• Radiosity solves rendering equation for
perfectly diffuse surfaces
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Global Illumination
Sunday, March 10, 13
• Energy ~ light (incident, transmitted)
- Must be conserved
• Energy flux = luminous flux = power =
energy/unit time
- Measured in lumens
- Depends on wavelength so we can integrate
over spectrum using luminous efficiency
curve of sensor
• Energy density (Φ) = energy flux/unit area
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Terminology
Sunday, March 10, 13
Intensity ~ brightness
- Brightness is perceptual
= flux/area-solid angle = power/unit
projected area per solid angle
- Measured in candela
Φ = ∫ ∫ I dA dω
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Terminology (contd).
Sunday, March 10, 13
• Consider a point on a surface
N
Iout(Φout)
Iin(Φin)
Iout(Φout) = E(Φout) + ∫ 2πRbd(Φout, Φin )Iin(Φin) cos θ dω
bidirectional reflection coefficient
angle between normal and Φin
emission
Note that angle is really two angles in 3D and wavelength is fixed
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Rendering Equation
Sunday, March 10, 13
• Outgoing light is from two sources
- Emission
- Reflection of incoming light
• Must integrate over all incoming light
- Integrate over hemisphere
• Must account for foreshortening of
incoming light
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Rendering Equation - 2
Sunday, March 10, 13
• Rendering equation is an energy balance
- Energy in = energy out
• Integrate over hemisphere
• Fredholm integral equation
- Cannot be solved analytically in general
• Various approximations of Rbd
give standard rendering models
• Should also add an occlusion term in front of
right side to account for other objects blocking
light from reaching surface
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Rendering Equation - 3
Sunday, March 10, 13
• Consider objects to be broken up into flat
patches (which may correspond to the
polygons in the model)
• Assume that patches are perfectly diffuse
reflectors
• Radiosity = flux = energy/unit area/ unit
time leaving patch
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Radiosity
Sunday, March 10, 13
n patches numbered 1 to n
bi = radiosity of patch I
ai = area patch I
total intensity leaving patch i = bi ai
ei ai = emitted intensity from patch I
ρi = reflectivity of patch I
fij = form factor = fraction of energy leaving
patch j that reaches patch i
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Notation
Sunday, March 10, 13
Consider light at a point p arriving from p’
i(p, p’) = υ(p, p’)(ε(p,p’)+ ∫ ρ(p, p’, p’’)i(p’, p’’)dp’’
occlusion = 0 or 1/d2
emission from p’ to p
light reflected at p’ from all
points p’’ towards p
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Modified Integral Equation
Sunday, March 10, 13
energy balance
biai = eiai + ρi ∑ fjibjaj
reciprocity
fijai = fjiaj
radiosity equation
bi = ei + ρi ∑ fijbj
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Radiosity Equation
Sunday, March 10, 13
b = [bi]
e = [ei]
R = [rij] rij = ρi if i ≠ j rii = 0
F = [fij]
b = e - RFb
formal solution
b = [I-RF]-1e
Not useful since n is usually very large
Alternative: use observation that F is sparse
We will consider determination of form factors later
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Matrix Form
+
[I-RF]-1 = I + RF +(RF)2+…
b = [I-RF]-1e = e + RFe + (RF)2e +…
Sunday, March 10, 13
For sparse matrices, iterative methods usually
require only O(n) operations per iteration
Jacobi’s method
bk+1 = e - RFbk
Gauss-Seidel: use immediate updates
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Solving the Radiosity Equation
Sunday, March 10, 13
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Radiosity Rendered Image
Sunday, March 10, 13
• Consider two flat patches
foreshortening
fij = (1/ai) ∫ai ∫ai (oij cos θi cos θj / πr2 )dai daj
foreshortening of patch j
foreshortening of patch i
occlusion
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Computing Form Factors
Sunday, March 10, 13
CS 354 Computer Graphicshttp://www.cs.utexas.edu/~bajaj/Department of Computer Science University of Texas at Austin
Notes and figures from Ed Angel: Interactive Computer Graphics, 6th Ed., 2012 © Addison Wesley
Hemisphere/Hemicube
Sunday, March 10, 13