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

Home > Articles > Apple > Operating Systems

This chapter is from the book Professional Keying in Post

Professional Keying in Post

There are several ways to get the job done when it comes to keying. The “right” method really depends on a variety of factors including acquisition format, lighting approach, subject matter, and personal taste. For most of you reading this book, you will need to explore the many different options available and choose the ones that work best for you. The workflows we cover here are meant to serve as an inspiration but are no means right for every situation.

Keying in Final Cut Pro

We find that Final Cut Pro offers a robust chroma keyer, and that it’s well suited for the initial edit. You can get acceptable results with well-shot footage, and the composites you create work well for the rough-cut of the video. We use Final Cut Pro’s keyer during the initial edit stage to work out timing issues. Once we have client approval, we then move to a compositing application like Motion or After Effects.

Getting started

Keying with Final Cut Pro involves a few steps to get the most professional results. Some users skip right to the Chroma Keyer filter and only use the most basic setting because they intend to finish the key elsewhere and only want a proxy effect. We believe that the few extra seconds it takes to get it right are worth it, even if you intend to do the final keying with Motion or After Effects.

  1. If you haven’t done so already, copy the Chapter_05_Media folder from the DVD to a local hard drive. Then open the folder and double-click the file 01_Keying_FCP.fcp. A Final Cut Pro project opens with two sequences.
  2. Double-click the sequence 01_Key Start to load it into the Canvas and Timeline windows. Select the clip watch by clicking it in the Timeline.
  3. Choose Effects > Video Filters > Key > Color Smoothing - 4:2:2. This effect reduces diagonal banding that can occur in areas of high contrast. The footage you are using is DVCPRO-HD, which uses 4:2:2 color sampling.
  4. Choose Effects > Video Filters > Key > Chroma Keyer. Double-click the clip in the Timeline to load it into the Viewer window. In the Filters tab, click the Visual button to get easier-to-use controls.

Pulling an initial key

Once the initial color to key is selected, you can refine it by adjusting the color value, saturation, and luma ranges independently for greater accuracy. This type of keyer is often called an HSL key.

  1. In the Chroma Keyer tab, click once on the Select Color eyedropper to specify a color to key (Figure 5.12).
  2. Figure 5.12 Click the eyedropper before selecting the color to key.

  3. Click in the Canvas on a green area close to the subject’s hair (Figure 5.13). An initial selection of Hue, Saturation, and Luma is chosen in the Chroma Keyer tab (Figure 5.14).
  4. Figure 5.13 Be sure to select a green that is representative of the background, avoiding areas with shadows or color spill.

    Figure 5.14 Here is the color from the initial selection shown in the Chroma Keyer tab.

  5. Click on the Select Color eyedropper again. Hold down the Shift key and click and drag throughout the green backdrop. This increases the range of colors to be keyed out and expands the keyed-out area. This works well but must be done after you’ve made an initial selection; otherwise, it won’t work.
  6. Drag the Range Control sliders for Color, Saturation, and Luma to fine-tune the key (Figure 5.15). For this footage, start by dragging the top sliders for Color, Saturation, and Luma to the right to affect a broader area. Drag the sliders outward to include more or inward to include less in the selection.
  7. Figure 5.15 Fine-tune the key by dragging the sliders.

  8. To make it easier to see your keying results, right-click on the background layer in the Timeline (Ruins.tif) and deselect the Clip Enable option.
  9. Drag the bottom handles gently for each of the three values to improve your initial key and soften the transition between keyed and non-keyed colors (Figure 5.16).
  10. Figure 5.16 Improve the key by dragging the bottom handles. Spread the handles further apart to refine the edges and smooth the transition between keyed and non-keyed areas.

Refining the key

Once a good key has been achieved, you can refine it in a few steps. The Chroma Keyer filter lets you refine the edge as well as color spill for a better key.

  1. Drag the Softening slider to the right a short distance to blur the edges of the matte.
  2. Drag the Edge Thin slider to the right to “eat away” the green fringe (often referred to as choking the matte).
  3. Adjust the top and bottom sliders for Hue, Saturation, and Luma as needed to refine the key (Figure 5.17).
  4. Figure 5.17 Keying often involves some back and forth to get things “just right.”

  5. Right-click on the bottommost layer (Ruins.tif) and choose Clip Enable.
  6. Drag the Enhance slider slowly to the right to remove any green spill (going too far will add magenta to the edge).
  7. Choose Effects > Video Filters > Matte > Matte Choker to apply a matte choker effect. This effect can be used to refine the edges of the matte creating the key.
  8. Switch to the Filters tab and choose a negative value for Edge Thin and a positive value for Edge Feather to restore the aggressive edge loss caused by the Chroma Keyer effect (Figure 5.18).
  9. Figure 5.18 The Matte Choker effect can help clean up the edges of your key. Adjust Edge Thin and Edge Feather for best results.

  10. Choose Effects > Video Filters > Key > Spill Suppressor – Green. Adjust its Amount slider to taste to remove any remaining green spill on the image (Figure 5.19).
  11. Figure 5.19 Suppressing spill can remove green cast from the subject (usually seen on hair and shoulders).

  12. Tweak the individual sliders in the Chroma Keyer and Matte Choker effects as needed to get your best result.

Tweaking the composite

You’re almost done with your key. The only thing missing is balancing the foreground image to the background image. It’s often necessary to adjust both your images to make the foreground and background look as if they were shot together. Possible adjustments include color correction and blurring filters. Even with a successful key, attention to the little details is what makes a composite look like a finished shot.

  1. Select the bottommost layer in the Timeline window (Ruins.tif).
  2. Choose Effects > Video Filters > Blur > Defocus. Depending on the amount of RAM on your system, you may get an error message indicating that scaling has occurred. If so, click OK to limit the effect.
  3. Double-click the bottommost layer to load it into the Viewer. Adjust the Defocus filter to taste in the Filters tab (Figure 5.20).
  4. Figure 5.20 The Defocus filter can soften the background and help to simulate depth of field.

Your key is now complete. There’s one more shot in the Timeline that you can practice with. Use the techniques you’ve learned so far and practice keying the additional shot. When you are ready, continue with the next exercise.

Keying in After Effects

In our workflows, it’s After Effects we turn to for the best results when keying. While there are several powerful tools that allow for accurate mask creation and refinement, there’s one workhorse in the bunch that does nearly all the work—Keylight.

  1. In Final Cut Pro, mark an In and Out point for the range you’d like to export in a sequence.
  2. Choose File > Export > XML. In the dialog that opens, choose Apple XML Interchange Format, version 4 (or later) and click OK.
  3. Specify a location for the XML file (such as your media drive) and click OK.
  4. Launch Premiere Pro and create a new project that most closely matches the video format you’ve been using.
  5. In Premiere Pro, choose File > Import. Navigate to the XML file you created and click Import. Premiere Pro creates a sequence and adds the media and a report to the project.
  6. Choose File > Save and save the project to your media drive.
  7. Launch After Effects and choose File > Import > Adobe Premiere Pro Project. Select the recently created Premiere Pro project and click Open. Click OK in the Premiere Pro Importer dialog. All the media (with handles) is now imported into the After Effects project.
  8. Choose File > Save and capture the new project. You can now begin working. All the media is still referenced on your drive with no duplication of assets.

The technology used in Keylight uses a core algorithm written by the Computer Film Company. This technology has been used on numerous feature films including Harry Potter, Mission Impossible, and Sweeney Todd. Keylight has won the Academy Award for Technical Excellence and is a one-stop shop for keying, despill, and color correction.

When you apply Keylight to a footage layer, you choose a color to key out. The effect then does two things: First, it erases all the pixels that match the color. Second, it removes that color spill from other pixels. So if you select green, it will remove the backdrop and greatly reduce any green reflections on the foreground. Keylight is relatively easy to use (once you understand its options). It is also quite adept at handling reflections, semitransparent areas, and hair.

Getting started

The Keylight plug-in can be a bit intimidating since it has nearly 60 parameters. The good news is that there are only a few main controls—the rest are just used for fine-tuning. Let’s start with some basic material that needs to be keyed.

  1. If you haven’t done so already, copy the Chapter_05_Media folder from the DVD to a local hard drive. Then open the folder and double-click the file 02_Keying_AE.aep.
  2. In the Project panel, double-click the composition 01_Key Start to load it. There are two clips loaded into a Timeline.
  3. Select track 1 in the Timeline by clicking on it once; then hold down the Shift key and click to add track 2 to the selection (Figure 5.21).
  4. Figure 5.21 Add track 2 to the selection This will allow you to apply the keying effect to both clips at once.

  5. Choose Effect > Keying > Keylight to apply the Keylight plug-in. Nothing appears to happen.
  6. In the Effect Controls Viewer click the menu and choose the topmost layer called 01_Key Start • watch.mov (Figure 5.22).
  7. Figure 5.22 Choose this option to begin the keying process.

  8. Move the Current Time Indicator to the start of the composition by pressing the Home key or dragging. You are now ready to start the keying process.

Pulling an initial key

Keying is often a multistep process. You will find yourself finessing and refining to get the best results. But the most dramatic change starts with a single click. The first thing you’ll do when using Keylight is choose the Screen Colour you’d like to remove (yes, the plug-in developers are British). The Screen Colour is the color you want removed from the background that the color Keylight will despill from the rest of the scene.

  1. Click the eyedropper next to Screen Colour to activate the selection eyedropper (Figure 5.23, left). Click just over the shoulder of the subject. You want to click close to the person to remove the green areas closest to the subject (Figure 5.23, right). Clicking close ensures that the edges around soft areas (such as hair) key the best.
  2. At first glance, the key looks “perfect.” It’s not. Close examination reveals that the image has extra transparency and some spill that needs to be corrected. You can often see this by viewing the key over a transparent background or by playing they key in realtime and looking for “dancing” pixels.

    Figure 5.23 An accurate click is important to get a good key. Clicking near the hair helps create better edge detail.

  3. In the Effects panel, click the menu next to View and switch to Screen Matte (Figure 5.24). This lets you see the grayscale matte that Keylight uses to create transparency. The matte indicates transparent areas in black, opaque areas in white, and partially transparent areas in gray. Close examination of the matte indicates that the background has not been completely removed, and that the shirt, face, and hair are showing undesirable amounts of transparency. (Figure 5.25).
  4. Figure 5.24 Be sure to switch to Screen Matte view to check for unintended holes or noise in the matte.

    Figure 5.25 The background has some noise in it, which is indicated by gray pixels in the black areas. More visible is light gray noise in the white areas of the matte where the person is.

  5. Increase the Screen Gain parameter to push the background toward a clean black plate. For this first shot, a value of 115.0 works well. Some users alternately will use the Clip Black slider discussed in the next section for similar results.
  6. Change the Screen Pre-blur to a value of 1.0 to slightly soften the edges of the generated matte. Avoid using a high value or halos will occur.

Cleaning up the matte

For a believable key, it’s good to have some gray pixels around the edge of the subject (so hairs and other semitransparent elements can blend into the background). The background surrounding the keyed subject, however, should be solid black, and the keyed subject should be solid white. Currently, the background is in pretty good shape, but the foreground can really use some work.

  1. Click the disclosure triangle next to Screen Matte to reveal several controls that can be used to fix matte problems (Figure 5.26).
  2. Figure 5.26 Be sure to access the Screen Matte controls for more precision.

    You can use the following sliders to refine the mask:

    • Clip Black. This makes the blacks in the matte darker.
    • Clip White. This makes the white areas in the matte whiter. Be careful with both clip controls to not overdo it and ruin the edges of your foreground.
    • Clip Rollback. This allows you to undo clipping and bring the edges back.
    • Screen Shrink/Grow. This control can contract or expand the matte.
    • Screen Softness. This softens the generated matte.
    • Screen Despot White. This parameter removes white specks that are inside a generally black background.
    • Screen Despot Black. This parameter removes black specks that are inside a generally white foreground.
  3. Increase Clip Black to 6.0 to clean up the transparency.
  4. Lower Clip White to 84.0 to remove most of the “holes” in the matte (Figure 5.27).
  5. Figure 5.27 A clean matte will show an even black for transparent areas with white for opaque areas.

  6. Adjust the Clip Rollback to 3.0 to restore edge detail.
  7. Set the Screen Softness to 1.0 to remove fringe at the edges, and then set Screen Shrink/Grow to -2.0.
  8. Adjust Screen Despot Black to 4.0. You may need to resize the Effect Controls panel to see the full name. Click in the area between the Effects and Composition panels and drag to resize.
  9. Click the View menu and choose Final Result to see your keyed footage (Figure 5.28).
  10. Figure 5.28 The final key after adjusting several important but subtle parameters.

Correcting color

After you’ve keyed the background, you’ll usually need to adjust the foreground colors so they properly match the colors of your new background. Fortunately, Keylight offers two sets of controls to fix these issues:

  • Foreground Colour Correction. This process affects the majority of the person or object left behind after Keylight has removed the background.
  • Edge Colour Correction. This step modifies a thin band of pixels running around the person or object. This is where the majority of color spill occurs from the background reflected on the subject. This is a critical area to tweak when trying to make a believable composite.
  1. In the Effects panel, click the disclosure triangle next to Foreground Colour Correction, and then select the Enable Colour Correction check box.
  2. Increase the Saturation slider to 115 to boost the color in the foreground to match the richly saturated background.
  3. Adjust the Contrast and Brightness to match the foreground subject to the background plate. For this image try a Contrast setting of 6.0 and a Brightness setting of -10.0.
  4. Click the disclosure triangle next to the Colour Balance Wheel. This allows you to adjust the white balance of the image and tint the foreground to better match the color temperature of the background. Slowly drag the x on the wheel to the left. Experiment with different positions until the color matches well (Figure 5.29).
  5. Figure 5.29 Keylight offers a color wheel to help with spill. You can drag toward a warmer color like orange to warm the scene or toward blue to cool it.

  6. Additionally, the Edge Hardness and Edge Softness parameters are useful. Edge Hardness controls how much the edge color correction merges into the main foreground color correction, whereas Edge Softness blurs the edges.
  7. Scroll down in the Effects panel and click the disclosure triangle next to Edge Colour Correction. Select the Enable Edge Colour Correction check box.
  8. Set the Edge Grow to 10.0, Saturation to 70.0, and Brightness to -5.0 to reduce the richness of color at the edges (the results will be subtle).
  9. Set Edge Colour Suppression to Suppress Green, and then open the Colour Balancing area and set Saturation to -2.0 to further remove color from the edges (Figure 5.30).
  10. Figure 5.30 Adding Edge Colour Correction helps blend the edges with the background plate.

Adjusting edges

Sometimes your image will need a slight crop or reposition due to its edges. It’s essential that you carefully examine the edges of the image when keying to look for undesired transparency or black fringe. The footage layer you are working with has a problem with the bottom edge (the second shot in the Timeline has a rough edge on the right side as well).

Let’s start with the stray transparency at the bottom of the frame. You need to nudge the layer down slightly to hide the soft bottom edge (Figure 5.31).

Figure 5.31 The bottom edge is a bit soft and should be hidden for a cleaner composite.

  1. Select the layer watch.mov in the Timeline and press P to access the Position property.
  2. Click the Choose grid and guide options button and choose the Title/Action Safe option to view guides to help with composition and framing (Figure 5.32).
  3. Figure 5.32 Using Action Safe guides can help you judge composition framing for broadcast purposes.

  4. Set the Y value to 430.0 to reposition the footage in the Composition panel. For best results, type the number into the entry field. A decimal point value often results from dragging, which can lead to subpixel resampling and image softness (Figure 5.33).
  5. Figure 5.33 The bottom edge now appears clean.

    The bottom edge is fixed, and the composition of the shot looks good. But closer examination reveals that the background is too in focus compared to the foreground.

  6. Select layer 3 in the Timeline panel and choose Effect > Blur > Fast Blur.
  7. In the Effects panel, set Blurriness to a higher value (in this case try 7.0). The end result is a more believable composite (Figure 5.34).
  8. Figure 5.34 Blurring the background makes for a more believable composite.

Your key is now complete. There’s one more shot in the current Timeline that you can practice with. Use the techniques you’ve learned so far and practice keying the additional shot. When you are ready, continue with the lesson.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020