7280_lecture3_graphics-pipeline-2
7280_lecture3_graphics-pipeline-2
Graphics Pipeline 2
I r ( λ ) = I a k a ( λ ) + ∑ m I m ( λ )[ k d ( λ )( Lm ⋅ N ) + k s ( λ )( R m ⋅ V ) n ]
2 3
4
5
• Each surface illuminated by all point and extended sources becomes itself, a source
of light for illumination off all other line-of-sight surface of the scene.
• Each of these surfaces, in turn, reflect light to other surfaces, including the original
one, thus achieving an “infinite regression” of reflections and illumination.
• Heuristic: Simply assume the indirect lighting is constant (same to all objects in the
scene) in most graphics systems.
I m ( λ ) k d ( λ )( Lm ⋅ N )
• where
– I is the intensity from the light source
– kd is the diffuse reflectivity of the surface (color of the object)
– N is the surface normal vector
– L is the light vector (the direction from the point to the light source)
– λ is the wavelength parameter
– m is the id of the light source
• If you plot the reflected intensity viewed from different
direction as a distance to the surface point, we will plot a
hemisphere.
cos n φ
n=5
n=50
n=200
-π/2 0 π/2 φ
I m ( λ ) k s ( λ )( R m ⋅ V ) n
• where
– I is the intensity from the light source
– ks is the specular reflectivity of the surface (color of the object)
– R is the normalized mirror reflection vector
– V is the viewing vector (the direction from the point to your eye)
– λ is the wavelength parameter
– m is the id of the light source
– n controls the sharpness of the bump
n=5
n = 15
∑ m
I m ( λ )[ k d ( λ )( Lm ⋅ N ) + k s ( λ )( R m ⋅ V ) ] n
Np=(N1+N2+N3+N4)/4
If the highlight appears in the interior of the polygon, Gouraud may fail to
shade this highlight because no highlighted intensities are recorded/calculated
at the vertices.
2) Mach banding
Human visual system emphasizes intensity changes occurring at a boundary,
which creates a banding effect. The bands can be obvious if insufficient
polygons are used to model area of high curvature.
• When you shade an object with single color on the screen, the
image will be quite boring and not realistic.
• Reason: real objects are seldom in single color and perfectly clean.
• Texture mapping is a technique to put texture (color pattern) on the
object surface to improve visual richness and realism.
• It is a process of replacing/modifying the original surface properties
(e.g. color, reflectivity and roughness) of the object surface by
referring to a table (map) stored in an image (texture map).
1.0
mapping
t
0.0 S X
0.0 s 1.0
Object
space
Z
u
0,1,0
0,1,1 1,1,0
v
0,0,0 1,1,1
1,0,0 w
0,0,1
1,0,1
vs
……
……
…… vs
……
……
……
vs
……
……
……
fs fs
… …