Film, HDR, and 32 Bit Compositing
response curve and the ability to capture even very bright light sources. No amount of exposure can
be expected to affect every single crystal.
As much as Cineon log is a great way to encode light captured by film, it should not be used for compositing
or other image transformations. This point is so important that it just has to be emphasized again:
Encoding color spaces are not compositing color spaces.
To illustrate this point, imagine you had a black pixel with Cineon value 95 next to an extremely bright pixel
with Cineons highest code value, 1023. If these two pixels were blended together (say, if the image was being
blurred), the result would be 559, which is somewhere around middle gray (0.37 to be precise). But when you
consider that the extremely bright pixel has a relative brightness of 13.5, that black pixel should only have
been able to bring it down to 6.75, which is still overbright white! Log spaces extra emphasis on darker values
causes standard image processing operations to give them extra weight, leading to an overall unpleasant and
inaccurate darkening of the image. So, final warning: If youre working with a log source, dont do image
processing in log space!
Video Gamma Space
Because log space certainly doesnt 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 whites 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 = input
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 multiply-
ing them together. Applying gamma and then 1/gamma has the net result of doing nothing. Gamma 1.0 is linear.
Film, HDR, and 32 Bit Compositing
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 Poyntons Digital Video and HDTV Algo-
rithms 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
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 hasnt already blown your mind, allow me to mention two other related
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 Ive mentioned that a monitor darkens everything on it using a 2.2 gamma, you may
wonder why a grayscale ramp doesnt look skewed toward darkness. 50% gray on a monitor looks
like 50% gray.

Get Adobe After Effects 7.0 Studio Techniques now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.