Upload
berniece-christal-morris
View
219
Download
2
Tags:
Embed Size (px)
Citation preview
3/23/2005 © Dr. Zachary Wartell 1
Illumination Models and Surface-Rendering Methods
3/23/2005 © Dr. Zachary Wartell 2
light models and surface rendering
• light model – model for calculating the light intensity at a single surface point
• surface rendering – procedure for applying a lighting model to obtain pixel colors for each pixel on a projected surface. Options:– compute light model at every pixel
• ray-tracing, scan-line graphics hardware circa 2000 (but more computation→lower framerate)
– compute light model at few surface locations and interpolate color of other pixels
• older scan-line graphics hardware, modern hardware must still balance realism vs framerate.
3/23/2005 © Dr. Zachary Wartell 3
Light in real world
medium
emission spectrum
reflection spectrum
phototopic curve(eye sensitivity)
3/23/2005 © Dr. Zachary Wartell 4
Light in graphics
medium
emission spectrum
reflection spectrum
Display
RGB
RGB
RGB
RGBRGB
RGBpixels
space “outside”display typically
not computationallymodeled
3/23/2005 © Dr. Zachary Wartell 5
Light interactions
Light interacts with a surface in some combination of:
• emission• reflection
– on surface : mirror, specular or diffuse– suspended particles: random scattering
• transmission– transparent, translucent, refraction
• absorption
3/23/2005 © Dr. Zachary Wartell 6
Distance Attenuationemission spectrum
Display
RGB
RGBpixel
At farther distances same amount of energy is
spread over a larger area (section of sphere). In
particular:
energy/area = 1 / distance2
3/23/2005 © Dr. Zachary Wartell 7
Directional Light Sources
PointLight Source
Vlight
θl
Vobj
α
If α < θl then P is illuminatedby light; otherwise it is not.
Vobj Vlight = cos α, so test
Vobj Vlight ≥ cos θl
P
assumes vectorsare normalized and 0 ≤ θl ≤ 90◦
3/23/2005 © Dr. Zachary Wartell 8
Surface Lighting Effects: Diffuse Reflection
• diffuse reflection – reflection intensity equal in all outgoing directions. Reflected light color is due to combination of incoming spectrum and surface absorption spectrum
3/23/2005 © Dr. Zachary Wartell 9
Surface Lighting Effects: Specular Reflection
• Specular reflection – reflected light is concentration in a particular outgoing direction. It appears as a highlight or bright spot on surface. In physical world reflected light is primarily due to incoming light spectrum, but graphics models usually include surface reflection spectrum also.
3/23/2005 © Dr. Zachary Wartell 10
Surface Lighting Effects: Ambient Light
• ambient light – approximates all the combined light that a surface receives from all other non-emitting surfaces. Light is not direct from light source but reflected off an intermediate surface.
This is a very coarse approximation to reality. Doesn’t model “color bleeding”.
3/23/2005 © Dr. Zachary Wartell 11
Diffuse reflection of Point Light Source
CGwOG, Hearn&Baker
3/23/2005 © Dr. Zachary Wartell 12
Diffuse Reflection of Ambient and Point Light
CGwOG, Hearn & Baker
3/23/2005 © Dr. Zachary Wartell 13
Specular Reflection
• incident angle = reflection angle = θ• mirror reflection – all reflected light follows R• specular reflection – reflected light distributed in
“reflection” cone around R
NL
V
Rθ θ Φ
mirror shiny specular dull specular
NL
V
RΦ
NL
V
RΦ
NL
V
RΦ
NL
V
RΦ
NL
V
RΦ
NL
V
RΦ
3/23/2005 © Dr. Zachary Wartell 14
Combined Illumination Model
, , , ,1
,
,
,
is radial/distance attenuation equation
is angular attenuation equation (spotlight)
0.0, if 0.0 (lig
n
surfemission ambdiff l radatten l angatten l diff l specl
l radatten
l angatten
l
l diff
I I I f f I I
f
f
I
N L
,
ht source behind object)
, otherwise
0.0, if 0.0 (light source behind object)
max{0, }, otherwises
d l l
l
l spec n
s l
k I
Ik I
l
N L
N L
N H
●to keep I in [0,1] range: clamp final result, normalizeindividual terms, or scale based on maximum of all pixels