Video Gamma Space

Table of contents:

Because log space certainly doesn't look natural, it probably comes as no surprise that it is a bad color space to work in. But there is another encoding color space that you have been intimately familiar with for your entire computerusing life and no doubt have worked in directly at some point: the video space of your monitor.

You may have always assumed that 8-bit monitor code value 128, halfway between black and white, makes a gray that is half as bright as white. If so, you may be shocked to hear that this is not the case. In fact, 128 is much darkernot even a quarter of white's brightness on most monitors.

A system where half the input gives you half the output is described as linear, but monitors (like many things in the real world) are nonlinear. When a system is nonlinear, you can usually describe its behavior using the gamma function, shown in Figure 11.9 and the equation

Output = inputgamma 0 <= input <= 1

Figure 11.9. Graph of monitor gamma (2.2) with file gamma (0.4545) and linear (1.0). These are the color curves in question, with 0.4545 and 2.2 each acting as the direct inverse of the other.

In this function, the darkest and brightest values (0.0 and 1.0) are always fixed, and the gamma value determines how the transition between them behaves. Successive applications of gamma can be concatenated by multiplying them together. Applying gamma and then 1/gamma has the net result of doing nothing. Gamma 1.0 is linear.

Notes

The description of gamma in video is oversimplified here somewhat because the subject is complex enough for a book of its own. An excellent one is Charles Poynton's Digital Video and HDTV Algorithms and Interfaces (Morgan Kaufmann Publishers).

Mac monitors usually have a gamma of 1.8, and the gamma value for PCs is 2.2. What this really says is that the electronics in your screen are slow to react from lower levels of input voltage and everything is darkened as a result.

The reason digital images do not appear dark, however, is that they have all been created with the inverse gamma function baked in to pre-brighten pixels before they are displayed (Figure 11.10). Yes, all of them.

Figure 11.10. Offsetting gammas in the file and monitor result in faithful image reproduction.

Because encoding spaces are not compositing spaces, working directly with images that appear on your monitor can pose problems. Similar to log encoding, video gamma encoding allocates more values to dark pixels, so they have extra weight. Video images need converting just as log Cineon files do.

Close-Up: Gamma-rama

In case all this gamma talk hasn't already blown your mind, allow me to mention two other related points.

First, you may be familiar with the standard photographic gray card, known as the 18% gray card. But why not the 50% gray card?

Second, although I've mentioned that a monitor darkens everything on it using a 2.2 gamma, you may wonder why a grayscale ramp doesn't look skewed toward darkness. 50% gray on a monitor looks like 50% gray.

The answer is that your eyes are nonlinear too! They have a gamma that is just about the inverse of a monitor's, in fact. Eyes are very sensitive to small amounts of light and get less sensitive as brightness increases. The lightening in our eyeballs offsets the darkening of 50% gray by the monitor. If you were to paint a true gradient on a wall, it would look bright. Objects in the world are darker than they appear.

Getting back to the 18% card, try applying that formula to our gamma 0.4 eyes:

0.180.4 = 0.504

Yep, middle gray.


Battle of the Color Spaces

Section I. Working Foundations

The 7.0 Workflow

The Timeline

Selections: The Key to Compositing

Optimizing Your Projects

Section II. Effects Compositing Essentials

Color Correction

Color Keying

Rotoscoping and Paint

Effective Motion Tracking

Virtual Cinematography

Expressions

Film, HDR, and 32 Bit Compositing

Section III. Creative Explorations

Working with Light

Climate: Air, Water, Smoke, Clouds

Pyrotechnics: Fire, Explosions, Energy Phenomena

Learning to See

Index



Adobe After Effects 7. 0 Studio Techniques
Adobe After Effects 7.0 Studio Techniques
ISBN: 0321385527
EAN: 2147483647
Year: 2004
Pages: 157

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net