07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Per-pixel lighting 101<br />

Per-pixel lighting<br />

In computer <strong>graphics</strong>, per-pixel lighting is commonly used to refer to a set of methods for computing illumination at<br />

each rendered pixel of an image. These generally produce more realistic images than vertex lighting, which only<br />

calculates illumination at each vertex of a <strong>3D</strong> model and then interpolates the resulting values to calculate the<br />

per-pixel color values.<br />

Per-pixel lighting is commonly used with other computer <strong>graphics</strong> techniques to help improve render quality,<br />

including bump mapping, specularity, phong shading, and shadow volumes.<br />

Real-time applications, such as computer games, which use modern <strong>graphics</strong> cards, will normally implement<br />

per-pixel lighting algorithms using pixel shaders. Per-pixel lighting is also performed on the CPU in many high-end<br />

commercial rendering applications which typically do not render at interactive framerates.<br />

Phong reflection model<br />

The Phong reflection model (also called Phong illumination or Phong lighting) is an empirical model of the local<br />

illumination of points on a surface. In <strong>3D</strong> computer <strong>graphics</strong>, it is sometimes ambiguously referred to as Phong<br />

shading, in particular if the model is used in combination with the interpolation method of the same name and in the<br />

context of pixel shaders or other places where a lighting calculation can be referred to as “shading”.<br />

History<br />

The Phong reflection model was developed by Bui Tuong Phong at the University of Utah, who published it in his<br />

1973 Ph.D. dissertation. [1] [2] It was published in conjunction with a method for interpolating the calculation for each<br />

individual pixel that is rasterized from a polygonal surface model; the interpolation technique is known as Phong<br />

shading, even when it is used with a reflection model other than Phong's. Phong's methods were considered radical at<br />

the time of their introduction, but have evolved into a baseline shading method for many rendering applications.<br />

Phong's methods have proven popular due to their generally efficient use of computation time per rendered pixel.<br />

Description<br />

Phong reflection is an empirical model of local illumination. It describes the way a surface reflects light as a<br />

combination of the diffuse reflection of rough surfaces with the specular reflection of shiny surfaces. It is based on<br />

Bui Tuong Phong's informal observation that shiny surfaces have small intense specular highlights, while dull<br />

surfaces have large highlights that fall off more gradually. The model also includes an ambient term to account for<br />

the small amount of light that is scattered about the entire scene.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!