Light, continued

Tom Kelliher, CS 320

Mar. 30, 1998

Announcements:

From last time:

Outline:

Assignment: Read Chapter 14.

A Lighting Model

Spotlights

  1. Simple spotlight: point source with light emitted only through narrow range of angles.

  2. Consider the source at to be restricted by the cone described by and .

  3. For accuracy, distribution within the cone is modeled by .

Distant Light Sources

  1. Re-calculating the -- vector.

  2. If the distance is ``large'' how much does the vector change?

  3. Replace source location with source direction:
    1. Near source: (a point)

    2. Far source: (a vector)

Shading

  1. Flat shading: each point on a polygon assigned same color.

  2. Gouraud (smooth) shading: assign colors individually to vertices, interpolate.

The Phong Reflection Model

  1. Consider an object point, and a light source .

  2. Important vectors:

    1. l: vector to light source.

    2. n: surface normal.

    3. v: vector to COP.

    4. r: reflection vector.

  3. The light from source to object can be described by:

    (theoretically wrong but, in practice, right)

  4. Using material properties, distance from source, orientation of surface and direction of source a reflection matrix can be constructed:

  5. (Simplified) Illumination at :

    A global ambient term may be ``thrown'' in.

Ambient Reflection

Same at each point on a surface:

Repeat for each color.

Diffuse Reflection

  1. Diffuse surface brightest at noon, dimmest at dawn, dusk.

  2. Lambert's law: we see only the vertical component of light:

  3. If and are normalized:

So:

Specular Reflection

  1. Specular reflection produces highlights.

  2. The smoother the surface (higher shininess) the narrower the range of reflection angles.

  3. Reflectivity proportional to angle between viewer () and perfect reflection ():

    where is the shininess term:

    1. < 100 for objects with broad highlights.

    2. 100 to 500 for most metallic objects.

  4. Assuming normalized vectors:

The Phong Model

Computed for each light source and each color:

Introduction to Computation of Normals

  1. Outward facing normal must be specified for each vertex.

  2. Analytic surfaces: cross product of partial differentials

  3. Polygonal surfaces:
    1. Points of continuity.

    2. Points of discontinuity.



Thomas P. Kelliher
Sun Mar 29 21:47:30 EST 1998
Tom Kelliher