New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

After Effects Apprentice 08: Nesting and Precomposing
Illustration by John Hersey

Using precomposing to rewire the render order


From:

After Effects Apprentice 08: Nesting and Precomposing

with Chris Meyer and Trish Meyer

Video: Using precomposing to rewire the render order

In the previous movie we fixed the problem with the visual rendering order by using two compositions. We nested one competition into a second and then we could pick and choose which attributes rendered in which comp. That was a fairly simple example, and we could fix it with Nesting because our first composition only had one layer in it. But that's not a very real world example, so in this movie, I'd like to show you how to fix a similar problem using Pre-compose instead of Nesting.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
After Effects Apprentice 08: Nesting and Precomposing
2h 25m Intermediate Jun 29, 2011 Updated Nov 29, 2012

Viewers: in countries Watching now:

Let Chris and Trish Meyer share with you two of the core secrets required to become an efficient After Effects user: understanding the render order (the internal order of operations After Effects uses when calculating masks, effects, transformation, track mattes, and layer styles) and the use of multiple compositions where a composition may be nested into one or more other comps. This makes it easier to group layers, efficiently re-use a common element to quickly accommodate client changes, pan around large composites of multiple layers, and solve render order issues.

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®.

Topics include:
  • 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
Subjects:
Video Motion Graphics Visual Effects
Software:
After Effects
Authors:
Chris Meyer Trish Meyer

Using precomposing to rewire the render order

In the previous movie we fixed the problem with the visual rendering order by using two compositions. We nested one competition into a second and then we could pick and choose which attributes rendered in which comp. That was a fairly simple example, and we could fix it with Nesting because our first composition only had one layer in it. But that's not a very real world example, so in this movie, I'd like to show you how to fix a similar problem using Pre-compose instead of Nesting.

I'm still using the Render Order project, and if you have any Comps open, let's close them all up by selecting Close All from the Composition Panel. The comp I want to open is in the Render Example 2 folder, and it's called Circle. I'll RAM Preview. What we have here is the same movie we were using earlier. It's been masked, and we have a number of effects applied to it, and there is a title and a background movie.

The problem I'm having with this movie is that I've masked it into a perfect circle, but the effects I've applied are skewing it and distorting it so that it's no longer a circle. So let's examine what's going on. I'll twirl down the Layer, twirl down Masks, and Mask 1 is this Circular mask. When I twirl down the Effects, I see I have a number of effects applied. And I did this not to necessarily confuse you, but just to give you a few more things to think about.

If I turn off all my effects, there is the original brightly colored movie with the mask applied. One of these effects is causing the movie to skew. We'll turn it all off, and let's examine them one by one. The first three effects are only changing the color, they're having no effect on the shape of the layer. The next effect, Warp, is making the straight lines in the movie have a nice curve to them. Unfortunately, it's also causing the Alpha Channel to change shape.

The next two effects, Bevel Alpha and Drop Shadow, are simply being applied to the new Alpha Channel, so if I turn off the Warp Effect, I get all the color correction, the Bevel, and the Shadow, and it's a perfect circle. To fix this render order issue, I first need to define which two attributes are causing the problem with the Alpha Channel, and it seems to be the mask and the Warp. The second part of the puzzle is figuring out what order they're rendering in now. Well, that's easy.

I can see from the Timeline that the mask is rendering first and the Warp is rendering second. So it sounds like the solution is to reverse the order and render the Warp Effect first, followed by the mask, but let's also consider the other effects. The color correction can render either before or after the mask, or before or after the Warp, but the Bevel Alpha and the Drop Shadow, they need to render after the mask. If I was to render all of the Effects before the mask, I wouldn't get the result I'm looking for.

To help you visualize this, I'll just turn off the mask. I'll change it from Add to None, and now you can see what happens when you apply the Bevel Alpha and the Shadow and all of the Effects to the original movie. If I were to then cut this image out with the mask, I would be cutting out the Bevel as well, so I need to be quite surgical here. I can't move all of the effects before the mask, because that won't give me the result I'm looking for either. If we get back to what was causing the problem, the Warp and the mask, I really only need to move the Warp so that it renders first before the mask.

So let me turn back on the mask and we can do this surgery by using Pre-compose. So I'll select the layer, go to Layer > Pre-compose. We have two options to choose from when we're Pre-composing an individual layer: we can either Leave all attributes, or Move all attributes, and it's good to think about what might happen if you pick each option. For instance, if I Move all the attributes into the new composition, I would move the mask, all of the effects, and my transformations.

