Light

Tom Kelliher, CS 320

Mar. 25, 1998

Announcements:

From last time:

  1. 3-D maze.

Outline:

  1. Real world lighting.

  2. A lighting model.

  3. Shading.

  4. The Phong reflection model.

Assignment: Read Chapter 14.

Lighting in the Real World

  1. Viewer, lights, objects.

  2. Light properties?

  3. Material properties: Translucence, reflectance (specularity), scattering (diffusion). Examples? Color of an object.

  4. How do lights and materials interact?

  5. The rendering equation. Calculation for each point in a scene.

  6. Need a balance between accuracy and efficiency.

  7. Local vs. global lighting. The graphics pipeline.

A Lighting Model

  1. General illumination function for a light source: .

  2. Types of modeled light sources:
    1. Ambient light

    2. Point sources

    3. Spotlights

    4. Distant light sources

Color Sources

  1. Illumination function is a continuous function of wavelength.

  2. Complex computation, vision model.

  3. Luminance function:

Ambient Light

  1. Uniform light --- ``background'' light.

  2. Model:

Point Sources

  1. Emits light equally in all directions.

  2. Assume point source at . Color vector:

  3. Illumination at due to ? Depends upon square of distance:

  4. High contrast harshness due to shadow effects: umbra, penumbra.

  5. In practice, replace inverse square term with

    where d is the distance and a, b, and c are constants chosen to soften.

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.



Thomas P. Kelliher
Tue Mar 24 14:27:34 EST 1998
Tom Kelliher