September 30, 2008
exrdisplay plug-in for After Effects
by Brendan Bolles
Included with ILM's OpenEXR distribution is a command-line viewing program called exrdisplay to serve as a reference viewer for the format.
One interesting thing about exrdisplay is that it doesn't use a standard gamma or sRGB curve to convert the linear EXR pixels to the colors on screen. Instead, it uses a custom ILM formula that brings more overbright values into range and includes a "knee" to avoid clipping them harshly the way a simple gamma function would. I had a need to replicate the same curve in AE, so I wrote this plug-in.
To properly use this plug-in, you should 1) be working with linear floating point pixels and 2) have no other display management active. To accomplish this, you might check "Preserve RGB" in the Interpret Footage dialog, for the latter you might turn off Display Management in the View menu if necessary. This will make sure that the only thing between the linear EXR pixels and the screen is the exrdisplay plug-in.
Parameters:
Gamma: The gamma of your monitor. For Windows it's 2.2, for Mac it's user-defineable, but defaults to 1.8 usually.
Exposure: Brighten or darken the image using stops. Each stop up doubles brightness, each stop down halves it. Default is 0, meaning no exposure change.
Defog: The "fog" is calculated as the average color of the pixels in the scene. Then Defog will subtract the fog color uniformly in linear space. Might not want to use this on a moving image as the fog color will change over time and the result could be unpredictable.
Knee Low: Only pixels above this value will be effected by the exrdisplay "knee." Defaults to 0.0, meaning all pixels will be effected.
Knee High: Controls the bend of the "knee." More bend means brighter overbrights will be brought into display range.
Inverse: Will perform an inverse operation, given the same parameters. You might apply an inverse exrdisplay to a regular JPEG image to put it into linear space so that when you use exrdisplay to convert back to the screen, it will round trip properly. One advantage of this approach is that brighter pixels in the JPEG will be made into overbrights with possible benefits in processing.
Dither: Adds a Bayer patter to the image to break up contouring possibly seen on an 8-bit screen. The exrdisplay program always uses it, but we have it off by default.
Even though this ILM curve is sort of non-standard, you tend to see it a lot in conjunction with EXR images. For example, Mac OS X use it for the previews shown in the Finder. And the reason I wrote this plug-in is because the Inferno uses it too and I had to put together a color pipeline for it. So anyway, maybe someone else out there will have a need for it as well.
If you want to mess around with the original ILM exrdisplay program, I have compiled binaries available on fnordware.com.