From the course: How Do I Do That in After Effects
How can I cut out an object in After Effects with RotoBrush? - After Effects Tutorial
From the course: How Do I Do That in After Effects
How can I cut out an object in After Effects with RotoBrush?
- A little bit later in this course, we'll explore the concept of green screen for extracting a background when you shoot on a solid green backdrop. However, you can actually still extract objects right in After Effects using the Roto Brush tool. It's not nearly as fast, but it does offer some great flexibility. I've opened up a footage layer here and you can see how the person has been extracted. Well, let's turn on the background layer here and build this up from scratch. The Roto Brush tool allows us to remove something from the backdrop. What we need to do is double click on the layer to open it. I'm going to zoom in here a little bit. You can also mouse over and press accent grave to take that window full screen. Now what we need to do is brush. So you see that we take the Roto Brush tool and put a few strokes to define our subject. I suggest that you start on the first frame and then just draw loosely through the body. Don't worry about going through the total edge, and then put a line down through the center, this helps it sample the colors. And you see what it does is it creates a mask by guessing. It looked at the different edges and cleaned it up. Now, what you could do is start to adjust. You'll see here that we have this automatically expanded, but if it doesn't, make sure you pull that out, that indicates the frames that Roto Brush is going to process. You now jump forward, and what it does is it analyzes the shot. So I jump forward usually half a second or so and make sure that nothing gets missed. So as he's moving and the camera's sliding around I see that it missed his ear there. So I'm going to go backwards a little bit, right about there, and it starts to miss the ear. So I'll put a little stroke there to add onto it. Not bad. It missed it there, so we'll paint in that. And you see how it adds to the selection. What you can do if needed is move back and forth and just pick up any problem zones. Now don't worry about perfection here, we're going to blend these edges in just a moment, but what we're trying to do is get a good extraction. Very nice, not bad. It definitely worked well. Now what we're going to do is switch tools. You'll find the Refine Edge tool. Now, what we can do is paint over the edge. I'm just tracing the edge here and I'm on the first frame. What that does is analyze the edge for a transition point, and you see how it's cleaning up the hair. By using this, After Effects takes a critical look at the area under the brushstroke and helps create a smoother transition. That's particularly useful here, As it picks up subtle details in the edge of his body. This lets you clean up the overall edges for more believable results. And while you don't have to do the entire edge, it often doesn't hurt. Now you can, again, drag through and let it attempt to analyze. In this case, that really seems to be helping. I can definitely see individual hairs better defined and I'm really impressed by the results. Now what we need to do is have this tighten things up. Now, you can toggle through different views here, this'll let you see the edge one way, or you can switch to viewing this as an alpha channel, that really gives a better idea of what's going on with the extraction. Now I'm going to get out of full screen view and just take a look at this here really quick. This area's not bad. I'm going to open up the effect and tell it to not be quite so aggressive. We're going to take the Refine Edge Matte, smooth it a little bit, and put just a little bit more feather in. What that does is reanalyzes it and processes it to clean it up. Now we'll turn on Chatter Reduction so it's smoother. And that goes through and tightens up the edges so there's no extra noise. Good. And let's take a look at the matte here, put a little more feather and just reduce the chatter as well. There's the analysis and it looks clean. Now that we've got it generally set up, we're going to process it so that After Effects can cache these frames, this'll really speed up the performance. In our controls here, I'm going to tell it to use Motion Blur as well as Decontaminate the Edge Colors to remove any background. Then, I can make a refinement, and I'll just click the Freeze button. What this does is analyze all the frames and convert them. It's going to go through and process this so that it's effectively pre-rendered. If you ever need to, you can click the Freeze button again to unfreeze it if you need to modify the settings. This is basically a temporary render that will dramatically speed up the performance as you work with the effect to adjust the background or start to relight it. This is necessary, so you don't have to wait for it to constantly recalculate every time you move a slider. Okay, now it's cached, and let's go back to the composition view. I see that the footage has been cut out, which is cool. It's in there and we can do things to it. For example, we could put him over his own self here, but further blur the background, maybe put a little additional blur back there. This way it's more defocused and shallow. Let's go with a value of 50 here, so it's not quite so aggressive. Or 20. Nice. And I'll tell it there to repeat the edge pixel and we'll just color correct that a little darker. There we go. Now he really pops over the background because it's more blurred and pulled down in exposure, but you don't have to stop there. You can actually put just about anything behind him and relight this or change the properties. Let's go ahead and bring in another backdrop here. I'll go to the folder itself and I'm going to bring in this file called Rooftop. Now we'll drop it down below. It comes in nicely and I could press Command + Option + F or Control + Alt + F to scale it up. I like that. Now, let's just finesse the lighting. We can promote our individual to a 3D layer so he reacts to light. Now we can add an ambient light to bring up the base lighting level and I'll sample the bright blue sky and add the light. Let's set the at to an ambient light for a base level and we could adjust the intensity. And now he's under the same color light as the sky itself. I could actually just take that up a little bit and decrease the saturation a little so it looks more natural. Plus, I'll add a second light here and point it at the side. Lets let's go with a spotlight and we'll angle that a little bit more over here and just gently point it at his face. We can move that further away and just shine it nicely and then control the intensity, the feather and the angle. And notice there, if I turn those two lights off, he goes from indoor lighting to outdoor lighting pretty quickly. And by adding in new light to the scene that matches the actual environment, we were able to move him from an indoor basement location to an outdoor rooftop location. This is pretty heavy compositing and we went pretty deep there, but those lights are really quite powerful. And by being able to tap into the actual light in the environment, you can create a much more realistic composite. Let's let that preview all the way through and have a look. And you notice there that the extraction is quite good, and while a key would've been perfect, this is really quite believable and amazingly flexible. Roto Brush is a very deep tool, so there's many more options that you can explore as well as education available. But if you need to extract something from a background or just re-composite it over the same background, it's really pretty amazing what you can do.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.