Phong shading
Encyclopedia
Phong shading refers to an interpolation
Interpolation
In the mathematical field of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points....

 technique for surface shading
Shading
Shading refers to depicting depth perception in 3D models or illustrations by varying levels of darkness.-Drawing:Shading is a process used in drawing for depicting levels of darkness on paper by applying media more densely or with a darker shade for darker areas, and less densely or with a lighter...

 in 3D computer graphics
3D computer graphics
3D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images...

. It is also called Phong interpolation or normal-vector interpolation shading. Specifically, it interpolates surface normal
Surface normal
A surface normal, or simply normal, to a flat surface is a vector that is perpendicular to that surface. A normal to a non-flat surface at a point P on the surface is a vector perpendicular to the tangent plane to that surface at P. The word "normal" is also used as an adjective: a line normal to a...

s across rasterized
Raster graphics
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...

 polygons and computes pixel colors based on the interpolated normals and a reflection model. Phong shading may also refer to the specific combination of Phong interpolation and the Phong reflection model
Phong reflection model
The Phong reflection model is an empirical model of the local illumination of points on a surface...

.

History

Phong shading and the Phong reflection model
Phong reflection model
The Phong reflection model is an empirical model of the local illumination of points on a surface...

 were developed by Bui Tuong Phong
Bui Tuong Phong
Bui Tuong Phong was a Vietnamese-born computer graphics researcher and pioneer. His publications are most often referred to using his family name, Bùi, which comes before his given name by Vietnamese name convention, but his inventions are remembered under his given name Phong, since it is...

 at the University of Utah
University of Utah
The University of Utah, also known as the U or the U of U, is a public, coeducational research university in Salt Lake City, Utah, United States. The university was established in 1850 as the University of Deseret by the General Assembly of the provisional State of Deseret, making it Utah's oldest...

, who published them in his 1973 Ph.D. dissertation. Phong's methods were considered radical at the time of their introduction, but have evolved into a baseline shading method for many rendering applications. Phong's methods have proven popular due to their generally efficient use of computation time per rendered pixel.

Phong interpolation

Phong shading improves upon Gouraud shading
Gouraud shading
Gouraud shading, named after Henri Gouraud, is an interpolation method used in computer graphics to produce continuous shading of surfaces represented by polygon meshes...

 and provides a better approximation of the shading of a smooth surface. Phong shading assumes a smoothly varying surface normal vector. The Phong interpolation method works better than Gouraud shading when applied to a reflection model that has small specular highlight
Specular highlight
A specular highlight is the bright spot of light that appears on shiny objects when illuminated . Specular highlights are important in 3D computer graphics, as they provide a strong visual cue for the shape of an object and its location with respect to light sources in the scene.-Microfacets:The...

s such as the Phong reflection model.

The most serious problem with Gouraud shading occurs when specular highlights are found in the middle of a large polygon. Since these specular highlights are absent from the polygon's vertices
Vertex (graph theory)
In graph theory, a vertex or node is the fundamental unit out of which graphs are formed: an undirected graph consists of a set of vertices and a set of edges , while a directed graph consists of a set of vertices and a set of arcs...

 and Gouraud shading interpolates based on the vertex colors, the specular highlight will be missing from the polygon's interior. This problem is fixed by Phong shading.

Unlike Gouraud shading
Gouraud shading
Gouraud shading, named after Henri Gouraud, is an interpolation method used in computer graphics to produce continuous shading of surfaces represented by polygon meshes...

, which interpolates colors across polygons, in Phong shading a normal vector is linearly interpolated
Linear interpolation
Linear interpolation is a method of curve fitting using linear polynomials. Lerp is an abbreviation for linear interpolation, which can also be used as a verb .-Linear interpolation between two known points:...

 across the surface of the polygon from the polygon's vertex normals. The surface normal is interpolated and normalized at each pixel and then used in a reflection model, e.g. the Phong reflection model
Phong reflection model
The Phong reflection model is an empirical model of the local illumination of points on a surface...

, to obtain the final pixel color. Phong shading is more computationally expensive than Gouraud shading since the reflection model must be computed at each pixel instead of at each vertex.

In modern graphics hardware, variants of this algorithm are implemented using pixel or fragment shaders.

Phong reflection model

Phong shading may also refer to the specific combination of Phong interpolation and the Phong reflection model
Phong reflection model
The Phong reflection model is an empirical model of the local illumination of points on a surface...

, which is an empirical model of local illumination. It describes the way a surface reflects light as a combination of the diffuse reflection
Diffuse reflection
Diffuse reflection is the reflection of light from a surface such that an incident ray is reflected at many angles rather than at just one angle as in the case of specular reflection...

 of rough surfaces with the specular reflection
Specular reflection
Specular reflection is the mirror-like reflection of light from a surface, in which light from a single incoming direction is reflected into a single outgoing direction...

 of shiny surfaces. It is based on Bui Tuong Phong
Bui Tuong Phong
Bui Tuong Phong was a Vietnamese-born computer graphics researcher and pioneer. His publications are most often referred to using his family name, Bùi, which comes before his given name by Vietnamese name convention, but his inventions are remembered under his given name Phong, since it is...

's informal observation that shiny surfaces have small intense specular highlight
Specular highlight
A specular highlight is the bright spot of light that appears on shiny objects when illuminated . Specular highlights are important in 3D computer graphics, as they provide a strong visual cue for the shape of an object and its location with respect to light sources in the scene.-Microfacets:The...

s, while dull surfaces have large highlights that fall off more gradually. The reflection model also includes an ambient term to account for the small amount of light that is scattered about the entire scene.

See also

  • List of common shading algorithms
  • Blinn–Phong shading model
    Blinn–Phong shading model
    The Blinn–Phong shading model is a modification to the Phong reflection model developed by Jim Blinn....

     – Phong reflection model modified to trade precision with computing efficiency
  • Flat shading – shading of polygons with a single color
  • Gouraud shading
    Gouraud shading
    Gouraud shading, named after Henri Gouraud, is an interpolation method used in computer graphics to produce continuous shading of surfaces represented by polygon meshes...

     – shading of polygons by interpolating colors that are computed at vertices
  • Phong reflection model
    Phong reflection model
    The Phong reflection model is an empirical model of the local illumination of points on a surface...

     – reflection model often used with Phong shading
  • Specular highlight
    Specular highlight
    A specular highlight is the bright spot of light that appears on shiny objects when illuminated . Specular highlights are important in 3D computer graphics, as they provide a strong visual cue for the shape of an object and its location with respect to light sources in the scene.-Microfacets:The...

    – other specular lighting equations
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK