What is diffuse reflection?
Diffuse reflection is a fundamental process in illuminating the 3D objects in a scene. It plays a significant role in these objects' perceived depth and texture.
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.
Lambert's cosine law and diffuse reflection
Diffuse reflection in computer graphics is modeled using Lambert’s cosine law.
The intensity of the diffusely reflected light is proportional to the cosine of the angle between the surface normal and the direction of the light source.
Where,
is the intensity of the light observed. is the maximum intensity of the light. is the angle between the direction of the light and the surface normal.
The mathematical perspective
The color
The cosine of the angle between the surface normal (
Where,
Normal (
): The normal is a vector that is perpendicular to the surface at the point of interest. Light vector (
): The light vector is a directional vector from a point towards the light source. Angle between
and ( ): It is the angle between the light vector and the normal vector.
The above equation shows that as the angle between
The equation can be rewritten as given below.
The exact amount of the diffuse reflection (
Where,
is the light source intensity is the surface reflectance coefficient and the color is the angle between the normal ( ) and the light ( )
Since the value of the cosine of the angle is known to be
Note:
The diffuse reflection coefficient (
) lies between and . It represents the property of the material that determines how much it diffuses the incident light.
Handling backface lighting
To avoid calculating negative values when the surface is facing away from the light source (
The
component means that if , it is treated as which indicates that no light is reflected in such cases.
The above equation avoids inaccurate negative reflections and prevents incorrect rendering of the backface lighting.
Examples
Same spheres lit differently from different lighting angles (independent of the viewing angle)
Same spheres but with different diffuse reflection coefficient (
)
When the value of
A higher
means that the surface will reflect more light, making it appear brighter. A lower
means that the surface will reflect less light, making it appear darker.
The variations of
Read more
Free Resources