Spectacular Specular - LEAN and CLEAN specular highlights Dan Baker Firaxis Games.
Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes...
-
Upload
maud-kelly -
Category
Documents
-
view
215 -
download
0
Transcript of Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes...
![Page 1: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/1.jpg)
Radiosity
1
![Page 2: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/2.jpg)
2
Introduction
•Ray tracing best with many highly specular surfaces
Not real scenes
•Rendering equation describes general shading problem
•Radiosity solves rendering equation for perfectly diffuse surfaces
![Page 3: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/3.jpg)
3
Terminology
•Energy ~ light (incident, transmitted) Must be conserved
•Energy flux = luminous flux = power = energy/unit time
Measured in lumens
Depends on wavelength so can integrate over spectrum using luminous efficiency curve of sensor
•Energy density (Φ) = energy flux/unit area
![Page 4: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/4.jpg)
4
Terminology
Intensity ~ brightness/lightness Brightness/lightness perceptual
= flux/area-solid angle = power/unit projected area per solid angle
Measured in candela
Φ = ∫ ∫ I dA dω
![Page 5: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/5.jpg)
5
Rendering Eqn (Kajiya)
•Consider point on surface
N
Iout(Φout)Iin(Φin)
![Page 6: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/6.jpg)
6
Rendering Equation
•Outgoing light from two sources Emission
Reflection of incoming light
•Must integrate over all incoming light Integrate over hemisphere
•Must account for foreshortening of incoming light
![Page 7: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/7.jpg)
7
Rendering Equation
Iout(Φout) = E(Φout) + ∫ 2πRbd(Φout, Φin )Iin(Φin) cos θ dω
bidirectional reflection coefficient
angle between normal and Φinemission
Note that angle is really two angles in 3D and wavelength is fixed
![Page 8: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/8.jpg)
8
Rendering Equation
• Rendering equation = energy balance Energy in = energy out
• Integrate over hemisphere
• Fredholm integral equation Cannot solve analytically in general
• Various approximations of Rbd give standard rendering models
• Should also add occlusion term in front of right side to account for other objects blocking light from reaching surface
![Page 9: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/9.jpg)
9
Another version
Consider light at point p arriving from p’
i(p, p’) = υ(p, p’)(ε(p,p’) + ∫ ρ(p, p’, p’’)i(p’, p’’)dp’’
occlusion = 0 or 1/d2emission from p’ to p
light reflected at p’ from all points p’’ towards p
![Page 10: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/10.jpg)
10
Radiosity
•Consider objects to be broken up into flat patches
may correspond to polygons in model
•Assume patches = perfectly diffuse reflectors
•Radiosity = flux = energy/unit area/ unit time leaving patch
![Page 11: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/11.jpg)
11
Notation
n patches numbered 1 to n
bi = radiosity of patch i
ai = area of patch i
bi ai = total intensity leaving patch i
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
![Page 12: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/12.jpg)
form factor
In physics, (usually written e) of material
sometimes called emissivity
= proportion of energy transmitted by object
that can be transferred to another objecten.wikipedia.org/wiki/Form_factor_(radiative_transfer)
12
![Page 13: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/13.jpg)
13
Radiosity Equation
energy balance
biai = eiai + ρi ∑ fjibjaj
reciprocity
fijai = fjiaj
radiosity equation
bi = ei + ρi ∑ fijbj
emitted reflected
![Page 14: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/14.jpg)
14
Matrix Form
b = [bi]
e = [ei]
R = [rij] rij = ρi if i ≠ j rii = 0
F = [fij]
![Page 15: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/15.jpg)
15
Matrix Form
b = e - RFb
formal solution
b = [I-RF]-1e
Not useful since n usually very largeAlternative: use observation that F is sparse
Will consider determination of form factors later
![Page 16: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/16.jpg)
16
Solving the Radiosity Equation
For sparse matrices, iterative methods usuallyrequire only O(n) operations per iteration
Jacobi’s method
bk+1 = e - RFbk
Gauss-Seidel: use immediate updates
![Page 17: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/17.jpg)
17
Series Approximation
1/(1-x) = 1 + x + x2+ ……
b = [I-RF]-1e = e + RFe + (RF)2e +…
[I-RF]-1 = I + RF +(RF)2+…
![Page 18: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/18.jpg)
18
Rendered Image
![Page 19: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/19.jpg)
19
Patches
![Page 20: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/20.jpg)
20
Computing Form Factors
•Consider two flat patches
![Page 21: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/21.jpg)
21
Using Differential Patches
foreshortening
![Page 22: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/22.jpg)
22
Form Factor Integral
fij = (1/ai) ∫ai ∫ai (oij cos θi cos θj / πr2 )dai daj
occlusion
foreshortening of patch i
foreshortening of patch j
![Page 23: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/23.jpg)
23
Solving the Intergral
•Very few cases where integral has (simple) closed form solution
Occlusion further complicates solution
•Alternative: use numerical methods•Two step process similar to texture mapping
Hemisphere
Hemicube
![Page 24: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/24.jpg)
24
Form Factor Examples 1
![Page 25: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/25.jpg)
25
Form Factor Examples 2
![Page 26: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/26.jpg)
26
Form Factor Examples 3
![Page 27: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/27.jpg)
27
Hemisphere
•Use illuminating hemisphere•Center hemisphere on patch with normal pointing up
•Must shift hemisphere for each point on patch
![Page 28: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/28.jpg)
28
Hemisphere
![Page 29: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/29.jpg)
29
Hemicube
•Easier to use hemicube instead of hemisphere
•Rule each side into “pixels”•Easier to project on pixels give delta form factors can be added up to give desired form factor
•To get delta form factor need only cast ray through each pixel
![Page 30: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/30.jpg)
30
Hemicube
![Page 31: Radiosity 1. 2 Introduction Ray tracing best with many highly specular surfaces Not real scenes Rendering equation describes general shading problem.](https://reader035.fdocuments.us/reader035/viewer/2022081515/5697bff61a28abf838cbe3cb/html5/thumbnails/31.jpg)
31
Instant Radiosity
•Want to use graphics system if possible•Suppose make one patch emissive•Light from this patch distributed among other patches
•Shade of other patches ~ form factors•Must use multiple OpenGL point sources to approximate uniformly emissive patch