Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,971 courses, including more Video and personalized recommendations.Start Your Free Trial Now
- View Offline
The After Effects Apprentice videos on lynda.com were created by Trish and Chris Meyer and are designed to be used on their own and as a companion to their book After Effects Apprentice. We are honored to host these tutorials in the lynda.com Online Training Library®.
- Grouping layers by nesting and pre-composing
- Identifying and solving render order issues
- Navigating composition hierarchies
- Editing a precomp while viewing the result in another composition
- Preserving the frame rate of a nested composition
Skill Level Intermediate
Trish Meyer: In the next couple of chapters I'll show you how to use the pre-compose option. If you have the exercise files, go ahead and open the pre-composed_1_Move project. In the next chapter, we'll use the second project called pre-compose leave. When you open the project, it's very simple. There's only one composition called wiredfruit. I'll open that and inside this composition there are five layers. The top layer is a 3D animation of a wireframe apple and layers two and three are a title layer and a subtitle.
And in the background we have two movies that are blended together. If I select the top three layers and press E for effects, you can see that I have the Drop Shadow effect applied to all three layers. Of course because I have three different Drop Shadow effects, every time I update the drop shadow on the Apple I have to make sure, I copy and paste the same settings to the other two layers. So it might not be the most efficient way of working, but it does allow me to keep things simple and do the animation in one comp. Now when you are nesting compositions, generally speaking you're planning ahead and you're deciding which layers it should be in which comp.
But in the real world, quite often inspiration hits in the middle of a project. So lets say I'm working away and suddenly I decide I'd really like to be able to move all these layers at the same time or maybe scale them as a group. In a previous lesson, we showed you how to use parenting with a null object so you could transform layers as a group. However, one drawback of parenting is that you can't apply one effect to the parent and have it apply to all the children as well.
Obviously some effects I can just apply to each layer individually. But there are many effects, in particular the effects that are in the Distort category, you often want to apply these to a group of players. That's because effects like Displacement Map as well as others such as Wave Warp, Warp, Twirl, Turbulent Displace, and so on. They work with this idea of having a distortion field. And if, I apply one of these effects to each layer individually I get a completely different look.
For instance, if I apply the Twirl effect to each layer individually. they would each twirl around their own center. So that's why nesting compositions is very useful, because not only do you get all the benefits of parenting, but you can also apply effects to the group, and again that's great in theory. But in the real world sometimes inspiration hits in the middle of a project and you weren't planning ahead and that's where pre-compose comes in. So let's look at how it works.
The first thing we need to do is select the layers that we want to group together. In this example, that's layers one, two and three. You'll notice I've already lock the background layers so you don't accidentally select them. So with the layers I want to group selected, I'll go to the Layer menu and select Pre-compose from the very bottom of the menu and later on you can learn the shortcut. When the Pre-compose dialog opens, you'll notice it has two options, one of them is grayed out. And the reason that the Leave all attributes is grayed out, is because I have multiple layers selected.
If I only had one layer selected I would have a choice. In the next chapter, I have an example where we'll use the Leave all attributes option. So the idea here is that we're taking a group of players, we're maintaining their attributes, and we're creating a single composited frame from that group. So what does Move all attributes actually mean? In After Effects, the word attributes simply refers to everything that's applied to a layer. With a text layer it means the fonts, and the stroke, and the color and so on.
And for all layers it means what mask or effects might be applied, blending modes, as well as the status of any of these switches. In addition, the value for any transformations as well as of course any keyframes that are applied would all be considered attributes. Another important attribute is the relationship that layers have in time. For instance, if you trimmed the layer that would be an attribute and also if you have moved layers in time so that different layers started at different points in time, they would all be attributes.
So the relationship that layers have to each other will be maintained after you pre-compose. So the idea here is that we're going to move all the attributes into a new composition. We'll give that comp a useful name. Lets call it apple group. Remember naming your composition is just as important when you're pre-composing. That's when you're creating a new comp from scratch. Now, if you read the fine print, it says Use this option to place the currently selected layers together into a new intermediate composition.
But why didn't they just say into a new composition? What does it mean by intermediate? What After Effects is trying to tell you is that the composition you're about to create called apple group will be an intermediate composition between the current composition and the original source. In other words, the new composition will be rendered before this composition. So in the rendering hierarchy, the original sources will be placed inside apple group and that pre-comp will then appear inside this comp.
So unlike nesting where you're creating a composition that renders second, when you're pre-composing you're always creating an intermediate composition that vendors before the current composition. The last option, Open New Composition, all it means is after I click the OK button will the pre-comp be open and forward, and that's what happens when it's enabled, or if it's not enabled, will the current comp be forward? For this first example let's just leave it off, so you can see what happens.
I'll click OK, and my three layers in the timeline have been collapsed to one layer. Nothing appears to have changed in the composition. It looks exactly the same. But if I look over at the project panel I can see I have a new comp called apple group. If I want to work with this pre-comp, I can either open up from the Project panel just like any other composition or I can go down to the timeline and simply double-click. And that brings the apple group comp forward out as a tab, so I can go back and forth between the current comp and the pre-comp.
Now it's important to remember that my three individual layers are appearing in the pre-comp with all of the attributes, the effects, any of the switches and blending modes that were applied, and I can continue to edit these individually. But in the current comp, I now have one layer that I can animate as a group. So again, I get all the benefits of parenting. I can move it around, I can scale it, and so on. I'll undo to being centered. But I also have the benefit of being able to apply any of the distortion effects such as a Wave or Turbulent Displace to the group of layers.
Now that's the first time you ever so a pre-composing in action, you might have seen a bit confusing and a bit long- winded, because I had to put it in context and explain what was happening, but let me undo back to before pre-composed. Here is my three layers that are selected and let me show you how quick and easy it actually is once you know how it all works. So again, I've selected my layers and I decided I need to have these as a group. So I select Layer > Pre-compose. I give my group a useful name.
I don't have a choice when I'm grouping layers, so I always do Move all attributes and this time let's select Open New Composition so you can see the difference. I select OK and this time the pre-comp is forward. So here are my three layers in apple group. Now I bring the current comp forward. There is single that I can now animate as a group. So if you think about it, if you were organized and you were planning ahead and you knew you needed these layers into their own composition, you might have created this composition first, placed the layers inside, and then taken an apple group and nested it in the next composition, added the backgrounds, and so on.
So pre-composing is just another option for nesting compositions. It just allows you to do it later on without planning ahead. It's also important to remember that when you pre-compose you'll end up with a comp that is just a regular composition. You might call it a pre-comp, but that just means that it renders first. Remember these layers are going to render first and then the result of this composition with its alpha channel remember, you have transparency here, will be nested in the main composition.
Once you start creating multiple compositions, it's a good idea to store the pre-comps in a subfolder. So I might want to create a folder here called pre-comps and I would drag any of pre-comps into that folder and keep things organized. So now that we have the pre-comp created and we have a single layer to work with. In the next movie we'll apply to Warp effect, animate it, and also tidy up the project to make it more efficient.