Learn about how to add extra content to a layer using the Mesh Warp effect and to track the sky motion to the movement of the clip.
- [Instructor] We are now moving to shot number five, where we need to extend the right side of the image and then match the motion of the red sky background with the foreground shot. All right, so I'll pause the playback and I'll switch off the visibility of those three titles for now, they're just going to be in our way. I'm also going to go to the beginning, then select layer number four, this is the mother and the child go to the Effect Controls and I'll remove the color key for now. We are not going to use it, we are going to build a better key in the next lesson. But now I just want a clean image, so I can see what I'm doing. All right, so to stretch it, I'm going to use the mesh warp effect just by starting to type it, actually I finished to type the entire thing. So I may as well double click on the name over here and this is going to add it to the effect. Now we don't need too many rows, we actually need just one row. And I'm going to lower the columns to let's say, I guess four. Because what I need to do is just select this pin over here, hold down Shift and select this guy, and then drag it to the right. Now you don't need to edit the Shift key to the mix. In this case, the effect just ignores it. So just try to stay on the horizontal line and just stretch this part of the image. And because we divided it to four columns, we are only affecting the pixels of the right row over here. So if I play the result, you can see that the left side of the image is not being affected. Alright, so now we need to track the motion of this shot, and then attach it to the background clip. For that we need to pre-compose it, because I want to track the resulting pixels of what I've just created. So select this clip, go to the Layer menu and choose pre-compose. Now you can name it whatever you like. I'm just going to call it mother and child. And then I'll make sure to move all the attributes into the new composition. In this case, I don't need to open it. So I'm going to say Okay, and now I'm staying here in this composition, but I have a new source that I can use. Now to track this shot, you can go to the Window menu and choose the tracker. Or a better way to work is just switch to the motion tracking workspace. So I'll click on this overflow menu and choose motion tracking. And this is going to show me the tracker pattern. While the layer is selected here, I'll click on Track Motion, because we want the simplest form of tracking in After Effects, which is just the position tracker and this is going to open up the layer panel. So I can select it, and then press on the period key to zoom in to the frame. I'll hold down space bar and pan, because I know that I need to take the three elements here, so the middle cross as well as those two squares. And to do so you need to wait for the black arrow, as well as for the double headed arrow, then click and move them, and I'm going to place it over here at this point as well as enlarge the search area and region area. This is what After Effects is going to look for in the next frames. Then I'll fit the viewer back and I'll press on analyze forward, and with any luck After Effects should be able to find these points across the entire clip. So now we have the tracking data that we need and we can apply it to the clip underneath. So to do it in the most flexible way, which will help us to make changes if we need them down the line, I'm going to go to the Layer menu and create a null object. And then I'll select it in the timeline, press Return or Enter. And I'm going to name it tracking data. Then I'll return to the tracker panel, click on Edit target, make sure that the tracking data is the layer that I'm going to apply the motion to, click Okay, and finally, click apply and click Okay again. And now all the tracking information that we've gathered in this step is being applied to the position of this null object. All right, we can click back on standard in order to bring back this workspace. And now we need to marry this information with the background image that we have here. So I'll switch of the visibility for the mother and child there, just so I can see the background on its own. I'll go to the options of these composition and make sure that from the columns, I can see the parent and link which in my case is not available on screen, so here they are. And then I can peek whip this layer to the tracking data. And this means that now it will follow the same motion of the clip. Now I did it in the last frame so my last frame here is looking great. But at the beginning, we can see that it is not sufficient. So we need to select this layer press S, to get to the scale property and just scale it a touch. So let's go to 120 just to be on the safe side. And because we are only going to use the sky portion of it, doesn't really matter that we are scaling it so much. So I'm just going to scrub and see that it is not leaving the screen. We have a little bit of a black pixel here, meaning that I'm going to just drag it down. And because all of the data, all of the geometric movement is being controlled via this null object, I don't need to worry about moving this layer after the effect. So now I'll switch on the visibility for the mother and child layer and this is it for this part. So this is how you can extend part of the frame by using the mesh walk effect, as well as match the motion between two clips using the basic tracker inside After Effects.