Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Digital Photography

  • Print
  • + Share This
This chapter is from the book

Tips for Using and Optimizing HSL Qualifications

The quality of your secondary correction is going to be dictated by the quality of the key you can pull. As with ordinary keying, it can be tricky to pull the matte you need in every clip, especially if the clip isn't that great to begin with. This section discusses ways you can maximize the quality of your secondary corrections to keep noisiness and rough edges from standing in the way of a successful adjustment.

What Is the Perfect Key?

If you've spent any amount of time pulling blue and green screen keys to create mattes for compositing, you know how time-consuming and imperfect a process chroma keying can be. Fortunately, one of the nice things about color correction is that it's not usually necessary to pull pixel-perfect keys in order to create a reasonably convincing and invisible secondary correction, although how true this is depends on how extreme a correction you're making.

  • If you're making a subtle adjustment to a clip's saturation, you'll be able to get away with a pretty sketchy matte.
  • If you're making a naturalistic adjustment to the highlights of the image when holes in a keyed matte correspond to shadows that are falling on the subject you're isolating, you probably don't want to include such shadowed areas in the correction, so there's no need to make further adjustments to the matte.
  • If you're making relatively extreme corrections to color and especially to contrast, you'll want to pull a considerably tighter, denser key to avoid visible artifacts. At the end of the day, chroma keying for color correction is all about what you can get away with.

No matter how loose or tight a matte you're creating, the most important thing you need to watch out for is buzz and chatter in the key, both of which can be minimized by judicious use of blur and shrink filtering operations. Sometimes, it may be faster and just as good to create a decent key and just soften the edges to make sure the matte isn't too animated, while other times you'll need to work the qualifiers to improve the overall key. However, you want to make sure you don't soften the edge of the matte too much, or you'll end up with a halo around the correction.

In all cases, the best thing you can do to check any secondary key is to play it all the way through to make sure it's not buzzing and that the color isn't bleeding later on in the clip. These sorts of problems aren't immediately visible while you're working on a clip with playback paused, and they're the very issues that ruin a perfectly good secondary.

Use High-Quality Digital Media

There are abundant reasons for color correcting and otherwise finishing a program using the highest quality source media possible. Aside from image quality considerations, secondary keying is one of the biggest beneficiaries of higher-quality media.

The best way to improve the quality of secondary color correction operations is to use the highest-quality video you can; ideally, uncompressed or minimally compressed media with the highest chroma subsampling ratio possible. High-quality video formats such as Avid's DNxHD 220x, 220, and 145, as well as Apple ProRes 422 and ProRes 422 (HQ) encode video with 4:2:2 chroma subsampling. As a result, you'll get relatively clean keys and smooth edge detail in secondary keys when working with shots in these formats.

Other mastering codecs such as Apple ProRes 4444, as well as uncompressed image sequence formats such as DPX, allow for fully 4:4:4 RGB data streams with minimal to no compression. These media types will yield exceptionally good keys since they have a maximum amount of data with which to feed a chroma keyer's digital algorithms.

HSL Qualification When You're Forced to Use Highly Compressed Footage

Because you're pulling a chroma key, highly compressed footage poses the same challenges for secondary color correction that it poses when you are keying to create visual effects. This is especially true when you are keying off of footage with limited color sampling.

Keys off of video formats using 4:1:1 and 4:2:0 chroma subsampling (including the DV-25, HDV, and H.264-based formats) will suffer from blockier edges and more compression artifacts exposed in the key (such as macro-blocking) than keying from 4:2:2 or, even more preferably, from 4:4:4 formats. You can see the difference in Figure 4.27.

Figure 4.27

Figure 4.27 As you can see in this illustration, the key pulled from the 4:2:2 source media is much smoother at the edges than the key pulled from the 4:1:1 down-converted version of the same clip. The right matte's aliasing and blockiness makes it harder to make seamless corrections.

If you're working with highly compressed source media, you'll find yourself frequently relying upon the Edge Thin and Softening sliders to smooth off the edges of your key.

