Finding multi-layer composited video on TV these days is about as tough as finding bark in a forest. Show openings, newscasts, commercials even the basic content from whole networks such as CNN are awash in keys, alpha channel tricks and mattes.
You say you want to do some of that cool multi-layer stuff? Don’t despair, we hear you. And the good news is that today’s nonlinear editors make multi-layer work easy. Well, fairly easy, anyhow.
Compositing Anyone?
Compositing is really just a fancy term for building a single scene out of multiple layers. If you’ve ever added titles to a video, you’ve composited.
In order to create layers of video, you need a way to tell your editing software which parts of which images should be seen, which parts should be hidden, and whether any underlying layer(s) should show through. There are a lot of closely related ways to accomplish this, but three of the most common techniques involve the use of keys, alpha channels and mattes.
Keys
Nearly everyone has seen the effect of color or chromakeying, as TV stations have keyed weather reporters in front of weather maps for years.
The talent actually stands in front of a large, evenly lit solid-colored screen, and a second video source, the weather map, electronically replaces that color. We call this effect "color keying." While networks could use any color, they most commonly choose blue or green.
Uniformity of color is a necessity, so it’s important to evenly light color-key backgrounds. If a part of the screen is in shadow, its color (at least as recorded by the camera) might not be consistent enough for the color keying software to accurately replace it.
Color keying is just one type of keying. In fact, any distinct attribute of a group of pixels can be the basis for keying. For example, you can use brightness this is called "luma keying." In the digital world, a pixel with no brightness (black) has a digital luminance value of 0 and one that’s fully bright (white) will have a value of 255.
In luma keying, your compositing software simply makes all the pixels that are above (or below) a certain brightness value, transparent. So, you ask, if luma-keying is so easy, why do the weather folks bother with chromakeying instead of always simply keying on the luma values?
If you were to set up a luma-key shot of a TV personality in front of a white backdrop, things might go fine, right up until the talent starts perspiring. When his shiny forehead catches the key light and reflects back a 100 percent luma level to the video camera — whoops. Your expert suddenly has a hole in his head. This is a bad thing.
Choosing to use a color key, a luma key, or some other compositing approach is a matter of understanding the nature of your scenes and having an idea about what you’re trying to accomplish. And the best way to learn is to try a technique and if you don’t get the results you want, try something else.
Alpha Channels
Now, back to those 255 luminance levels we mentioned earlier between digital full-black and full-white. All the necessary chrominance (color) and luminance (brightness) information for a pixel can be contained within the first 16 bits of data. Therefore, in any 24-bit system (virtually all modern editing rigs), there are an extra 8 bits of data left over for another channel. Someone figured out that we could use the extra 8 bits of data for something beneficial. Thus, the alpha channel was born, but only in specific 24-bit formats. Like a color key, which might be based on information in the green channel, alpha transparency is based on the alpha channel. The only difference is that the alpha channel is invisible.
If you take a graphic and put a black square on the right, a 50-percent gray square in the middle and a white square on the left, and then assign the layer as an alpha channel, the result is that the right-third has no transparency, the mid-third is 50-percent transparent and the left-third is fully transparent. The alpha channel lets you use any gray-scale image as a variable matte providing up to 255 levels of transparency. Every time you see a graphic on TV that seems to trail from fully opaque to transparent, you’re seeing an alpha channel at work.
You’re actually seeing three layers of graphics at work a foreground graphic, a background graphic and an alpha channel matte (or mask) in between determining which parts of foreground will become fully or partially transparent and reveal the background.
In the early days of editing software, building alpha channel mattes was time consuming. Today, in most titling and graphics software packages, it’s an automatic (or at least semi-automatic) function. In fact, you can generate alpha transparency from a chroma or luma key.
Alpha channel mattes are useful in many situations, but they really shine when you apply them to titles. When you see a foreground title with a drop-shadow that fades seamlessly into the background video, it’s nearly always an alpha channel making the edges of the letters fade smoothly into the scene below.
Mattes
Alpha channel composites and keys are just two of the tools used in the creation of video composites. The other typical compositing process involves the creation of mattes.
A video matte is the electronic equivalent of two pieces of construction paper in the hands of a talented child wielding a pair of safety scissors.
If one piece of paper is blue and the other is yellow, little Johnny can simply position the blue on the yellow, or the yellow on the blue. Unless the top paper completely covers the bottom, the result is going to be a blue/yellow composite picture.
If Johnny knows his way around those scissors, he can cut a shape out of the yellow card and place it over the blue, or cut a hole in the blue and position it over the yellow.
If Johnny is really creative, he’ll ask the teacher for more colors of paper and build himself a collage – layers of colored paper stacked and arranged into a pleasing picture. Add a little colored tissue or cellophane scraps and Johnny’s visual construction tool kit can even include partial transparency.
If you transform the construction paper into video signals, you’ve entered the world of electronic mattes and masks. And just as a paper and cellophane collage can consist of any combination of shapes and forms, the possibilities for building electronic mattes are equally infinite. Depending on your editing software, you’ll have a wide variety of convenient matte-generating tools at your disposal.
These include geometric mattes in squares, circles and diamonds, along with customizable shapes, such as four- or eight-point garbage mattes. These are so named because they’re particularly useful as quick and dirty ways to mask out stuff you want to hide in the underlying video. Text and titles, which you can think of as masks shaped like fonts, are variations of a geometric matte.
You can, in fact, make a matte out of anything from static shapes to moving images. And how are mattes and masks created? You guessed it through chromakeying and alpha channels.
Tumbling into the Future
In the early days of computer editing, the legendary Video Toaster software came with some wonderfully funky transitions and wipes, which had seldom been seen before.
One creative transition featured a composite of a gymnast doing a cartwheel across the screen. As she tumbled from side to side, her form revealed the second layer of video. A classic, if pretty silly, traveling matte.
When you dive into the wonderful world of keys, alpha channels and mattes, you’re entering a world totally without creative limits. Have fun!
[Sidebar: Alpha Type]
Perhaps the most valuable use of alpha channel techniques is when you composite type over video. Because of the curved and angular shape of many letter forms, it is a challenge to superimpose type over a video raster.
We’ve all seen letters suffering from edge crawl, where the border between the type and the underlying video seems to shimmy or crawl. In this case, the ability of the alpha channel to control transparency provides the perfect solution.
In well-designed titling programs, the edges of letters and other elements might not seamlessly composite into the layer below. You can anti-alias them using gray-scale information that the alpha channel can use to smoothly transform the edges of the letters from fully opaque to transparent. This is often called a “soft edge” or a “feather.” And the result is titles that composite properly with the video material underneath them.