Color keying problems
Hello, I have a sequence where a girl walks by a bunch of picture frames, we used green paper inside these frames so they we could key it out and insert little movies into the picture frames behind her.
Color keying is not working out very well, even when I use like 20-30 color keys. Suggestions, advice, help please!
Here is a screen shot:
Is that what your shot REALLY looks like? It's terribly underexposed. I'm not surprised you're having problems: that's God-awful-looking video.
You didn't even give yourself a fighting chance to pull a key. Put that shot in the scrap heap!
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA
The shot may be dark, but it's salvageable.
You'll need to color correct first to bring up levels to a keyable state. Use a brightness / contrast effect and also boost the saturation. Once that's done, then you should be able to get a decent key. After you get your key, then you can return to your previous color levels.
Okay, you CAN salvage the shot if you have no other choice, but it won't be easy, it won't be fast and it won't be fun: rotoscoping. The painful, painstaking, old-fashioned kind of rotoscoping, because that shot is too crummy for AE's Rotobrush feature to help.
Look in AE's online help, and use the search term rotoscoping. It'll bring up information on rotoscoping resources.
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA
The light on the green paper is low and uneven, some of it even looks red. That's no good for chroma keying.
In the future I would highly recommend testing any method you're not familiar with before you go shoot.
As you now know: green isn't a magic color. It's hard to key from it without careful planning and proper execution.
In the case of your offending shot I would've tried putting white paper into the frames instead, throwing the videos on top in the Multiply blend mode and then creating a matte for the person in the foreground.
You can still do this, you don't need to key the green. Corner pin track the footage to the frames and mask it roughly. The benefit of the Multiply mode on a white page is that all of the shadows/lighting is preserved, in your case you'll have to try and recreate that after the fact.
Thank you sir. I really just wanted the red sweater and the picture frames to stand out, which is why I kept it so underexposed. I should have just done the underexposing in post, but this was my first attempt at green screening something that wasn't just some dude in front of a green screen with a three point lighting system. I appreciate you and everyone else's contributions to my dilemma and I have def learned a lot. I love Creative Cow, this has taken my stress level down a notch or two. Thank you again everyone!
DEVIN: "I really just wanted the red sweater and the picture frames to stand out, which is why I kept it so underexposed. I should have just done the underexposing in post,"
When you are capturing images that will require later work such as compositing, you want to capture with an eye toward maintaining detail, and minimizing noise.
With that in mind, expose your images so that you are using the available "image space" to best effect, meaning using the available latitude of the media. Increase exposure just below where you wold clip highlights (clipping will lose detail), and in some cases, reduce contrast so that you improve detail in the darker areas.
Ideally, you want your histogram "filled" from left to right with image data, but with no image data being clipped of the left or right side. This will give you the greatest flexibility in post.
Caveat: When using 8 bit media, pushing this idea too far can result in other artifacts such as banding and related delta-E errors.
Don't use the "color key" plug in.
Use Keylight - it's included in AE. I have a quick sample below, and a further discussion of how to improve the key. But first:
WHY USE GREEN?
I want to say for the record that green screen is not a cure-all for key and matte purposes. As far as I can tell in this present shot, there is no hair or semi transparent objects that would benefit from a green screen key, and the objects that you are keying (the frames) are so small, that you can easily do a simple animated mask as the foreground object passes each one.
Unless the camera is locked, you need to do a planar track of each picture anyway, and except for the foreground object passing in front there is no benefit to using green, since you might as well just do a corner pin for each. No keying needed.
In otherwords: it may have been more trouble to put green in the frames than you would save through keying instead of masking. (Judging by your simple foreground element of a person in a red hoodie).
Simple corner-pin-type tracked layers, with traveling masks to key the foreground red coat will give you the cleanest result for this shot, as it is presently shot (due largely to noise and lack of color channel separate, which I discuss below).
LETS TALK ABOUT ALTERNATIVES TO GREEN:
The noise in this image looks like you shot on a camera with a high level of compression. The greater the noise/compression artifacts, the more challenging it will be to make a green key. So sometimes it is worth considering alternatives to green. (If I could get a sample of your camera original, I could provide better analysis).
Green is not the only valid choice here. Flocked black could work in some cases, white can work in some cases.
Flocked black (dense velvet or duv that reflects no light) are good if you have glass on top and you want to retain the reflections. You can cornerpin/mask and ADD the images that go into the frames, and the reflections remain naturally. You may need to use traveling masks to matte the foreground element, though in some cases you can use a Luma key with a combination of garbage masks - again, depending on the shot.
If instead of reflections you want to retain shadows over the images from other object in the scene, then you could use WHITE screen instead of flock black, and then you would use MULTIPLY to place the images in the frames, and the shadows and relative scene lighting on the white screen would be retained.
Now, there are certainly plenty of good reasons to use green - especially if you have a foreground object with complex edges (i.e. hair) that is hard to manually mask.
But if you choose green, there are parameters that you need to stay within for successful keying.
NOW LET'S DISCUSS YOUR SHOT, AS SHOT:
It is not that your green screens are too dark per se - it is a common misconception that a green screen must be "bright". Actually, a green screen can be two stops UNDER meter for a scene that is being exposed at meter (i.e. green screen can be in zone 3 - so if you spot meter an 18% grey card and expose it in zone 5, then spot meter on the green screen can be two stops below).
This also assumes, however, that your camera and the compression used on the footage, is noise free enough (it certainly isn't in the example shot you posted).
As a general rule, if you want your scene dark, you should still shoot it brighter (so long as you don't blow highlights), and then bring it down in post. This will help to eliminate noise issues and maintain detail in the darker areas. This is particularly important when shooting on dSLRs and cheaper camcorders that record to a highly compressed 8 bit file.
The biggest problem you are facing here with your shot is the extreme noise in the green screens due to the low exposure level.
Incidentally, it is a mistake to attempt to color correct a plate before keying - i.e. do NOT put levels or curves in before Keylight. In most cases, Keylight (pr primatte) should be the first plug-in.
The other important aspect is the separation of green from the red and blue channels. This is why proper narrowband green needs to be used in the screen material. You can't just stick any old green paper or whatnot in for a green screen and expect good results.
The green paper you used isn't all that green. If you examine it in linear colorspace, you will see that the GREEN channel is only about one stop brighter than the RED and BLUE channel.
See that your green channel is less than twice as bright as the other two, i.e. the green is less than a stop brighter than red and green.
Here are some real world examples of want to see in a green screen. In the first two cases, the green screen is exposed at meter (i.e. a spot meter reading of the screen is equal to a spot reading of an 18% grey card). In the third example, the screen is exposed 1 stop under meter, and in the fourth, it is 2 stops under. (Note that as a general rule for practical reasons (such as noise), you typically don't want the darkest useable portion of the screen much darker than -2 stops. This can be important when there are cast shadows you want to preserve and avoid noise.)
In these examples, the green channel is three to 4 stops brighter than the next brightest channel, and more than 6 stops brighter than the darkest channel.
But in your case, your green paper element is not narrow band, with less than a stop of separation. If you are looking for a paper product, try something that is "florescent green" as a way to get a very narrow band of light reflection.
TIP: You can test for the bandwidth of a particular color by taking a full screen image of it with a dSLR and then looking at the RGB histogram in the camera. You want to see both the red and blue spikes far to the left of the green spike, with as much distance between the green, and the red/blue as possible. Take your camera to the art store when choosing the color, and check with the camera (place the paper sample under a light source type similar to your shooting setup).
Thus with your shot, exposing it brighter (to reduce noise), and using a more narrowband green element, should solve your issues.
Regardless, don't use the "color key" plug in. Use Keylight or Primatte:
Here's a rough key after spending about a minute using Keylight:
Now, if this were on your QT file, and not a still, you would probably see crawling noise at the edges of the picture frames due to the noise in the element.
If I received this "as a shot to do", I would probably not use the green for a key at all, and just comp over the green with the images, then use animated masks for the foreground person passing by.