ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Advanced Keying

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jason DreyAdvanced Keying
by on Mar 8, 2010 at 3:13:24 am


I am trying to key out a makeshift green room that I and some fellow students constructed with green screens. We are going for a similar effect as the Mac commercials, but keying out the green is proving to be quite difficult.

I'm wondering if anyone can give me any tips on how to key this out.

Here is the setup without a subject:

And here is the setup with a subject:

I have been able to key out everything but the subject very cleanly, I just haven't been able to do so while retaining the shadows on the floor. I think what I may need to do is run two entirely separate keying jobs on the top and bottom of the scene, one on the background and one on the floor, and adjust the one on the floor to keep the shadows. The problem is that a gradient exists from the right side of the set to the left, and some of the shadows on the right are brighter than the lit areas to the left.

Is this keying possible with Keylight or can someone recommend something else?

My camera didn't move throughout the recording- is it possible to tell Keylight to factor in the odd lighting on the set? Or is this possible with another extension? I'm wondering if I can kind of "zero" the screen in the sense of setting a control from before the subject is on stage, and then looking at the differences.

Thank you for any tips you have to offer. I've not done any keying before, so I guess I'm kind of lost as to how to go about achieving this effect.

Thank you very much,

Return to posts index

Michael SzalapskiRe: Advanced Keying
by on Mar 8, 2010 at 3:09:41 pm

The shadows on the floor aren't that great anyway. Why not just fake some shadows by duplicating the keyed out guy, filling it with black, distorting it, lowering the opacity and blurring it to make your shadows.
Heck, just a solid feathered mask at a low opacity would do it. If you're copying the Mac vs. PC ads, you don't want very distinct shadows; you just want a soft, subtle shadow to visually place your guy on a floor (rather than floating in white space).

However, if you want to keep those shadows, keep in mind that most professional keying jobs use several different layers keyed several different ways. There's a key for the hair, a key for the main body, a key for any tricky items of clothing, etc. So don't think you need to limit yourself to one layer or one keying plugin.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.

Return to posts index

Lee WarnerRe: Advanced Keying
by on Mar 8, 2010 at 3:13:45 pm

Make a copy of your keyed actor. Turn it 3D, add black fill, blur, play with opacity. Move the anchor point to the feet and then rotate and position it where you want your shadow to be. You may have to create a feathered mask at the feet of the shadow to make it work better.

CTV Calgary

Return to posts index

Joey ForemanRe: Advanced Keying
by on Mar 8, 2010 at 3:40:54 pm

This isn't a very tough key.

I duplicated the layer and applied Keylight to both. One for a Core Matte and one for an Edge Matte. Both are set to Combined Matte, with the top layer (core) set to Add. These two are precomposed and set as a Luma Matte for the unkeyed original layer.

For the Core Matte, in the Screen Matte controls, crank down the Clip Black and Clip White controls until all the green is gone from around the subject, and the body is fully matted with no holes. In Combined Matte this will be a fully white matte for the body surrounded by full black. There will be no edge detail. Then use Screen Shrink to choke this in.

For the Edge Matte, I just cranked down the Clip Black until the green around the subject was gone. The matte is full of holes, but that's what the underlying Core Matte takes care of.

This method bypasses Keylight's Spill Suppresion, so you might need to add AE's Spill Supressor afterwards. Your subject was at a good distance from the greenscreen, so it doesn't look like you have much spill anyway.

Follow this up with a simple rectangular garbage matte (mask) around the subject on the base layer.

I suggest just keying out the shadow completely, because his is so faint.
With some work you can add a realistic shadow, or use a 3rd party plugin like Red Giant Warp.

Return to posts index

Jason DreyRe: Advanced Keying
by on Mar 8, 2010 at 5:10:25 pm

Great post, thank you very much- your method is working very well.

I will try faux shadows; I've not looked into warp before, but that may be an option.

Thank you for your help!


Return to posts index

Larry S. Evans IIRe: Advanced Keying
by on Mar 8, 2010 at 4:42:31 pm

There are a number of approaches to this, but as most folks have said, it's not really that complicated. All the other advice is valid and I think you'll find some combination of what everyone has suggested will solve your problem. I'll add that to avoid these issues in the future, you should make the following adjustments or changes to your greenscreen rig.

