Realistic, Hardware-accelerated Shading and Lighting

Wolfgang Heidrich, Hans-Peter Seidel

Max-Planck-Institute for Computer Science

Saarbrücken, Germany

High-quality Local Illumination

Isotropic Models

Anisotropic Models

Isotropic Models

Here we describe techniques for applying physically accurate reflection models to the computation of local illumination in hardware-based rendering. Rather than replacing the standard Phong model by another single, fixed model, we seek a method that allows us to utilize a wide variety of different models so that the most appropriate model can be chosen for each application.

To achieve this flexibility without introducing procedural shading, a sample-based representation of the BRDF seems most promising. However, a faithful sampling of 3D isotropic or 4D anisotropic BRDFs requires too much storage to be useful on contemporary graphics hardware. Wavelets or spherical harmonics could be used to store this data more compactly, but these representations do not easily lend themselves to hardware implementations.

We propose a different approach. It turns out that most lighting models in computer graphics can be factored into independent components that only depend on one or two angles. These factors can be independently sampled and stored in 2-dimensional lookup tables, i.e. textures. By reparameterizing these factors so that they use the cosines of the angles instead of the angles themselves as texture coordinates, texture coordinate computation becomes an inexpensive operation that can be performed by hardware matrix transformations under certain conditions. Please refer to the paper for the details.

The following images show a torus with the Torrance-Sparrow reflection model and several different roughness settings.

Anisotropic Models

Although the treatment of anisotropic materials is somewhat harder, similar factorization techniques can be applied here. The following images show a comparison of a disk and a sphere rendered with the isotropic Phong model (left), and the anisotropic model by Banks with two different orientations for the directions of anisotropy (center and right).