Phong illumination, also known as the phong reflection, is used in computer graphics to calculate the way surfaces in 3D space reflect light. The Phong illumination model represents a more advanced way of simulating light reflection than simpler models. It adds realism to images by using the mathematical formulas to calculate the color of each pixel on a surface.
Phong illumination is based on the three primary lighting components, each of which are explained below.
Ambient reflection is scattered evenly all across a scene without a specific direction.
It ensures that the objects within the scene receive some light, leaving no areas entirely dark or shadowed.
Diffuse or Lambertian reflection is a common form of light reflection used in computer graphics. It describes the way light interacts with the surface of objects.
When light hits an object, it gets scattered in multiple directions rather than reflecting in a single direction.
It provides the basic colors and shadings to the objects.
Specular reflection is a phenomenon that occurs when light interacts with a smooth and shiny surface, such as a mirror or a polished metal.
The behavior of the specular reflection can be described by considering the interaction between the incident light waves and the surface.
The incident light is reflected in a single but opposite outgoing direction.
Give below are the complete details on how to calculate phong illumination based on the primary lighting components.
For an ambient reflection coefficient (
For a diffuse reflection coefficient (
Note: The
function ensures that the negative diffuse reflections are bounded to zero.
For a given specular reflection coefficient (
Note: The
function ensures that the negative specular reflections are bounded to zero.
To get the total illumination (
The above equation provides the basic idea behind the phong illumination model. However, these calculations are more complex as they have to account for multiple light sources, shadows and other factors in the scene.