























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























Computer Graphics Illumination and Shading
Shading
lighting
Point light Directional light
Spot light Area light
Light intensity can be independent or dependent of the distance between object and the light source
θ
n Ambient n Diffuse n Specular
n Use different material reflection coefficients, Ka, Kd, Ks
object 1
object 3 object 2
object 4
It does not matter where the eye is
N : surface normal
light vector (vector from object to light) θ
See no specular
See lots specular
Only position the eye can see specular from P if object has an ideal reflection surface
But for non-perfect surface you will still see specular highlight when you move a little bit away from the ideal reflection direction Φ is deviation of view angle from mirror direction
highlight
θ
p
φ
specular = Ks x I x cos(φ)
n
n = 10
n = 30
n = 90
n = 270
specular = Ks x I x cos(φ)
n
n Sometimes light or surfaces are colored
n Treat R,G and B components separately
n i.e. can specify different RGB values for either light or material
n Illumination equation goes from:
Illum = ambient + diffuse + specular
To:
n
n n n
**0.773911 89.
0.**
**0.
0.**
**0.
0.**
Polished
Silver
**0.992157 27.
0.**
**0.
0.**
**0.
0.**
Brass
**0.5 32
0.**
**0.
0.**
**0.
0.**
Black plastic
Specular Exponent, n Ksr, Ksg,ksb
Diffuse Kdr, Kdg,kdb
Ambient Kar, Kag,kab
Material