(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: Rendering a 4:3 Center Cut Movie from a 16:9 Composition
After Effects Apprentice Free Video: Using Parenting to Animate Layers as a Unit
After Effects Apprentice Free Video: Working with Nested 3D Compositions
After Effects Apprentice Free Video: Copying Paths from Illustrator to After Effects
After Effects CS6 Tutorial: Exporting 3D Camera Tracker Data to Cinema 4D
After Effects CS6 Tutorial: Targeting Properties in the new Ray-Traced 3D Engine
After Effects CS6 (P)Review
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







Making a Matte Painting with Elements in Motion in After Effects

Jeff Foster | 04/29

I take-apart a real-world project to show you how it was created

In the days of early motion picture making the art of “matte painting” was a process of actually painting with oils on a plate glass that was then shot in position in front of a scene on location or in the studio where the film would be exposed by the combined images through the…

CANON C300: Trimming White Balance, Plus a Look at Daylight vs. Tungsten Color

Art Adams | 03/30

Cameras used to be SOOOO boring. Now every new camera is a mystery to be unfolded: What does it do well? What tweaks can make it better? Here is my first C300 article that addresses these questions…

I’ve shot a lot of web and broadcast spots on the Canon 5D and while it makes pretty pictures the controls are very limited. It’s also not a camera that can be used quickly. At the moment the Canon C300 is a bit of a mystery to me: before…

The Masters of Compositing Series - Part 2: Paul Vlahos

Jeff Foster | 03/27

Co-founder of Ultimatte and developer of modern compositing technologies.

This is the second in a series of interviews with the pioneers and masters in the compositing/VFX film & television industry. I originally recorded these interviews for my published book “The Green Screen Handbook” (Sybex/Wiley, pub) and had intended to produce…

Lights, Camera, Kids: Shooting a Childish Spot for T-Mobile on the Canon 5D

Art Adams | 03/26

“Just for the web” is no reason to skimp on a project’s look. A few simple tricks made this web spot shine.

A web spot may be seen by more people than a broadcast spot, so making it pretty is more important than ever. In this case, simple but elegant lighting and custom gamma curves made this spot shine. (And when shooting kids, “simple” becomes very…

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


Copyright © 2012, 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