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

Solving problems by using a second composition

From: After Effects Apprentice 08: Nesting and Precomposing

Video: Solving problems by using a second composition

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.

Solving problems by using a second composition

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.

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.