Phong reflection model

The Phong reflection model is a shading model, used heavily in 3D computer graphics for assigning shades to each individual pixel that is rasterized of some abstract representation of an object such as a sphere or cone.

The Phong reflection model is a simplification of the more general rendering equation, which takes advantage of the following simplifications when deciding the shade of a pixel during rasterization of a surface:

  1. It is a local reflection model, i.e. it doesn't account for second-order reflections, as do raytracing or radiosity. In order to compensate for some of the losses of light, an extra ambient lighting term is added to the scene that is rendered.
  2. It divides the reflection from a surface into two subcomponents, specular reflection and diffuse reflection.

If we first define, for each light source in the scene to be rendered, the components <math>i_s, i_d<math> and <math>i_{al}<math> where these are the intensities (often as RGB values) of the specular, diffuse and ambient components of the light sources respectively. The local <math>i_{al}<math> term will be added to all the ambient terms of all other light sources to create a global <math>i_a<math> term. (This term may also have a global bias.)

If we then define, for each material (which is typically assigned 1 to 1 for the objects in the scene, so that it is a sphere of material 1, which is a material which looks like e.g. copper, ficken, a cone of material 2, which is a material which looks like brass, etc.):

<math>k_s<math>: specular reflection constant, the ratio of reflection of the specular term of incoming light
<math>k_d<math>: diffuse reflection constant, the ratio of reflection of the diffuse term of incoming light
<math>k_a<math>: ambient reflection constant, the ratio of reflection of the ambient term present in all points in the scene rendered
<math>\alpha<math>: is a shininess constant for this material, which decides how "evenly" light is reflected from a shiny spot

We further define <math>lights<math> as the set of all light sources, <math>L<math> is the direction vector from the point on the surface toward each light source, <math>N<math> is the norm vector at this point of the surface, <math>R<math> is the direction a perfectly reflected ray of light (represented as a vector) would take from this point of the surface, and <math>V<math> is the direction towards the viewer (such as a virtual camera).

Then the shade value for each pixel <math>I_p<math> can be calculated using this equation, which is the Phong shading equation:

<math>I_p = k_a i_a + \sum_{lights} (k_d (L \cdot N) i_d + k_s (R \cdot V)^{\alpha}i_s)<math>

We note that the diffuse term does not use the direction towards the viewer, as the diffuse term is equal in all directions from the point, including the direction of the viewer.

(When we have color representations as RGB values, this equation will typically calculated individually for R, G and B intensities, which are then concatenated and written to the video frame buffer memory simultaneously.)

References

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools