Skill Level Intermediate
- [Instructor] Hey, everyone, Allan Stern here with your After Effects weekly dose and in this episode I'll show you a sky replacement technique using one of the old school effects in the application, Colorama. We are starting with this footage filmed by my friend, Yeron Purro and on top of it we have a 3D render frame of a cityscape buildings. My goal here is to composite this frame in the background behind the girl, which was shot without a perfect focus, as well as some heavy handheld camera shake.
So, the first thing is to actually track the background which I've already did in advance and in order to show you what I did, I'm just going to fall down this triangle and underneath we can see the motion trackers where each holds one tracker with two points. In order to get access to this tracker and to apply it to our footage, I'm going to double click on the girl footage and this will open it up in the layer panel. Now we can actually see those two trackers. One of them is measuring position, the other one is measuring the rotation.
So if you want to use this data, we need to apply it to one of the footage or a better way to work is to create a null object, so I'm going to go to the layer menu and under New, create a null object, which is not going to render, this is just a place holder. I'm going to take it and place it above everything and I'm just going to name it tracking data. Now, I'm going to go back to the layer panel and I'm going to make sure that I can see the tracker panel because I need to apply the data.
So, I'm going to select tracker number one and in this case, what I've used is both position and rotation. So I need to make sure that After Effects is reading both of this information. First of all, I need to change the track type from raw to transform and then you must enable whatever you want to export. So in this case, position and rotation. The next step is to click on edit target, because I want to apply it to the null object that I just created, the tracking data.
Then I'm going to click OK and now you can see that After Effects recognize that there is a line which is measuring the degrees between tracker number one and tracker number two. Alright, so now I'm going to click on the apply button and I'm going to approve this X and Y dimensions. Once I'm going to click OK, After Effects is going to bring us back into the composition panel, which means that we can now close this triangle and also say good bye to the tracker panel, as well as close the layer panel just to clean up the interface.
Now just to verify that everything works according to my plan, I'm going to select only the tracking data and press U in order to see that we sure have keyframes for both the position and the rotation. So I'm going to go to the beginning of this comp enable the 3D building, and then I'm just going to parent this 3D building to the tracking data. And now, if I'm going to press space bar, those buildings are going to go with the information that we've just tracked.
So this is the first stage. Now we actually want to create some sort of a traveling matte or actually to replace the sky with those buildings. Now obviously we can add some clouds in the background if you want to make it more pretty, but I do like this bleach bypass look and I'm even going to exaggerate it at the end. For now, I'm just going to select the 3D building and I'm going to collapse this tracking data information and then I'm going to go under effect and I'm going to add the camera lens blur effect.
Just in order to create some sort of a blur in order to match the background. I found that the value of eight in the blur radius works quite nicely in this example and I also want to apply additional color correction to this layer, just to make sure that it will look as if it is in the background. So I'm going to go back to the effect menu and from the color correction category I'm going to apply the curves effect and then I'm just going to take the middle gavel point and take it somewhere over here maybe like so, just in order to match the colors and the brightness that I'm seeing behind.
So, this is a good starting point and now we need to extract only the girl so she will be in front of the buildings. M going to select the girl footage and I'm going to press Command D on the Mac, Control D on the PC in order to duplicate another copy. Then I'm going to take it and place it above the 3D building. Now there are a couple of ways to handle this key in After Effects. What I would like to show you is an effect under the color correction, and the name is, of course, Colorama.
Now when you first apply it, it will create some sort of a psychedelic look to your footage. This effect performs advanced color manipulation, based on the input and output cycle. So in this case, I will leave the input phase alone but I will change the output cycle. I'll start by using one of the presets. So I'm going to choose the ramp gray effect, which is going to map all the colors and create some sort of a gray scale image. Now the advantage here is that we can add more colors and basically manipulate them across the scene.
So if I'm for example going to click over here I will be promoted with this system color picker and I'm going to choose a black color and say OK. And now you can see that I can actually move this triangle in order to define the matte that I need. And by matte I mean an alpha channel, or a transparency that I'm going to use in order to expose the building, which are now underneath. So I'm thinking that something like this should work quite nicely.
I see that I have good definitions, but due to the blurriness of the background, I think that I'm going to apply under the blur and sharpen category, the fast blur effect. Actually, the fast box blur effect, this is the full name of it. And I'm going to start to play with the blur. Let's go with a value of four and make sure to repeat the edge pixels so the blur will render outside of the frame. I'm also going to hide the tracking data for a moment, so this null will not be in our way.
Alright, I think that we are ready to move to the next step, which is to select the 3D building png and then in the modes and track matte column, I'm going to use one of the luma matte options, because what I've created is basically a gray scale image. If you have some sort of an alpha channel then you can use one of those. In this case, I'm going to choose luma matte and this is going to use the pixels that we've created in order to cut a hole or a transparency in the building footage and create this very convincing composite.
Now in order to really sell the effect, I'm going to go to the layer menu and I'm going to create a new adjustment layer, above everything, and then I'm going to apply once again the curves effect. Here, I'm going to create for all the channels the RGB, some sort of a contrast curve. So I'm just going to raise this guy over here and another point over here. Now I want to switch to the red channel, so I'm going to hold down Command on the Mac, Control on the PC and press one.
This will allow me to treat this channel individually and then I'm going to press Command or Control three in order to only operate on the blue channel just to create some sort of a blue feel for the whole thing and then in order to create some sort of a bleach bypass effect, I'm going to go back to the effect menu and under color correction, I'm going to apply brightness and contrast and in this case I found out that if I'm going to reduce the brightness to a negative value of 50 and then add 50 values for the contrast, I'm actually getting the desired result and so I'm going to put it in full frame, press space bar and we can see how everything is being combined together.
So, this is it. A quick way to create transparency, using a custom track matte all made possible with the help of the Colorama effect that can manipulate colors in a very unique way which in this scenario really works well. So I hope you learn something new and I'll see you again in the next episode.