Another technique that works well when you are doing secondary color correction on highly compressed media is to create single-qualifier secondary keys using only the Luma controls. Because all video formats preserve the full quality of the Luma component of a color signal (Luma is the 4 in 4:1:1 and 4:2:0), you'll find that this renders mattes with the best edge detail.

Control the Image Processing Pipeline

Another way you can optimize the keying process is by making adjustments to the image prior to keying it. Now, this is only possible if your application lets you control the image-processing pipeline that feeds the HSL Qualifier's keyer. Most do, some don't:

  • In DaVinci Resolve, you can connect the input of the correction node containing the HSL Qualifier to the output of any node coming before it, choosing either the original state of the image, or any other correction node, sampling the state of the image as of that point in the grade.
  • In Assimilate Scratch, you have the option to key from the Source (the original media), the Primary, Recursive (the Primary and all scaffolds up to the one you're working on), or Texture Fill or Matte (for special effects).
  • In FilmLight Baselight, a Reference strip appears along with the InsideOutside and HueAngle layer strips that are created when you add a keyer. The Reference strip controls whether you use the original or graded image as the basis for the key.
  • In Autodesk Lustre, a Source Primary button determines whether to use the source, or the primary correction, as the basis for the key.
  • In Apple Color, the keyer always samples the original, uncorrected media.
  • If you're color correcting using your NLE, the filter interfaces of Apple Final Cut Pro, Adobe Premiere Pro, and Avid Media Composer are stack-based UIs, where the order of the filters determines the order of processing. When you insert a color correction filter at the bottom of a list of other filters, the keyer samples the output of all filters applied earlier in the stack.

When sampling values for a key, there are various reasons to choose either the original state of the media, or a graded version of the shot.

In some instances, your grade may be so extreme (a low-saturation bleach-bypass effect, for example) that inserting an HSL Qualification at that point would result in a terrible key. This is a case where you'd want to sample the original image in order to get the best result.

On the other hand, if you're grading media that is inherently low contrast and low saturation (for example, a flat best light safety film transfer, or media using a raw format such as RED), you'll probably get far better results by pulling a key from a color corrected version of the image.

The following sections describe ways in which controlling the image-processing pipeline will improve your keys.

Boost Image or Color Contrast

A key method that often helps improve keys is to boost the saturation and/or increase the contrast of the overall image, pulling a key off of the result. By increasing color contrast and luma contrast, you increase the distance between discrete values in the image, which can make it easier to manipulate the qualifier controls to isolate more specific slices of color. You can think of a saturation/contrast boost as widening the difference between the colors of the subject you're trying to isolate and the areas you're trying to exclude.

In Figure 4.28, the man's pale blue shirt in the uncorrected shot at left is difficult to distinguish from the cool highlights overall, mainly because the initial contrast of the shot is so low. However, boosting contrast and raising saturation makes the shirt a much easier target for HSL Qualification.

Figure 4.28

Figure 4.28 The uncorrected image at left will be difficult to key, owing to its low contrast and saturation. At right, the same image has had the contrast boosted, preparing it for keying.

Often, you'll be boosting contrast and saturation as part of your primary grade anyway. However, if your goal is ultimately a desaturated look, you'll need to boost contrast and saturation with one correction, add a secondary in another correction to create the isolated adjustment you need, and then reduce the contrast of the overall image using a third correction to get the overall look you require (Figure 4.29).

Figure 4.29

Figure 4.29 A three-correction sequence.

In Figure 4.29 we can see this process in action. The image is made ready for keying with node 1, the HSL Qualification to adjust the man's shirt happens in node 2, and a final correction in node 3 reduces overall saturation to create the final desired effect.

Making a Secondary Adjustment Before a Primary

Another strategy is to make a secondary HSL Qualifier adjustment before making your primary correction. This is especially useful in instances where the primary correction you want will clip highlights or crush shadows to the point of impeding a high-quality key, preventing you from making an adjustment to retrieve necessary detail.

In Figure 4.30, we can see that slight underexposure coupled with a white, reflective driveway, means that we can't simply boost the midtones to the level we want without clipping the driveway.

Figure 4.30

Figure 4.30 Adjusting contrast for a proper exposure results in the white driveway getting clipped, as seen in the image on the right.

To work around this, you can make a secondary adjustment as your first correction, which lets you key and manipulate the image using all of the detail found at the original signal levels. Then, in a second correction, you would use a primary adjustment to clip the highlights or crush the shadows as desired for the look you want (Figure 4.31).

Figure 4.31

Figure 4.31 Node 1 pulls a key on the road, allowing you to selectively control its contrast before the adjustment made by node 2, which raises contrast overall.

When you work this way, you can lower the exposure of the road in proportion to the amount you'll be raising exposure in the second corrections. In other words, if you know you'll be jacking up the highlights of an overall image and losing detail as a result, then isolate the detail you'll be losing, and lower it before it gets raised in the second correction, so the final result is properly exposed all the way through (Figure 4.32).

Figure 4.32

Figure 4.32 The end result. By preemptively lowering the lightness of the road, you preserve detail even though you're still boosting the contrast of the entire shot.

This technique works equally well with saturation enhancements, enabling you to lower saturated elements before they get clipped later on.

Preemptively Blur the Image You're Keying

In some cases, excessive noise or movement in an image makes it challenging to pull a smooth key, even if you're using a post-key blur. One thing you can try in such situations is to blur the image before you pull a key. There are several ways you can do this.

  • Assimilate Scratch has a convenient Pre-Blur parameter that lets you blur the image before you pull a key. This doesn't affect the image visually; it simply softens a branch of image processing that's being fed to the keyer.
  • In DaVinci Resolve, you can do the same thing by creating a node tree where a correction that blurs the image is connected to a second correction set up to pull the key. To avoid actually blurring the corrected image, you then insert that key into the mask input of another correction that takes the original state of the image as its image input (Figure 4.33).
    Figure 4.33

    Figure 4.33 Blurring an image in order to improve a key, without blurring the final image in DaVinci Resolve. Node 2 blurs the image, and node 4 pulls a key from the result. Node 1 is the initial primary correction for the shot, while node 3 is a secondary correction that uses the matte that's fed to it from node 4 (via the mask input at the bottom left).

  • In Apple Color, you can do the same thing in the Color FX room. Use an Alpha Blend node to apply a correction to the area isolated via the HSL Key node attached to its third input. Attaching a blur node to the HSL Key node's input blurs the image used to create the matte, while leaving the images combined by the first two inputs of the Alpha Blend node alone (Figure 4.34).
    Figure 4.34

    Figure 4.34 Blurring the image that feeds the HSL Key node in Apple Color. Since the matte is only connected to the mask input of the Alpha Blend node, the image remains unblurred.

Unusual Qualifier Combinations

One thing that's easy to overlook when you're trying to pull a tricky key is that you might be able to solve your isolation problem using an unusual combination of qualifier controls. I directed a movie that took place in the desert (and, being me, graded it as well), and I was endlessly vexed at how closely some of the character's costumes came to the hues of the earth that surrounded them.

However, I began to realize that I could pull a much more isolated key by limiting the qualifiers to one of the following combinations:

  • Hue & Saturation: I've had shots that were so equiluminant (the luma throughout the image was within a very narrow range) that it was tough to isolate the feature that I needed because the luma key kept polluting my matte in unwanted areas. Then I realized that those features were more saturated than the rest of the image. Keys pulled using only Hue + Saturation aren't necessarily going to be either pretty or smooth (especially with highly compressed media), but this combination can sometimes work in a pinch.
  • Luma & Saturation: The combination of luma and saturation can be a good way to isolate skies when there are other, less saturated blues in the image (water, costume).
  • + Share This
  • 🔖 Save To Your Account