Blinn–Phong shading model

From Wikipedia, the free encyclopedia

The Blinn-Phong shading model (also called Blinn-Phong reflection model or modified Phong reflection model) is a modification to the Phong reflection model, trading visual precision for computing efficiency.

In Phong shading, one must continually recalculate the angle R \cdot V between a viewer (V) and the beam from a light-source (L) reflected (R) on a surface.

If we instead calculate a halfway vector between the viewer and light-source vectors,

H = \frac{L + V}{\left| L + V \right|}

we can replace R \cdot V with N \cdot H.

This dot product represents the cosine of an angle that is half of the angle represented by Phong's dot product, if V, L, N and R all lie in the same plane. The angle between N and H is therefore sometimes called the halfway angle.

The halfway angle is smaller than the angle we want in Phong's model, but considering that Phong is using \left( R \cdot V \right)^{\alpha}, we can set an exponent \alpha^\prime so that \left(N \cdot H \right)^{\alpha^\prime} is closer to the former expression. The size of the specular highlights can be matched in this way very closely to a corresponding Phong reflection, but they will always retain a subtly different shape.

Visual comparison: Blinn-Phong highlights are larger than Phong with the same exponent, but by lowering the exponent, they can become nearly equivalent.

Additionally, while it can be seen as an approximation to the Phong model, it produces more accurate models of empirically determined bidirectional reflectance distribution functions than Phong for many types of surfaces. (See: Experimental Validation of Analytical BRDF Models, Siggraph 2004)

Blinn-Phong is the default shading model used in OpenGL, and is carried out on each vertex as it passes down the graphics pipeline; pixel values between vertices are interpolated by Gouraud shading by default, rather than the more expensive Phong shading.

[edit] See also