next up previous contents
Next: 10.5 Global Illumination Up: 10. Lighting Techniques Previous: 10.3 Gloss Maps

   
10.4 Other Lighting Models

Up to this point we have largely discussed the Phong lighting model. The diffuse and specular terms for a single light are given by the following equation:

\begin{displaymath}d_{m} d_{l} \max(\vec{N} \cdot \vec{L},0) + s_{m} s_{l} \max(\vec{H} \cdot \vec{N},0)^{n}
\end{displaymath}

Section 10.1.1 discusses the use of sphere mapping to replace the OpenGL per-vertex specular illumination computation with one performed at each pixel. The specular contribution in the texture map is computed using the Phong formulation above. However, the Phong model can be substituted with other bi-directional reflectance functions to achieve other lighting effects. Since the texture coordinates are computed with a sphere mapping function, the resulting texture mapping operation accurately approximates view-dependent specular reflectance distributions.

One improvement that can be made is to add a Fresnel reflection term, $F_{\lambda}$,[45] to the specular equation:

\begin{displaymath}d_{m} d_{l} \max(\vec{N} \cdot \vec{L},0) + F_{\lambda} s_{m} s_{l} \max(\vec{H} \cdot \vec{N},0)^{n}
\end{displaymath}

The Fresnel term specifies the ratio the amount of reflected light to the amount of transmitted (refracted) light. It is a function of the angle of incidence, $\theta_{i}$, the angle of refraction $\theta_{t}$ and the material properties of the object (dielectric, metal, etc. as described in Section 10.8). The effect of the Fresnel term is to attenuate light as a function of its incident and reflected directions as well as its wavelength. Light is hardly reflected from dielectrics such as glass at normal incidence, for example, while being almost totally reflected at glancing angles. This attenuation is independent of wavelength. The absorption of metals, on the other hand, can be a function of the wavelength in, for instance, copper and gold. At glancing angles, the light color is unaltered in reflection, but at normal incidence the light is modulated by the color of the metal.

Since the sphere map serves as a table which is indexed by the the reflection vector, the Fresnel effects can be included in the environment map by simply computing the specular equation with the Fresnel term to modulate and shift the color. This can be performed as a post-processing step on an existing environment map by computing the Fresnel reflection coefficient at each angle of incidence and modulating the sphere map. Reflection, refraction and sphere mapping are discussed in more detail in Section 11.1. Other bi-directional reflectance functions can be encoded in a sphere map in a similar fashion.


next up previous contents
Next: 10.5 Global Illumination Up: 10. Lighting Techniques Previous: 10.3 Gloss Maps
David Blythe
1999-08-06