(Page 2 of 2 pages for this article  <  1 2)

Tuesday, November 30, 2004

Filed under: Motion GraphicsPost ProductionVisual Effects

A Different Light: Gamma-Corrected Compositing

Chris and Trish Meyer | 11/30

A simple introduction to gamma-corrected compositing.

Here’s another one of our favorite tests to show the differences between gamma-corrected and linear light compositing:

  • Take a still image (a face works well), illuminate it with a simple light (such as a point light in After Effects), and animate the light’s value from 100% to 1000% over a few seconds, causing the image to “blow out” to white over time. Render a reference movie of this.
  • Apply a Levels effect to the source footage, and set the gamma to 0.4545. This will cause the light to interact with the layer in linear, rather than gamma corrected, space.
  • Apply a second Levels effect to the final composite, this time with gamma set to 2.2.
  • Render this new treatment, and compare it to the reference render.

In this case, you should note differences in the way the image blows out over time: The width of the bands in the transition area from somewhat normal color to blown-out color are broader when performed in linear space, looking subjectively more subtle or pleasing. Darker details such as the eyes and shadows in the creases of the face should persist longer in linear space, making the face recognizable longer during the blow-out (see the figures below). You will also find that you need to crank up the light much brighter - perhaps to 5000%, instead of 1000% - to completely blow out the image.

Overexposing an image with normal computer gamma causes it to blow out more or less evenly (left); applying the same illumination with linear light gamma creates a more subtle, pleasing effect (right). Original image courtesy Digital Vision.

These tests provide you a with blueprint of how to perform linear light compositing: Correct the sources to linear by applying a gamma of 0.4545, perform your treatments, and correct the result back to a 2.2 gamma. However, you cannot blindly apply this to any project. For one, some blending modes (such as Overlay, Soft Light, Hard Light, and to a degree Screen) will no longer work “properly” as they are based around the idea that a 50% pixel luminance value means 50% perceived brightness. You will also find that you will need to adjust or increase parameters such as light level, cone feather, and glow amount to achieve the same general results as you saw in the computer’s default space.

Nonlinear Thinking

This is all well and good if your goal is to mimic nature and reality…but that’s often not the goal of a motion graphics designer. For example, what if you want to favor the dark areas of an image instead of the light areas? Or what if you want a less (or more) severe effect? The simple answer is to experiment with gamma corrections other than 2.2. Here is one way to set up such a project with maximum flexibility in After Effects:

  • Add an Adjustment Layer to the top of your composition, and name it Master Gamma. Apply Levels (Individual Controls). Expose its RGB Gamma parameter in the Timeline window.
  • Apply Levels (Individual Controls) to your source footage layers. Reveal the RGB Gamma parameter, and enable expressions for this parameter. Type “1 / ” (without the quotes), and then use the pick whip to select the RGB Gamma parameter for the Master Gamma layer. Hit Enter to seal off the expression, which should now read:

    1 / thisComp.layer(“Master Gamma”).effect(“Levels (Individual Controls)”)(“Gamma”)

  • After you’ve gone through the trouble of creating this once, make an Animation Preset of it (use the Animation Preset popup in its Effect Controls window) which you can then easily apply to other footage layers.

Then perform any treatments, effects, or compositing you like! For starters, try the simple crossfade you created in the first example. In this example, place the time marker in the middle of the transition, and then vary the RGB Gamma parameter for the Master Gamma layer. Note how the composite image changes, favoring light or dark areas depending if the gamma is above or below 1.0 (see below).

A normal computer crossfade (left), a “linear light” crossfade (center), and a creative fade using the opposite gamma as linear light (right).

Hopefully this will open up your mind to the potential in gamma-corrected compositing. It’s not something you need to employ on every job, but it’s an important tool to be familiar with, for both realistic and creative applications.

Postscript

As mentioned earlier, After Effects 7 and later now implement linear gamma as option in File > Project Settings, which eliminates the need for all of these extra layers, effects and expressions. The one downside is that you can’t set the gamma correction yourself (the last trick shown above); it is currently hardwired to the perceptually-correct 2.2 value.

In After Effects CS3, there are two choices:

  • Linearize Working Space: When enabled, all image processing - including color profile conversions, masks, effects, 3D lighting, and the way layers are blended together - are performed in a gamma 1.0 space. The result is particularly strong with 3D lighting, as illustrated below:

It can be deceptive to set up 3D lighting in a scene (left) and then enable Linearize Working Space: The result will appear blown out (right) as the lighting will appear to be boosted.
  • Blend Colors Using 1.0 Gamma: This option can be thought of as “Linearize Working Space Lite.” When enabled, only the blending together of layers is performed in a gamma 1.0 space. You can enable this even when color management is disabled. It is enabled by default when Linearize Working Space is enabled.

In After Effects 7, there is only one choice: Linear Blending. It has the same effect as the Blend Colors Using 1.0 Gamma description above. We were greatly disappointed that we couldn’t achieve the lighting effect demonstrated earlier using this option in 7, but we now can using Linear Working Space in CS3.

