 Hello, everyone. Welcome back to another After Effects tutorial. In this one, we're going to do some AI magic. And I'm going to show you how to take a shot like this, where this guy is vacuuming the forest, which reminds me, if you see mushrooms in the forest, don't eat them. You never know. But we're going to see something like this where he's vacuuming and we're going to remove him just like this. Here's the finished composition. If I hit play, he's no longer in the video and it looks very believable. And I'll show you the last frame here. You'll see here that we've actually masked him out, punched him out. Literally and used content to where it felt. I'm going to show you how to do this in just a couple of minutes. Let's go. All right. Here we go. So I've got a blank, new project Adobe After Effects, and I'm in the default workspace, just like this, just the first thing you'll probably see. I'm going to go into Finder. If you're on a PC, go into your Windows Explorer, grab the footage that you want to work with, just like I've got here, and then just drag it and drop it into the project panel. Once it's in the project panel next, drag it and drop it on top of new composition and presto. You can also right click on the video here and go new comp from selection, either or works. OK, so the next step here is I'm just going to move my play head to the beginning here to make sure it's at the zero seconds. And what you want to do now is you want to draw a mask around the object, the subject, the item, whatever you're trying to remove from the scene. So in this case, I've got this guy vacuuming the forest with his Hello Kitty Dyson, whatever the hell's going on here. So here we go. The next step here is you're going to go up here to your pen tool. If you have a like a an object or a subject that's like square or a shape, you can use one of the shape tools. But here we go. Making sure your play hit is at the beginning. I'm just going to draw a very loose mask around the subject here. And again, this is very, very loose. It's on purpose because I don't want to show. I'm not going to do a tutorial on masking. I just want to show you the basic technique and then you guys can go in as you see fit. So you'll see here, I've drawn the mask. And if I maybe I'll move that out a little bit more just so that we've got some extra room here and there's a fair bit of room around it. So there we go. Now, the next step here is in your panel down here, you want to go ahead and drop this triangle down, go to masks, drop masks down and you're going to see mask one. What you want to do now is for the meantime or for the meanwhile here, we want to switch that from an ad mask to none. So that way we can see the mask and we can see the background. Everything is in frame. We can see what's up next. We're going to want to move this mask. Let me show you how to do that. OK, good stuff. So this mask is not moving at the moment. It is a static mask and we don't want that because this person here, as you can see here, when I move the play head, he moves over time. It's video and it's not an image. So it's quite different. So what we want to do is we want to go on that mask again. We've switched it from ad to none. We're going to keep dropping it down here and you're going to see something that says mask path. Click on that stopwatch right here. When you do that, now the mask is animatable so we can move it over time. So here's what we're going to do. I'm going to be at the zero second here. I'm just going to move it forward a couple of frames and then you'll see somewhere around here, this little the vacuum end here is starting to come over the mask line. So what I'm going to do is I'm going to click on the video track right here. You don't want to click on the mask, click on the video track like I've done here and then make sure you've got the pen tool selected. And now you can just move these points. So I'm just going to move these points nice and simply. And again, this is just not required if you have a object that doesn't move. But because mine is moving, I'm just making sure that the mask is around the subject completely with a little bit of extra room. Let's go forward a little bit and here we go. So this this area, we want to move this one up this area here, this one up this one up. And again, you'll see here, I'll do this really quickly here. I don't want to spend too much time masking it. So you just get the point and I'll move this down and then we'll go forward a couple of frames to maybe here and then we'll move this in. And then we can even move this guy and these ones in a little bit because they're kind of way out there. So this is the general gist of it. I'll do one more here somewhere around here and I'll move this down. I'll move this down. And here we go. We've got about a second and a half or so of footage. That's enough for the technique. Now I'm just going to go ahead. And if you wanted to do this for the whole clip, you can just keep doing this process over and over. I'm going to go ahead and grab this work area and button here, this little bar, and I'm just going to hold on the shift key and I'm going to bring it in. And the reason why is I'm just going to constrict this to the second and a half or two seconds that we've got here. So I'm going to go to composition and now I'm going to go to trim comp to work area. So the mask now is only working for the second and a half or so that we've got here. So let's just go ahead and see what we got. Here's the original shot and I'll just move it forward. And you'll see that I've gone ahead and moved the mask so that it's kind of around the person quite nicely. Now let's go on to the next step. Alrighty, so here we go. So now we've gone ahead. Make sure the play heads at the beginning here. Let's do a couple of quick things on the mask. We're going to switch it from none. Now we're going to switch it to subtract. And look at this. We basically pop the hole in it so you can see the transparency in the background. If you don't see these white and gray dots, you can go over here and toggle the transparency grid, this button right here. And that just basically shows you what we're working with and that this is, in fact, not a black background, but a transparent background, which will render with an alpha channel. So it's very important. So there we go. We've basically punched a hole out. Now we want to go up here to window and then we want to go down to content to where fill. I'm going to make sure that this is selected. And for me, it has gone ahead and added it on the right side here. So you'll see here I click on that content to where fill the defaults with an alpha expansion of about four. I'm just going to move that up to six. And then the other thing here is you get some fill methods. You can have object, which is like 95 percent of the time what you want to use surface. If you're working with, you know, surfaces, if you've got a logo, for example, on a laptop that you're trying to remove and the same with edge blend, I'll make separate videos on those topics. Also, if the lighting changes in the video a lot, you can go ahead and select lighting correction. But in this case, you don't need to. So there we go. We're going to go ahead and leave that as is. Now what I'm going to do is I'm going to create a reference frame. So I'm going to click this button here and it's basically going to create a shot in Photoshop and that when I go back into After Effects, look at this, you'll see here now there's a reference frame on top. Now don't worry about that right now. We just wanted to click that. The next and the most important point is we want to click on generate fill layer. This is going to do the magic for us. It's going to start doing some analysis and some thinking. When it's done, I'll come back and I'll show you what we got. All right, welcome back. So here's what we got. Now look at this. I'm just going to move the play to the beginning. Make sure I'll hit play and look at that. This is perfect. That person has been completely removed. And if you hide the layers here, you'll see here there's the cutout and then bang, here is the original shot. So I'll double click on the original video here. This is him doing his thing, vacuuming it up. And then if we go back into the composition and I'll turn the layers back on, we have it. Now we got to do file export. It is done. This is magic after effects. Thanks for watching.