1. Light the rig separate from your talent. I have two sets of lights when I shoot greenscreen, one is either even or behind the talent when practical, and lights the screen as flatly as possible. The other is used for dramatic lighting of the subject to include the creation of ground shadows if required. You'll find this minimizes spill (particularly on white wardrobes) and makes pulling the key a lot simpler. This isn't perfect, mind you, and you may still have to create a faux shadow. But it will be better than what you've put together

2. Eliminate wrinkles and seams in the background where possible. The most egregious one you have is the one between the wall drape and floor. Unless you intend to create a "wall" space in the key, the conventional method of hanging these screens is to have them curve gently on the bottom and form part or all of the floor drape. If you need a wider space, consider using two drapes with their long sides running vertically to eliminate the wall seam.

As for wrinkles, if you are mounting over a frame you can stretch out the majority by wrapping the fabric and securing it with simple spring clamps (I bought mine at a 99-cent discount place-nothing fancy and if they break or get lost, you aren't out a lot of cash). If you're mounting up against a wall, some double stick tape will do similar service, just make sure you're careful taking it off to not harm the wall finish. You don't have to make the screen drum-head tight (you can if your rig supports that), you just need to eliminate any larger sags and wrinkles.

3. Frame your shot to minimize the amount of keying, and use a mask to "chop" off unneeded areas. Based on the idea of this being like the Mac commercials, we can presume two people in the space and standing withing the green area on the floor. So you've got this framed fairly tightly for that, and that's good. Just remember that with greenscreen work, a shot as tight on your actors as possible will give you a better master to composite, because you are getting more useful pixels on the tape or hard drive. If your actors are filling 80% of the frame, that's twice as many pixels as if they are only on 40%. Even if you know in the final composite that they'll be roughly 40% of frame, you will benefit from the extra data of having them close in frame to start with. You can't create that data if you don't have it, but you can always "throw it away" to make the figures appear smaller or more distant.

Otherwise if there are areas of the studio, rig, lights, mic booms, etc. that are in shot but never get crossed by an actor, the easiest way to handle them is just to create a static mask or series of masks in After Effects to clip them off completely before you even start the keying process. The less you have to eliminate with the key, the tighter (and hopefully cleaner) you key's color/luminance range becomes.

Good luck with your project. Greenscreen and keying open up enormous vistas for creative work. There are some simple essentials that are required, and after that it's a matter of practice in setting up lights, camera, and getting the actors to work in the space. -R

Larry S. Evans II

Executive Producer

Digital I Productions

Return to posts index

Jason DreyRe: Advanced Keying
by on Mar 8, 2010 at 5:18:16 pm

Wow, thank you for this thoughtful post.

We will certainly use these tips if we do any more filming. It's just too bad I didn't realize what kind of difficulties I would be having- I could have lit the rig to get more useful shadows.

Again, thank you for this post, it has certainly taught me, and hopefully other beginners will find it useful.


How to light a green screen rig
How to set up a green screen rig
Tips for green screens and keying

Return to posts index

Jeremy AllenRe: Advanced Keying
by on Mar 8, 2010 at 10:02:59 pm

In addition to Larry's #3 tip on framing... to get a little more resolution, you can turn your camera sideways and fill as much of the frame as possible.

8core MacPro, 3.0 GHZ, 10GB RAM, OSX 10.5.6

C4D 11.5
FCP 6.0.1

Return to posts index

Jason DreyRe: Advanced Keying
by on Mar 9, 2010 at 1:39:32 am

Thanks for the tip.

Along the same line- I'm getting it keyed out nicely now, but it seems like the shadows on the arms and around the armpits are still a little dark, and it is not very realistic looking- does anyone have any tips on getting the shadows on the subject to work with the white background?


Return to posts index

Larry S. Evans IIRe: Advanced Keying
by on Mar 9, 2010 at 2:19:26 pm

Probably the best way to handle that is to use Effects>Adjust Colors> Curves on the layer, and bring the lower end of the main curve upward just a bit. You can also try adjusting each of the Red, Green, and Blue curves independently until your color seems to work best with the "white void". Based on what I'm seeing in your sample pulling the green out just a bit (i.e. raising the upper to middle end of the green curve)may give you a more neutral image, as you appear to be getting a lot of green spill on the subject. -R

Larry S. Evans II

Executive Producer

Digital I Productions

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved