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

Creating a matte

From: After Effects Apprentice 13: Paint, Roto, and Puppet

Video: Creating a matte

Now the first step to using Roto Brush is to choose a frame where you can see the entire object that you need to cut out, or failing that, as much of it as possible. In this case these tulips don't move that much and they're always fully in the frame. So what frame I use for my starting point is not all of that important. But the frame you choose is what's going to be called a Base Frame. Roto Brush is going to take the information you create on that frame and propagate that information earlier and later in time. We'll just go to one second even now just for fun.

Creating a matte

Now the first step to using Roto Brush is to choose a frame where you can see the entire object that you need to cut out, or failing that, as much of it as possible. In this case these tulips don't move that much and they're always fully in the frame. So what frame I use for my starting point is not all of that important. But the frame you choose is what's going to be called a Base Frame. Roto Brush is going to take the information you create on that frame and propagate that information earlier and later in time. We'll just go to one second even now just for fun.

Next, you need to select the Roto Brush tool. It's this large brush painting out this little man. I'll select the tool and as I move over the Layer panel, you'll see I have a circle that indicates the size of our brush. It's also green in color with a plus sign in the middle, which indicates I'm going to add to my alpha channel. I'm going to be working on my foreground not my background. You can resize the Roto Brush, just as you would your Paint Brush, by holding Command on Mac or Ctrl on windows, then dragging. Unlike a normal painting where you might want to create a small brush to get the detail around the edges of this flower, Roto Brush works a little bit better if you make large strokes because it's going to be looking at the colors that you drag your stroke over.

So I'm actually going to make a fairly large brush here to take in a lot of these petals with a minimum amount of work. Once I've done that I'll click and drag through these petals that I want to be included in my Roto Brush. Don't go outside and don't cross over to the background, you'll get a false reading then. I'm going to Undo. Instead, just paint right through these petals. After Effects will draw a pink segmentation boundary around the area that it found from our colors that we stroked in searching outwards until it found a transition.

The area inside that propagation boundary is the foreground, the area outside is the background. You can add multiple areas to your foreground selection. For example, the butterfly flew behind this petal as well, or at least we want it to. So I'll click and drag through those petals and they will get a pink segmentation boundary as well. Down here in the Layer panel's timeline you'll see a little gold bar. The gold bar indicates the Base Frame that you created where you first drew these strokes.

You'll also see this gray bar with arrows pointing to the right and to the left. As you can see from the tooltip, this is called the Roto Brush Span. Roto Brush is going to take the information from the Base Frame and propagate it on successive frames earlier and later in time. It will look for any movements from frame to frame and build upon that information as it gets further way from your Base Frame. You can use Page Up or Page Down, or as you did with the Paint tool, you can use the 1 and 2 keys on the normal portion of your keyboard to step forward frames or to step backward frames.

You'll see the pink segmentation boundary is updating to take in to account these petals being blown around in the wind. If I'll just randomly jump to a frame later in time, there'll be some calculation time involved as Roto Brush propagates out to that frame. Roto Brush also has a number of tools that allows you to see the result of you creating your segmentation boundary, even including a masked overlay like you may be used to seeing in Photoshop. I'll go back to my segmentation boundary for now.

Okay. Let's see how this looks. I'm going to bring my Comp panel forward and I see the butterfly is indeed behind my flower petals. Cool! I'm going to press 0 on numeric keypad to cue up RAM preview. Roto Brush does take a while to calculate, because it has to do all that propagation work. So far, so good. Butterfly spans the petals, and the butterfly disappears for part of the flight. Well, what's going on there? Let's go to where it disappeared and go back into our Layer panel. You'll notice that the time marker is beyond my Roto Brush Span.

After Effects only assume it's good for so many frames, 20 to be precise, before it says, you know, I really would like to have some more information before I continue to use this old base frame to go this many frames away. If Roto Brush was having difficulty, you can train it to keep up with changes in your footage, and that's going to be covered in-depth in the next chapter. But in this case, the Roto Brush was working just fine up until the point we ran beyond the end of our span, and now you'll see the pink outline has enclosed the entire frame, you can go ahead and just drag out the span longer.

I'll jump here later in time. It'll take a few moments for it to propagate, and looks like it's still properly enclosing these tulips. No problem. I'll go back to my Comp panel, RAM preview, and now my butterfly stays in the picture during the span of when we have our Roto Brushed copy the layer in front. That's looking pretty good. But there's one other little issue here. You might have noticed when the butterfly is behind the tulip petals, there's a little bit of a black line.

Compositors often refer to this as a matte line and they're considered to be undesirable. You want those edges to blur together. I'm going to zoom in a little bit here, hold the Spacebar and pan down. You can see a little bit of that black fringing here where the alpha channel is not quite perfect. And a little bit in to here. Roto Brush has an entire section to refine the matte that it has created. You just need to turn it on. It slows things down. That's why it defaults to being off. But when you're at this stage, you now want a refined matte.

And you'll notice some of the black fringing went away. Before and after. By doing so it decontaminates any color that bled into those nice anti-aliased edges. It calculates motion blur for any movement in the mask outline. It's a very powerful section of the Roto Brush effect. You can even choke it a little bit more to get rid of more of those matte lines if you want to. So final step, I'm going to press T to reveal the opacity of my tulip in front. These tulip petals look like they are semi-translucent, so I'm going to back off the opacity of this copy in front until I just barely see the butterfly through that copy of the tulip.

Press Shift+/ to recenter my view, RAM preview, and again, it takes some time to calculate, particularly propagating the additional Roto Brush stroke information. But in the end I have a very nice composite and now my butterfly appears to be flying above the tulips even though the tulips are on their own plane. Now this was a particularly easy use of Roto Brush, trust me.

Almost never will it be this easy to use Roto Brush in real-life. Therefore, in the next chapter we're going to tackle a much more difficult real-world example of cutting out a person's arms as they move in front of the computer screen.

Show transcript

This video is part of

Image for After Effects Apprentice 13: Paint, Roto, and Puppet
 

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 13: Paint, Roto, and Puppet.

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 preferences from 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.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

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.