Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Precomposing to group layers

From: After Effects Apprentice 08: Nesting and Precomposing

Video: Precomposing to group layers

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.

Precomposing to group layers

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.

Show transcript

This video is part of

Image for After Effects Apprentice 08: Nesting and Precomposing
 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
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.


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 "Already a member? Log in

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

Your file was successfully uploaded.

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.