Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,900 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: If you remember, our goal was to create a movie, then rotate it, then have a Wave Warp applied, and it was also trimmed down using a mask into a square shape. Let's see how far we got at the end of the last movie. I'll bring After Effects forward and remind you where we left off. By only using one composition, we ran into a few problems. I created my mask shape but when I applied the Wave Warp, it also affected the edge of the mask. When I look at the Timeline, I can clearly see that the mask renders first, followed by the effects, followed by all the transformations.
And I found that when I try to rotate the layer, it also rotated the entire result including the mask. So it's obvious that I can't get to where I need to be using one composition. When you take one layer and spread it across two compositions, you'll have two sets of masks, effects and transformations and then you'd be able to pick and choose in which compositions certain operations happen. So let's see how that works. I'll bring forward the Project panel and select the composition I have open now, which is called Basic Order.
To nest it in the second composition, all I have to do is drag it to the new composition icon at the bottom of the Project panel. That automatically nests it and increments the number to number two. So now the source of the second composition is the output of the first composition. And just so we can tell them apart, I'll change the background color for the second composition so you can tell the difference between Comp 1 and Comp 2. Of course, creating two compositions didn't solve anything, but it did give me the opportunity to solve it.
In this second composition, I have transformations, I have no masks and effects right now, but anything that happens in the second comp will render after the first comp. If solving rendering order issues is new to you, the first step is defining what attributes are closing the problem and what order they are rendering in now. Your client might look at this result and say "Hmm, I don't like the wavy edge," but you have to be more specific. The reason you have the wavy edge is because the effect is rendering after the mask.
And we kept this very simple. In the real world you'll have many other effects and maybe there are some Scale keyframes and so on and they may not be part of the problem. Once you figure out the attributes that are causing the problem and you've noted what order they are rendering in now, make a mental note of how you could reverse the order. That means I need to render the Wave Warp first and then render the mask and if I don't think this through, I could just as easily create the same problem across two comps.
For instance, if I take the Wave Warp and cut it and I go great, there is my nice square and I select the second comp and I paste the Wave Warp into the second comp, I have exactly the same problem because I haven't reversed the order of the mask and the effect. So let's undo back to where we started. Once we are sure which two attributes need to be reversed, the final step is to actually move the first attribute to the second composition.
In this example, I need to cut the mask from the first comp so the first composition only has the wave effect. I bring the second comp forward and there is the result of the first comp with the wave and I paste my mask. Now I have actually solved the problem. Because the mask is rendering in the second comp, it's rendering after the wave. So now I am actually getting somewhere. The last part of the recipe is adding rotation.
So let's add some Rotation keyframes. Turn on the stopwatch for Rotation, we'll go to the end, and we'll give it one resolution. Well, that wasn't quite what I wanted. I am applying the Rotation keyframes after the mask. I think I need to apply them in the first composition. I'll press Home, click on the word Rotation to select both keyframes, check that the value is zero, and then cut the keyframes to remove the animation from the second comp.
I'll go to the first composition, select the layer, the original movie, and paste. So in the composition, my movie is rotating and it's getting the wave. so the rendering order is the effect followed by rotation and the output of this composition feeds up to the input of the second comp and then the mask is being applied. So I hope you can see that by using two compositions you get a lot of flexibility because you could decide in which order things render.
All things being equal, I would add effects, especially color correction effects, to the higher level comps so they are easier to find and edit. With other effects, try applying them at different points in the render order and compare the results. So leave you with another example, let's apply an effect that treats edges. I'll do a find for Find, no pun intended, and we'll drag on the Find Edges effect and this is being applied after the mask. If I click outside, you can see that it's actually finding the edge of the mask.
If I twirl down the mask and increase the feather, it's creating a dark edge around where the mask feather is. Of course sometimes unexpected things happen and they inspire you to go in that direction, but so you can compare the difference between applying Find Edges in this comp and applying it in the first composition, I'll cut the effect, so now we just have a feathered edge. I'll bring the first comp forward and with it selected we'll paste. Find Edges is now applied after the Wave Warp.
So it's actually finding the edge of the movie that's being waved. If I move it to the top of the effects stack, it would be applied to the movie before the Wave Warp effect. In this case, the order of these two effects, Find Edges and Wave Warp, don't actually matter because I'm not seeing this edge in the second comp. So there we go, we the Find Edges and the Wave Warp and Rotation in the first comp and in the second comp the feather on the edge of the mask is not being affected by the Find Edges effect.
So those are the kind of issues that you'll come across as you start working with After Effects. In this example I kept it very simple. I only had one layer in one composition. So when I ran into problems, it was very easy to just nest this composition in a second composition. In the real world it's not going to be that easy. Your composition will have other layers. So you won't be able to take it and nest it into a second comp. The solution therefore for many rendering order issues is you select your layer and you use Pre-compose and that's what we'll be covering in the next movie.