If you’ve ever worked with green screen footage, then you know that keying out green screen footage containing yellow elements can sometimes be difficult. A lot of times, the yellow areas in your key will end up a brownish-red:
I have a technique that I’d like to share that usually turns up excellent results. Here’s a before and after screenshot of the footage:
Keying out Green Screen Footage containing Yellow Elements
Adobe After Effects has a great built-in plugin called Keylight for keying green screen.
Import your footage into After Effects, then drag it to the Create New Composition button to create a composition:
Instead of keying out the footage using just Keylight, we are going to use a track matte of the original footage. So start by duplicating your footage layer so that you have two copies:
Hide the bottom layer footage and select the top layer. Keylight works best by getting the most even color to work with. Since we are dealing with yellow in our green screen, we are essentially going to turn it into a blue screen. This will yield better results in the end. First apply a Hue/Saturation effect and adjust the Hue, Saturation and Lightness until you have something similar to the below settings:
Add the Keylight effect and use the eyedropper (Screen Colour) to grab the blue color from the background. This will take out the blue. Change the View to Screen Matte and adjust Screen Gain, Clip Black and Clip White until you have a nice matte of your subject:
Now hide the top layer and show the bottom layer. select Luma as the track matte for the bottom layer:
Mask out Unused Portions of Footage
Now that we have a nice cutout of our subject, you’ll notice a couple things. We have some green “spill” outlining our subject, and you may have some splotches of green in the corners:
It really depends on the lighting conditions used during the green screen shoot. It may be better or worse. To get rid of splotches of green in the corners, simply add a mask to your footage. The easiest way to do this is to just double click the rectangle tool. This will add a layer mask to the layer you have selected. Adjust your mask so that you have enough room around your subject so as to not cut him/her off. If they move too far to the left or right, you can always animate your mask as needed:
Removing Green Spill
We are going to remove the unwanted green spill with the Advanced Spill Suppressor. Add this effect to your layer, then change the method to Ultra. Twirl down the Ultra Settings. We need to select the original green screen color used in the original footage. If you change your track matte back to “None” and then disable the Advanced Spill Suppressor, you’ll see your original green footage in the comp window. Use the eyedropper (Key Color) to select a mid-range green color. Turn your track matte back to Luma and turn Advanced Spill Suppressor back on. You may need to play with the Tolerance a bit, in order to get the desired outcome. You can also adjust the other settings to get a nice key:
For the final step, you may want to touch up your footage by adjusting levels. Add the Levels effect and switch between the Red, Green and Blue channels and play with the sliders until your footage looks final.
That’s it! You should now have a nice key, without the reddish color that you would normally get by doing a standard Keylight effect to your green footage. If you have any questions about anything, feel free to let me know here. Here’s the final result: