CIS 41
Computer Graphics
Chapter 6 - Lighting and Shading


Overview

Light and Matter

A Closer Look at the Process

Appearance Due to Surface Properties

Categories of Interaction Between Light and Surfaces

The Bidirectional Reflection Distribution Function (BRDF) is a single function describing the reflection, absorbtion, and transmission of light at the surface of a material:

Light Sources

Color Sources

Ambient Light

Point Sources

Spotlights

Distant Light Sources

The Phong Lighting Model

The Four Vectors of Phong Lighting

Given arbitrary point p:

  1. n - the normal -- the vector perpendicular to the surface at p
  2. v - the direction from p to the COP (viewer)
  3. l - the direction from p to the (point) light source
  4. r - the direction the perfectly-refected ray from l would take upon bouncing off p
Some points about the above: Ambient, Diffuse and Specular Light-Surface Interactions in Phong Calculating the Ambient Reflection

Calculating the Diffuse Reflection

Calculating the Specular Reflection Some Final Points

Modified Phong

Shading in OpenGL

The Functions

Code for Chapter 6