I have some scale applied. And then if I want only the Warp to be rendered in the Pre-comp and everything else to render in the second comp, I would have to copy the mask, five of the effects, and the Scale keyframes and move them back up to the second comp, so that doesn't make any sense at all. However, if I Leave all the attributes in this comp, I would use this option to create a new comp with only this movie in it, and the new comp will then be the source to this layer.

Well, that sounds more promising, because that way I can just take the Warp effect and copy it to the Pre-comp. And I would say as a pretty solid rule, it almost never makes sense to move all the attributes into the new composition if all you're trying to do is fix the problem with the rendering order. Not only would you move all the attributes, such as Blending modes, which need to interact with layers below, but it's much better to leave all your keyframes in the top comp, that way they're easier to edit. So we'll give our composition a useful name. Let's call it digi precomp (warp).

Now when I look at my list of Pre-comps, I'll remember why I made this Pre-comp. It was simply to fix an issue with the rendering order. So I'm going to Leave all the attributes and Open the New Composition, I'll click OK, and as promised, my movie is now placed in the Pre-comp, there is no mask or effects, these are just the default transformations, and also note that the Pre-comp is using the same specifications as the movie. So it has the same Width, the same Height, and the same Duration, 12 seconds, whereas my main Comp, Circle, is only 5 seconds long.

So you can see that the Pre-comp layer extends past the end of the comp. So my movie has been replaced with the output of the Pre-comp. If I twirl this down, I'll find all of my attributes still in the main composition. So remember when you Pre-compose, you're never actually fixing the problem, I still have an issue with the circle not being perfect, but what Pre-composing does is give you the opportunity to fix the problem for yourself. So now I can pick and choose which of these attributes render in the first comp.

Remember, this is now the second comp for this layer. So I've already determined that Warp and mask are the issue and that Warp needs to render first. So we'll select Warp and we'll cut it, now my movie is in a perfect circle. I'll select the Pre-comp, select the movie, and will paste, and now my Warp is being applied to the original movie. And the output of this Pre-comp, with the Warp, is being sent up as the input for the layer in the next comp, and now I have the look I was after.

Since I no longer need to see the edge of the mask, I'll Toggle off the mask visibility, and the final thing we need to do with this layer is we need to animate so that it rotates. And normally we would just reach for the Transformations, turn on Rotation, and start animating it. But let's have a look at what that might look like. Is there anything wrong with this picture? The effects that are applied here, the Bevel Alpha and the Drop Shadow, are assuming that there is a light source at the top left-hand corner casting a light across the layer.

So the bevel adds a highlight on the top left- hand corner and the shadow is adding a shadow on the bottom right-hand corner. It's a little hard to see because the background is dark. So if we need to rotate a layer with Bevel Alpha and Drop Shadow, the regular rotation is not going to cut it, we need to rotate before the bevel and the shadow. Fortunately, we already have a Pre-comp set so we can choose to rotate it in the Pre-comp. I'll turn on the Stopwatch.

We'll go to the end and we'll just give it 2 Revolutions. I go back to the Circle Comp and now the layer is rotating and it's not affecting the bevel and the shadow. And I'll just leave you with one more solution. If I was only working with a layer in one comp, I could animate Rotation before the bevel and shadow by using the effect under Distort called Transform.

Of course, I need to make sure I drag Transform above Bevel Alpha and Shadow, and then I can animate the Rotation inside the effect. This can be a very handy effect. So to recap, whenever you have a problem with an individual layer and you have some kind of render order issue, when you go to Pre-compose, you almost always want to leave all the attributes in the current composition, and then pick and choose which attributes to move to the Pre-comp, always remembering that the Pre-comp is rendering first.

Find answers to the most frequently asked questions about After Effects Apprentice 08: Nesting and Precomposing.


Expand all | Collapse all
please wait ...
Q: This course was updated on 11/29/2012. What changed?
A: We added a new chapter, "Render Order Exceptions." It contains four new movies: Continuous rasterization, The Transform effect, Collapse transformations, and Compound effects. We also added a movie that shows our premium subscribers how to use the exercise files, including the new exercise files designed for After Effects CS6.
 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed After Effects Apprentice 08: Nesting and Precomposing.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Notes cannot be added for locked videos.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.