Change these setting before you get too far into a project, as they will change how your composites look (observe the images above); you don’t want to select one of these modes just before blindly starting an overnight render!

By the way, Color Management in After Effects CS3 is covered in more detail in Creating Motion Graphics 4th Edition, Chapter 25.

The content contained in our books, videos, blogs, and articles for other sites are all copyright Crish Design, except where otherwise attributed.

(Page 2 of 2 pages for this article  <  1 2)

               



You must be registered to comment. This is an effort to reduce spam. Please REGISTER HERE.

Good point, and certainly a common point of confusion. Those not familiar with the details of how light really works are used to calling the way the computer works “linear”; indeed, in After Effects the Cineon conversion tools talk about converting Cineon to a “linear” (normal computer) space. But just as it took us awhile to learn that not all pixels are square, we’ll eventually learn that most computers show a gamma-corrected space, not a linear space.

Posted by Chris Meyer  on  02/15  at  10:15 AM


Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below:




After Effects Apprentice Free Video: Exploring Shape Effects
After Effects Apprentice Free Video: Drawing Parametric Shapes
After Effects Apprentice Free Video: The Puppet Starch Tool
After Effects Apprentice Free Video: Eraser Tool Modes
After Effects Apprentice Free Video: Tracking with mochaAE
After Effects Apprentice Free Video: Performing a Motion Track
After Effects Apprentice Free Video: Creating 3D Objects using Adobe Repoussé
After Effects Apprentice Free Video: Understanding Axis Modes
Using After Effects as an Advanced Titler for Premiere Pro
After Effects Apprentice Free Video: Creating an Orbit Camera Rig
CMG Hidden Gems: Chapter 45 – What’s Your Preference?
CMG Hidden Gems: Chapter 44 – Prerendering and Proxies
CMG Hidden Gems: Chapter 43 – Advanced Rendering
CMG Hidden Gems: Chapter 42 – Render Queue
CMG Hidden Gems: Chapter 41 – Video Issues
CMG Hidden Gems: Chapter 40B – 3D Channel Effects
CMG Hidden Gems: Chapter 40 – Integrating with 3D Applications
CMG Hidden Gems: Chapter 39 – Integration 101
After Effects Apprentice Free Video: Multiple Playback Speeds
CMG Hidden Gems: Chapter 38 – Import and Interpret
CMG Hidden Gems: Chapter 37B and 37C – Expressions and Scripting Bonus Chapters
CMG Hidden Gems: Chapter 37 – Expressions
CMG Hidden Gems: Chapter 36B – Audio Effects
CMG Hidden Gems: Chapter 36 – Working With Audio
Upgrading to After Effects CS5.5?
CMG Hidden Gems: Chapter 35 – The Puppet Tools
After Effects Apprentice Free Video: The Wiggle Expression
CMG Hidden Gems: Chapter 34 – Roto Brush
CMG Hidden Gems: Chapter 33 – Paint and Clone
After Effects Apprentice Free Video: What Could Go Wrong?







Basic Lighting Setups for Green Screen

Jeff Foster | 01/23

from the “Green Screen Workshop: The Setup” series

There’s more to lighting your green screen than just sticking some green fabric up on a wall behind your talent and hoping for the best! Planning ahead and choosing the right setup for the shot you’re hoping to get is a key factor in determining what kind of lighting…

Smoke for Final Cut Pro Users

Grant Kay | 12/09

Getting started with Smoke

image

As a Senior Smoke Trainer here at Autodesk, I routinely get question from editors and artists asking me how Smoke compares to the software packages and plugins they use for everything from editing…

mocha Pro Demo at Editors’ Lounge

Terence Curren | 06/15

An awesome planar tracker… and a LOT more!

Mary Poplin demonstrates the power of mocha Pro (yeah, they spell it with a lower case “m”) at a recent Editors’ Lounge in Burbank. If you are interested in the power this app brings to tracking, rotoscoping and compositing, check this video out. Oh yeah, and the tracking data is supported in Boris Continuum Complete, so you can even use this data in your favorite NLE.

CMG Hidden Gems: Chapter 26 – Color Management

Chris and Trish Meyer | 06/06

Another selection of “hidden gems” (and essential advice), this time from Chapter 26 of Creating Motion Graphics with After Effects.

We’re going through our book Creating Motion Graphics with After Effects 5th Edition (CMG5) and pulling out a few “hidden gems” from…

To be considered for listing, contact pr (at) provideocoalition (dot) com


Copyright © 2011, HD Expo, LLC a division of Diversified Business Communications. DBA Createasphere

All rights reserved. HD EXPO, High Def EXPO, Createasphere, E-Tech, Entertainment Technology Exposition, 3D Production Workshop, VariCamp, P2 Camp, ColorCamp 101, and Lighting, Filters & Gels for HD are all trademarks of HD Expo, LLC.

Terms of Use  |  Privacy Policy

Check PageRank