CS490 - Lighting Model Education Tool
Authored By: Patrick T. Nichols
Phong Lighting Model Calculation
The Phong Lighting model breaks the intensity of light down into three separate parts, ambient diffuse, and specular. Below is a description of each, and the equations used to calculate them.
Ambient Light
Ambient light is the general light in the room which is not coming
directly from the light source. It is usually reflection off of some
surface from another light source, or secondary and tertiary reflected
light of the given light source. The Phong lighting model makes the
generalization that such light can be accounted for by a single
constant factor Ka multiplied against the intensity of the light
source:
The ambient intensity (Ia) is never more than the the intensity of the light source (Il) because Ka is constrained to be within the range [0..1].
Diffuse Light
Diffuse light is the light which is reflected off of the surface but
spreads out in all directions, unlike the specular light which is in
the general direction of the reflection vector. The diffuse light can
be calculated by the equation below:
The light source intensity (Il) is multiplied against the diffuse constant (Kd) and the cosine of the angel between the normal vector of the surface and the Lighting Vector (radial vector of the light source towards the surface). This angle is what gives the diffuse light dependence on the light source position.
Specular Light
Specular light is the bright spot that is directly reflected light
from a surface. For the most part, in all lighting models the specular
highlight closely follows the reflection vector, especially in the
Phong model where it follows it precisely. The specular highlight
cannot be seen from every angle, and as the lobe on the intensity
spheroid shows, it can only be seen within close proximity of the
reflection vector. This dependence on viewing position would mean that
the viewing vector should be in the calculation of the specular
intensity, and as can be seen in the equation below, it is: