From the course: After Effects Guru: Keying with Keylight

Inside Mask - After Effects Tutorial

From the course: After Effects Guru: Keying with Keylight

Start my 1-month free trial

Inside Mask

- Masks are super necessary in keying. We use masks so that we can isolate the green color from other parts of the background. We also use masks for when we want to keep something green, even though we are keying the green color. When we need to narrow the part of the video that is green with a subject, those masks are known as garbage masks, or outside masks. If, however, we are using the mask to keep something from being affected by the key, this mask is called inside mask. Go ahead and open Composition 4.1 Inside Mask. Now, let's go ahead and apply keylight to the top clip. Select and go to effect, keylight, and select a matte, change this view to a status view, change the screen gain just a little bit, change the screen balance, only a tad, and if your colors don't look like mine, that is perfectly okay, it really depends on which screen color you chose. Now, let's go ahead and change this view to a final result, and you can see that what was green here on his shirt also turned transparent. Now, we are going to fix that, and we do that with masks. Let's go ahead and finish this key a little bit better. We have not chosen any kind of despill here, so let's go ahead and choose the despill bias, and click on his face. As soon as we do that, we see that the shirt turns a little bit off, so maybe for this one, we want to not lock the biases together. I'll select his face again for the despill bias, and now for the alpha bias, I'm going to select somewhere around this green here, and that helps a little bit the tonality of the shirt, and the face, and all of that. Don't forget that there is a section here for foreground color correction, which we are going to be using, as well. Let's adjust now the screen matte, and for that we're going to change the value to a screen matte, and actually that's pretty good right there. So I don't really need to do that. The softness, and the screen shrink and grow, we're going to do that while looking at the final result, and, of course, zooming in, and yes, there's a little edge here around the shirt, and all of that, so I think I'm going to shrink this edge a little bit. Somewhere around yay, remember again, it depends on which color you chose and all of that, so each and every time you do this it's going to be a little bit differently, and I'm going to make it a little bit soft, maybe around 1.9 or so. Now that the key is a little bit better, let's zoom out and add a mask around this part here on the young man's chest. So for that I'm going to select at the clip, grab the pen tool, and now I'm going to click to select that part. So just click, click, click, click, and click to close it, and then, of course, the default of the mask is going to be to keep anything that is inside of it, and make everything else transparent. We don't want that, in fact, we only want for keylight itself to control the mask. So we're going to change this opacity value for the mask here in the timeline to none. And then of course the boy comes back. Go ahead and expand the inside mask section and the dropdown menu to the right of the words, inside mask go ahead and click there and choose Mask 1. As you can see, now we have that green, and everything else is keyed properly. If you choose to invert this, this is pretty self-explanatory, that means that it's going to keep from the source footage the inverse of the mask. So it's going to exclude from the key everything that is not inside of the mask, of course that's not what we want to do, so we deselect invert, and the softness of the mask is self-explanatory. Sometimes you do need to change the softness, but not in this case. This is so much inside of the matte, that we don't need to soften the edges of this mask one bit. So let me change that value back to zero. You're going to see a couple of other options in here that most people hardly ever use. The first one is replace method. If we had to bring some of the original color of the foreground in, we could use this. So what do I mean by that? Well, what I mean simply is this, if I had run the despill, which I did, and it had changed these values tremendously, then I would see a shift in the color of the pixels between what is inside of the mask and what is not, because this replace method is bringing me back to the source footage, not the despilled one. So I can change this to any of these values, it could be none, in which case I get nothing here. Source, which is the default. Hard color, which is going to do a blend, a hard color blend between the original pixels that I had and the ones that are despilled, or soft color. Soft color is really what we use most of the time when we want to bring back pixels that were rendered semi-transparent, say on a face or anything like that, but in this case, we really want to keep the green color, so source is what we need. The next section that we have here is the source alpha. This parameter determines how to deal with any embedded alpha in the original image. You have several choices here, you have ignore, which does nothing, it will not use any embedded alpha in the key. You have add to inside mask, the embedded alpha is added to the inside mask. And then you have normal, which is the default value, the embedded alpha is used to key the layer as normal. So how would you use this? Well, let's imagine we need to increase the screen balance of the clip to a huge value, for whatever reason. So, let's go ahead and change this to the screen matte, and change the screen balance to a lot, say something like this. If I go back to the final result, and I change maybe the screen gain, a little bit more, you can see how the transparency of these pixels is not working great. Let's go ahead and see the screen matte. You can see that some semi-transparency was introduced here, etc., etc. Well now change this view to an intermediate result and duplicate keylight. To duplicate the effect, all you have to do is select it and use control-d on Windows, command-d on the Mac, and that duplicates the effect. Now we have two different keylight effects that were applied to this one clip. Now let's go ahead and change, under inside mask, the value of the source alpha to add to inside mask, and you can see how immediately we have a super clean key. We do this for when we are introducing transparency, where we don't want any, and now we need to work on the edges of the clip. Now I can use the second version of the keylight to work on the edges of this matte.

Contents