Join Chris Meyer for an in-depth discussion in this video Preserve transparency, part of After Effects Hidden Gems.
- [Voiceover] In this Hidden Gem, we'll take a look at the preserve underlying transparency option, or preserve transparency for short. What preserve transparency does is use the combined transparency of all the layers below as the matte for the layer it's enabled for. I'll turn off the movie layer for now. I've made an example comp with three animated text layers. I'd like the movie layer to use this alpha channel so the movie will only be visible where the text is opaque, and that's basically what preserve transparency does.
To understand how this works, let's consider how After Effects renders. Because layers render from the bottom up, the image you're seeing now is a composite of all three layers. It's a flat, 2D image, with four channels, RGB plus alpha. Let's look at the alpha channel. I'd like the movie layer to use this alpha channel as the luminance track matte, which would mean that the movie would be visible wherever the text is white. So let's return to my RGB channels, and turn back on the movie. So when I enabled the preserve transparency option, which, by the way, appears in the Modes column, now the movie will only be visible where the layers below have some opacity.
Speaking of opacity, if you reduce the opacity amount for any layer, it will fade out the layer and the movie, because it's reducing the opacity of the alpha channel. Compare that to reducing the opacity for the movie. Now you're affecting the mix between the movie and the original layer color. By the way, if you've ever turned on and off this switch, and nothing seemed to happen, that might be because you had a layer that was filling the composition. For example, if I add this colorful movie as a background, the preserve transparency feature appears to fail, but it's still doing its job.
Remember that the top layer is set to play inside the combined alpha channels of all the layers below. If you want to see what that is, Option-click on the Show Channels button; now the alpha channel is completely white, because the background movie is full-frame and 100% opaque. I'll Option-click again to return to viewing the RGB channels. So to use preserve transparency successfully, you will have to add any background layers in the second composition. Here's an example that shows this hierarchy in action.
In my first composition, I have a glint layer that travels across the title. If I turn off the preserve transparency switch, you can see that the glint is a solid, masked, with a large feather, and the layer is composited with the add blend mode. When the T-Switch is enabled, this solid only appears inside the title's Alpha channel. To add a background movie, I nest this comp into a second comp, because the text and the glint is now a single composite, I can also add effects that apply to the edges, such as the bevel alpha and drop-shadow effects.
You might've guessed that any layer that is placed on top of the preserved transparency composite will not be affected by what's going on with the layers below. For example, if I add the arrows as a top layer, and I'll also copy and paste that fill, so it looks a little nicer, the glint only plays inside the title, but in the main comp, the arrow do pick up the bevel effects, and they also have the benefit of being able to animate all the elements as a single layer.
In After Effects, there are many different ways to achieve the same result, so you could arrive at this hierarchy, using track mattes or even stencils, but if you find yourselves duplicating layers to apply multiple track mattes, or you're creating an additional composition, the preserve transparency option might be your best bet.
- Setting the vertex point
- Creating swarms of object
- Replacing layers without losing effects and animation
- Simplifying projects
- Hiding layers
- And more…
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.