Digital compositing may very well be the single most useful special effect of all-time. With the magic of the blue-screen, you can put your actors into any scene imaginable, from ancient Rome to exotic alien planets. A movie like Gladiator would not have been possible without blue-screen techniques. With digital video and a PC, you can emulate the effects of the Hollywood pros.
However, if you’re not careful, you can also get horrible results from blue-screening. Due to the way digital video is compressed, you can get "jaggies" or "halos" around your actors a dead giveaway. These are the blue-screen blues, and this article will explore some techniques to overcome the problems associated with keying DV.
How Hollywood Fakes Us Out
The blue-screen process was originally developed for film as a flexible and precise method for compositing live action over a background plate. It quickly became the preferred technique, and has since been co-opted by the video and computer worlds, where it is often referred to as chromakey.
Why blue? The color got its origin in film. It all came down to a specific film chemistry that depended on an exact-temperature blue color.
Here’s how it works: first, a camera operator films actors against a blue screen. Then, with a little darkroom wizardry, a background screen replaces the areas that are blue, dropping the actors into any world desired.
The process is basically the same with analog and digital video. With film, the process is chemical, with analog video, it’s electronic and with digital video, it is algorithmic. Of the three, algorithmic is most flexible.
Not bound by the specifics of film chemistry, video keys can be any color you want. This is ideally a screen color that contrasts with the foreground. Your job is to separate these two elements, so they should be as dissimilar as possible.
The Problem with DV Keys
Digital Video is a dream come true. The precision of digital data is unparalleled and allows copying over and over again with practically perfect fidelity. This is vastly superior to analog, which loses resolution with each duplication. Since compositing requires at least one copy (and often more), this aspect of digital video is critical.
However, in order to squeeze so much digital information onto a tape, some trade-offs were necessary. In particular, in keeping with a long tradition in video, the color information was sacrificed at the altar of compression. The color component of a Mini DV image is actually composed of blocks, each four pixels wide. The color is the same for each of the four pixels in a block. This is surprisingly poor resolution, on the order of 180 blocks per line. However, it still manages to fool the eye. Even though the color resolution is low, the intensity resolution is high, about 720 pixels per line. Psychologically, this works pretty well. The eye depends much more on the intensity than the color to recognize an image.
Because there’s just too much information in a frame of digital video to squeeze onto standard videotape, the intensity, or luminance of each pixel is recorded just as it is received by the camera, but the color information is shared by neighboring pixels.
Since luminance is not a part of the RGB signal, a new encoding method came about. It’s called, with typical engineering clarity, YUV. Y stands for luminance, U is Y minus the red signal and V is Y minus blue. U and V together constitute the color, or chrominance, part of the signal.
The relative amount of each component of the signal represents a three-way ratio, like 4:2:2, the sampling ratio for pro Digital Video. These numbers correspond to the YUV triplet, and indicate that the luminance samples at twice the rate that the U and V components are.
The sampling rate for consumer digital video is only 4:1:1, which has four times as much luminance info as chrominance info. That means four neighboring pixels share the same chrominance, which saves on data, but smears out the color.
When you start to use chromakey, this becomes a big problem. The color from your blue-screen will start to seep into your foreground subject. Since these are four-pixel blocks, they can be easy to spot. They create a wide staircase effect that, like all good monsters, goes by several names, including "aliasing," "jaggies," "staircasing" and "halo." There are other names for this annoying phenomenon, but we can’t print them in a family magazine.
What’s worse is that these artifacts shift and shimmer with each frame, further drawing attention to themselves.
You now understand why your DV keys look crummy. As they say in those 12-step programs, recognizing that you have a problem is the first step towards recovery. The good news is that your chromakeys are not doomed to always look terrible. The following workarounds offer a number of solutions for the blue-screen blues.
Unlike Mini DV, analog video doesn’t compress the signal, so it chromakeys quite well. Professional DV has twice the resolution of consumer equipment, so it also does a good job. This isn’t the best answer if all you have is DV equipment. But don’t despair, there are several more solutions.
Blue has a couple of advantages: it contrasts well with warm skin tones and it works well for compositing against water or sky any blue jaggies will fade right in. However, if you’re compositing against a red sunset, you may see the dreaded blue halo around your actors. In this situation, you might try a purple screen and a yellow backlight. Purple still provides contrast with the foreground, but blends much better with the background.
It’s very important to have even illumination across the screen. If you don’t, your life will be complicated. Nevertheless, there are ways to beat this problem, too. Using a program like Adobe After Effects, draw a rough mask that crops out as much of the background as possible. This loose mask is called a garbage matte. If the actors are moving, you may need to create a moving garbage matte, by dragging it around as you go through the frames. The garbage matte can eliminate a lot of your blues, right off the bat.
Instead of selecting a single color value, Premiere and After Effects let you select a range of colors close to a given hue. Be careful not to set the range too high, or you will start to lose pixels you want, especially around the edges. If you’ve still got the blues, you can save your current video as "pass one," then run it through the chroma select again. This time, choose another range of colors to eliminate. You can do this as long as your patience holds out. Don’t forget to save all your video in a lossless format or you will start to accumulate enough compression artifacts to turn your entire frame into a garbage matte.
Programs like Adobe After Effects have tools that let you feather the edges of your blue-screen mask. After Effects also lets you thin out the edge around your actors. These two techniques go a long way toward creating a smooth, convincing matte, and in most cases will cure the worst case of the jaggies.
This is probably the cheapest and most effective technique. Because a black screen affects the luminance, not the chroma channel, it is referred to as luma-keying. Since the luminance has four times the resolution of the color channels, you can get much better mattes.
For the best results, get high-quality black velvet. The good stuff is remarkably dark. The main pitfall with this method is that dark eyes, pupils and deep shadows may drop out. You may need to create a black garbage matte in-between the foreground and the background to force the eyes to stay black.
You Hold the Key
Now that you know how to get around the problems with DV chromakey, go out and dazzle your audience. There are thousands of strange and beautiful worlds available where your actors can really ham it up. Place your talent on a ship, flying through the air, or even in the Oval Office of the White House. You now have the key!