Join Eran Stern for an in-depth discussion in this video Keying smoke and water, part of After Effects Tips and Techniques: Compositing and Effects.
- One of my favorite keying effect in this software is Extract. The Extract effect creates transparency by keying out specified brightness ranges based on a histogram of a specific channel. It's best used to create transparency in an image shot against a black or white background, or against a background that is dark or bright, but consists of more than one color. I think it deliver a great result, especially when you need to key out smoke or water, some sort of liquid, as well.
I want to share with you two examples for both cases, starting with the smoke, or even better, steam. I already queue up a ram preview of this comp, just going to press zero in order for you to get a sense of what we are actually working with. We got this driver who is stopping by the break and the title, which I've already tracked inside mocha AE, accompanied to this journey. We got a sense of everything moving together.
However, I think it will be more efficient and nice if we can just integrate the smoke and the title better together so it looks like it is living inside the smoke and not behind it. Let's just park over here, at around 5:10, where we have enough steam or smoke on the screen. Then I'm going to select the lower layer, which is the video footage, and I'm going to press command + d, or control + d in the PC, in order to duplicate it, and then just going to move it to the top of the stack.
Now I'm going to go to the Effect menu, and from the Keying category, I'm going to choose the Extract effect. As I mentioned, the Extract is based on this histogram, which measure the shot, and it will allow you to choose one of the channels, either the luminance or the alpha, or, of course, one of the RGB channels, in order to create the transparency. In this case, we need to actually play with the graph over here. We have a couple of dots in the beginning and in the end of this screen.
I'm just going to drag it so you will be able to see the whole histogram. This is very important. You need to make sure that you are seeing everything. And then I'm just going to drag the top square until it reaches, more or less, the end of the histogram, meaning that I can see all of my text. All of the text is being visible right now. Then I can choose the lower square here, which determine the softness. When I'm going to select and move this, and I'm going to do it until the end of the graph, you can see that I'm creating semi-transparent pixels.
Now, this effect is far more advanced than the luma key effect, because the luma key only works on the luminance channel and it's also going to limit the amount of softness that you can use. Here, in this case, I can actually drag the softness as much as I need. But, as I suggested, I'm going to, usually, stop here at the end of the histogram. Now, I'm just going to scub the timeline to get a sense of what I have managed to achieve just using this simple slider.
In this case, you may want to play with it a little bit more in order to determine which one of the channels is actually giving you the best results. I'm going to choose the red, for example, and I'm going to take a look at it, the result. I'm judging by the eye, by the way. This is the green, and this is the blue. In this case, the blue is giving me, I think, the best results out of the three. I'm just going to lower the softness, to maybe around 80 or 70, somewhere along those lines.
I just want to make sure that it will indeed include the smoke, but the title is still going to be visible. So we're not going to get a semi-transparent pixels in the title itself. Now, I just want to show you the difference between what we are seeing over here, where the title looks like it's in the middle of the steam, and, if I'm going to turn the eye of the effect off, this is how it was before. Now, just to demonstrate that this is not a one-trick pony, I'm going to go back to the Project panel, and I have another composition over here named Waterfall.
Let's just open it up, and once again, I'm going to press zero in order for a quick ram preview to be generated. As before, I already prepared a title, and I've already tracked it, this time using the built-in motion tracker inside After Effects. Let's repeat the same steps. First, I'm just going to look for a place where I want to start my work, somewhere around here. In this case, it doesn't really matter. Then I'm going to select the lower layer, which is the video footage itself, and I'm going to press command + d again to duplicate and place another copy above everything.
Let's go to the Effect menu. Since this is the last effect that I've used, I'm just going to apply it once again. Now, it's going to be the same steps, so let's just take the upper square and start to move it until we see the title in its full glory, meaning that we are not seeing holes in the title, in the alpha channel. I'm looking, by the way, on the area over here, where the m and the y are meeting. I may want to actually push it just a touch.
Now, I've noticed that there are a couple of drops that are hanging by over here, so it may look fine. Now, let's start to drag the lower square, which will add the softness and introduce semi-transparent pixels instead of just a binary key which consists of zero or one, meaning they are transparent or opaque pixels. And then, of course, let's just look at the other channels. This is how the red is looking, and you can see a little bit of holes here and there.
This is not a good candidate. Let's look at the green one. This looks a little bit better. And I'm going to examine the blue, as well. As before, the blue, in this case, give me the best result. Now, if you are still feeling that there are a couple of holes inside, you can go ahead and move the upper square just a touch to the right. Since, in this case, we are keying the white information, then we are choosing the left squares. If it was the opposite, if you want to key out the black pixels, then you will work the other way around.
In any case, let's just look at the alpha channel by soloing this clip. I'm just going to scrub, just in order to see that, indeed, we are getting a very nice, transparent waterfall effect. Combining both of them together, here is the final ram preview. You can see that we've managed to key out very easily both the water and the smoke. Next time you have a smoke or water footage which was shot against a dark or bright background, give the Extract effect a try.
It's superior to the old luma key effect, and offer extra softness details, and also will help you to choose which channel is going to deliver the best results.
- Compositing tricks
- Handling tricky keys
- Matching shutter phase
- Removing banding
- Matching color
- Adding an illusion of depth
- Watermarking shots