Comparison of Rendering with and without Gamma Correction

In general, naive viewers prefer images with high contrast because they appear more alive and vibrant. Especially in scenes that lack interesting features and dynamic range, increasing contrast improves detail recognition by exaggerating whatever visual information is present. However, when a scene is rich in visual detail with dark and bright regions, increasing contrast actually hinders visibility because it pushes the extremes outside the range of displayable values. Since better rendering techniques and more realistic scenes usually result in images with greater dynamic range, the problems with rendering in a compressed color space may not show up in simple tests. By moving from simple to more sophisticated renderings of the same scene, we illustrate the real differences between the two approaches.

The following three pairs of images were rendered with and without gamma correction, which is to say, the first of each pair (1a, 2a, and 3a) were rendered in the usual linear color space, and the second set of images (1b, 2b, and 3b) were rendered in a "gamma 2.2" color space. The linear computations were gamma-corrected for a standard (2.2) monitor afterwards, and the gamma 2.2 renderings were left alone. The input values were adjusted to achieve roughly the same color appearance, though it is impossible to achieve the same shading.

(Images should be viewed on an uncompensated CRT monitor. Clicking on an image will bring up a 512x512 TIFF version, rather than the 256x256 JPEG shown on this page.)

1a. Linear 1b. Gamma 2.2

The images above were rendered with a purely local shading model. No shadows were computed, and the shelf that covers half the room has no effect on the cylinder and floor below it. Figure 1a lacks contrast and visual detail because, in a local shading model, the only things that affect brightness are the angle to and distance from the light sources. The increased contrast in Figure 1b improves the rendering's appearance by exaggerating the slight shading differences that are present without losing valuable information at the high and low end of the brightness scale.

2a. Linear 2b. Gamma 2.2

These images add shadows to the previous comparison, which provide some detail but not enough to make linear computations more appealing. In particular, the use of a constant ambient term leads to a complete lack of detail in the umbra region of the image, under the shelf. In direct-only cases, most viewers prefer that undifferentiated umbra regions be on the very low end of the brightness scale, where they are less noticeable and therefore less offensive to the eye.

3a. Linear 3b. Gamma 2.2

Finally, by adding global illumination effects to our model, we begin to appreciate the benefits of rendering in a linear color space. In this scene, the difference is apparent in the region under the shelf, where the subtle changes in shading on floor and the soft specular highlight on the blue ball are apparent in Figure 3a, but are drowned in the exaggerated contrast of Figure 3b. Strangeness is also noticeable in the clamping near the highlight on the cylinder, and the excessive color bleeding on the ceiling of Figure 3b.

From these examples, you may be tempted to conclude that rendering in a linear color space is unnecessary for VRML, since global illumination is not taken into account for any of the existing browser tools. This is not the point. The point is that rendering in a compressed color space only appears better when using inferior techniques. As rendering methods improve with time, the models that were created in a linear color space will increase in value, and those created in a compressed color space will become unusable. A VRML standard based on existing rendering limitations would mean abandoning all hope of using VRML models in realistic VR simulations.

Questions, comments, etc.:

Greg Ward Larson
Silicon Graphics, Inc.

Return to the VRML gamma-correction page