Realistic, Hardware-accelerated Shading and Lighting

Wolfgang Heidrich, Hans-Peter Seidel

Max-Planck-Institute for Computer Science

Saarbrücken, Germany

Visualization of Precomputed Global Illumination

The presented techniques for applying alternative reflection models to local illumination computations can significantly increase the realism of synthetic images. However, true photorealism is only possible if global effects are also considered. Since texture mapping techniques for diffuse illumination are widely known and applied, we concentrate on non-diffuse global illumination, in particular mirror- and glossy reflection.

Our approach is based on environment maps, because they offer a good compromise between rendering quality and storage requirements. With environment maps, 2-dimensional textures instead of the full 4-dimensional radiance field can be used to store the illumination.

A View-Independent Parameterization for Environment Maps

Nonmetallic Objects - Fresnel Term

Glossy Prefiltering

A View-Independent Parameterization for Environment Maps

The first step for using environment maps is the choice of an appropriate parameterization. We developed a parabolic parameterization that is both view independent and easy to implement on current and future hardware. It avoids many of the problems present with traditional parameterizations of environment maps, such as the spherical or cubical maps. In particular, a single parabolic map can be used for all viewing directions. This is in contrast to the spherical maps used in most of today's graphics hardware.

The images below show one half of a parabolic environment map (left), as well as two images of tori seen from two different viewing positions, to which this single environment map has been applied.

Nonmetallic Objects - Fresnel Term

A regular environment map without prefiltering describes the incoming illumination in a point in space. If this information is directly used as the outgoing illumination, as with regular environment mapping, only metallic surfaces can be modeled. This is because for metallic surfaces (surfaces with a high index of refraction) the Fresnel term is almost one, independent of the angle between light direction and surface normal. Thus, for a perfectly smooth (i.e. mirroring) surface, incoming light is reflected in the mirror direction with a constant reflectance.

For non-metallic materials (materials with a small index of refraction), however, the reflectance strongly depends on the angle of the incoming light. Mirror reflections on these materials should be weighted by the Fresnel term for the angle between the normal and the viewing direction.

In OpenGL, this can be achieved using multipass rendering. The following images demonstrate this method for several different settings of the refractive index (1.5 in the left column, 20 in the center, and 200 in the right column). The top row simply contains the mirror reflection part weighted by the Fresnel term. Note how for high indices of refraction the image approaches the typical environment mapping look. In the middle row, a diffuse component has been added. In the bottom row the Fresnel term has been used to interpolate between the diffuse and the mirror term. This simulates a diffuse material covered by a transparent coating.

Glossy Prefiltering

We would now like to extend the concept of environment maps to glossy reflections. The idea is similar to the diffuse prefiltering proposed by Greene (1986) and the approach by Voorhies and Foran (1994) to use environment maps to generate Phong highlights from directional light sources. These two ideas can be combined to precompute an environment map containing the glossy reflection of an object with a Phong material. With this concept, effects similar to the ones presented by Debevec at Siggraph '98 are possible in real time.

The following images show a prefiltered environment map (Phong exponent of 100) on the left, and two glossy objects to which this prefiltered map has been applied (center and right).