Register  |  Login  |  United States (change)

Solving tough keying problems in Vegas software

by Gary Rebholz


Whether we've been aware of it or not, we've all seen the chroma key or "green screen" effect used in everything from our local weather report to our favorite Hollywood blockbusters. With this technique, the movie maker shoots an actor against a solid-colored wall (very often a bright green color which gives the technique the green screen nickname, although technically you could use any color), and then the editor applies a filter to key out or remove that color so that it appears transparent. This transparency enables the editor to put a different piece of video in the layer beneath the actor, thus giving the impression that the actor is standing within the scene of that second video, as shown in Figure 1.


Figure 1

Figure 1: With chroma keying techniques, you can place an actor into an environment that it would not normally be feasible or even possible to get to. In this case, we've put our handsome actor at the side of pit row at the race track.


You may even have already used Vegas software's Chroma Keyer filter in order to place an actor into an environment that you couldn't afford—either financially or as a matter of safety—to get to in reality.


If done right, keying effects can be totally convincing to the point that you might think Spiderman is really perched on the ledge of that high-rise. But poorly executed, the chroma key technique can quickly brand your work as the height of amateurism.


If you've ever attempted to use the technique, you have probably quickly learned about some of the challenges involved. Naturally, we can't all afford the perfect setup of a Hollywood sound stage and thus we resort to those resources we can afford. This often means you're attempting to shoot in front of a piece of green cloth hung behind your actor. You quickly learn how difficult it can be to light the shot properly. Every little wrinkle in the cloth causes shadows and those shadows make it difficult to achieve an effective key. This means it can be very difficult to remove the entire green from the scene which leaves you with artifacts—mainly around your actor where the task is the most difficult—that immediately give away the illusion.


As I alluded to earlier, Sony Vegas software features a handy Chroma Keyer filter that works quickly and effectively in situations where you were able to shoot against a nice, evenly lit background. The background doesn't have to be a green screen. In fact, it can be virtually any color. The important thing is that the more even the brightness of the color you're attempting to key out, the better your results.


But what about those times when you weren't able to achieve a nice even background? In the remainder of this article, I'm going to show you how you can use the secondary color correction filter—included at no extra charge in Vegas software—to achieve a great key effect from a problematic green screen.


Figure 2 shows the same frame of video used in Figure 1 but without the green screen keyed out and the racecar footage dropped in.


Figure 2

Figure 2: Here's the same frame of video that I used in Figure 1 as it was actually shot against the green screen.


Notice the variation in the brightness of the green screen. Wrinkles in the fabric behind the actor's head cause big ripples and cast dark shadows. The area in the corner above his right should is more brightly lit than the lower corner directly below. Although the Chroma Keyer filter works wonderfully in many situations, I was not able to effectively key out the entire background with it because of the unevenness of the green screen color. Figure 3 shows my results using the Chroma Keyer filter without the racecar footage underneath. Notice that you can see remants of the green screen in both the upper and lower corners to the actor's right.


Figure 3

Figure 3: Because the green screen was so unevenly lit, it would be very difficult to key it out completely with the Chroma Keyer filter.


This is where the secondary color correction filter came to the rescue. Let's see how I used it to key out this problematic background.


First, click the Video FX tab in the window docking area, or if you previously closed the window, choose View | Video FX to reopen it. From the list of effects and filters on the left, select Color Corrector (Secondary), then drag the Reset to None preset onto the green screen event in the timeline. The Video Event FX window opens with the secondary color corrector controls visible. Make sure to resize the window if you need to in order to see all of the parameter controls for the filter. You can double-click the window's title bar to resize it quickly.


If you've used the Chroma Keyer filter you'll notice immediately that the secondary color corrector filter has many more controls and it's these extra controls that make it possible to use this filter as a keyer for hard-to-key materials.


The basic idea of the secondary color correction tool is to enable you to isolate a specific color in a video clip and make adjustments to it. You might change something that's red in the original footage to purple and so on. But you can also use this tool for special effects. For instance, you could use it to turn everything in a clip to black and white except for one spot color like a red flower.


In this case, we'll use the filter to key out the green screen background. First, we'll sample the color we want to manipulate. You use the controls in the bottom half of the window to define the color range that you want to affect—a process we refer to as creating a mask—with the color wheel and the other controls in the top half of the window.


Click in the timeline to place your cursor within the green screen clip so that you see the clip in the Video Preview window. Then, click the Select effect range button and use the eye dropper icon to sample the green screen from the Video Preview window. Your goal is to take a sample that includes various shades of the green, so instead of simply clicking on the green, click and drag to make a narrow selection area that includes a variety of shades of the green. This sets the effect range to an average of the colors of all the pixels within the selection.


If you make too large a selection, the average may become somewhat meaningless and your results will suffer, so you need to find the balance between one single pixel and an average of too many pixels. You can always repeat the process and try a different area of the video or a different sample size.


Once you've selected the range, select the Show mask checkbox. The Video Preview window now shows a black and white version of the clip. (If you have a track of video beneath the track you're working on, you'll see through to that track, so click the Solo button on the track your working on to see just black and white.) Anything that shows in white will be affected by the color adjustments you'll make shortly. Anything in black remains unaffected by your changes.


Now, adjust the Limit luminance, Limit saturation, and Limit hue, controls as you watch the Video Preview window. It'll take some experimentation until you get used to these tools, but your goal is to create a completely black silhouette of your hero against a completely white background as shown in Figure 4.


Figure 4

Figure 4: With the Show mask checkbox selected, tweak the mask controls until you have an entirely black silhouette of your subject. The entire green screen area is completely white.


Now that you've got your mask dialed in to perfection, deselect the Show mask checkbox. All the colors return—including the green screen—and things don't look any different than they did when you started. But the mask you created still exists and you can now use the tools in the top half of the window to tweak the color of the areas that were in white on the mask.


So that you get the whole effect, put another clip on the track directly below the one that has your green screen clip (or unsolo the track you soloed earlier if you already had another clip on the timeline).


Now, drag the Alpha slider all the way to the left to set an alpha value of 0.0, which means transparent. This makes the green screen completely transparent and now your star is standing in whatever scene you placed on the second track. Figure 5 shows my final results once again.


Figure 5

Figure 5: With a carefully created mask and an alpha value of 0.0, the effect is complete.


All that remains now is to play your video to make sure that the effect works flawlessly throughout.


As you can see, for those times when a quick key with the Chroma Keyer isn't possible due to an uneven green screen background, the Secondary Color Correction filter and a little tweaking can save the project.



Follow Us Online Facebook Twitter YouTube
Email Sign up:  Submit
  • Sony Creative Software inspires artistic expression with its award-winning line of products for digital video, music, DVD, and audio production.

    Sound Forge, ACID, and Vegas software have defined digital content creation for a generation of creative professionals, amateurs, and enthusiasts.

    © 2003-2014 Sony Creative Software, Inc. All Rights Reserved.
McAfee SECURE sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Sony.com