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

Home > Articles > Digital Audio, Video > Adobe After Effects

Like this article? We recommend

Typical Keying Challenges

As you must know by now, because I've seized every opportunity thus far to drill it into your head, the number one solution to most matte problems is to break the image being matted into multiple sections rather than trying to get one matte in one pass. You can divide the matte as follows:

  • Core and edge matte (hard and soft matte)
  • Holdout masks for particular areas of the frame (useful if lighting varies greatly within the frame, or if one area contains a particularly challenging element, such as hair or motion blur)
  • Temporal split (if light conditions change as the shot progresses)

All other tricks fall short if you're not willing to take the trouble to do this. And now for some more bad news.

On Set

No matter how advanced and well paid you may be, your time is likely to be far cheaper than that of a full crew on set. Shocking, I know, but that means that you'll have the opportunity to fix things in post that should have been handled differently on set. You could call it job security, but that sounds cynical. However you think of it, it's bound to be part of your job.

If you're fortunate enough to be supervising the effects shoot (I recommend it for the craft services alone), you can do all sorts of things to ensure that the footage will key successfully later.

A hard cyclorama, or cyc (pronounced like "psych"), painted a uniform key color is far preferable to a temporary cloth background. If you can't rent a stage that has one, the next best thing might be to invest in a roll of floor covering and paint it, to get the smooth transition from floor to wall, as in Figure 32 (assuming that the floor is in shot). Regarding the floor, don't let anyone walk across it in street shoes, which will quickly contaminate it with very visible dust. There are white shoe-cover booties often used specifically to avoid this issue, but it can be a losing battle.

Figure 32

Figure 32 On a set with no hard cyclorama, you can create the effect of one—the curve where the wall meets the floor—using bluescreen cloth instead. It doesn't behave as well (note the hotspot on the curve), but it will certainly do in a pinch and is much preferable to removing the seam caused by the corner between the wall and floor. (Image courtesy of Tim Fink Events and Media.)

Assuming that you begin with a correct-colored, footprint-free background with as few seams and other variations as possible, the most important concern is to light it correctly, balancing the foreground and background lighting.

Of course, this job is best left to a professional, and any kind of recommendations for a physical lighting setup are beyond the scope of this article. But, hey, you're going to spend more time examining this footage than anyone else does, so here are a few things to keep in mind as the on-set effects supervisor:

  • Light levels on the foreground and background should match. A spot light meter tells you whether they do.
  • Diffuse lights are great for the background (often a set of large 1 K, 2 K, or 5 K lights with a silk sock covering them), but fluorescent lights will do in a pinch. With fluorescents, you just need more instruments to light the same space. Kino Flo lights are a popular option as well (see Figure 33).
    Figure 33

    Figure 33 Diffuse white lighting that causes no hotspots in the background is ideal.

  • Maintain space between the foreground and background. Ten feet is ideal.
  • Avoid dark unwanted shadows like Indiana Jones avoids snakes, but by all means light for shadows if you can get them and the floor is clean. Note that this technique works only when the final shot also has a flat floor.
  • Shoot exteriors outside if possible, using portable backgrounds such as solid-color cloths and carpets. You lose the controlled environment of the studio, but the quality of broad daylight can be difficult and expensive to re-create on set. There's just no key light as big as the sun.
  • Record as close to uncompressed as possible. Even many low-end HD cameras allow you to record uncompressed directly to a disk array and avoid the pitfalls of heavily compressed tape formats.

If the setup permits, bring along a laptop with After Effects on it and with some representation of the scene into which the footage you're taking is going to be keyed. This type of preparation can be enormously helpful not only to you but to the gaffer and director of photography, to give them an idea of where to focus their efforts.

Finally, once the lighting has been finalized and before action is called on the shot, ask the camera operator to shoot a few frames of clean plate—the background with no foreground characters or objects to be keyed out later. There are all sorts of ways to make use of this footage, and it's easy to forget. If you did forget, try to get the frames at the end of the setup, or the end of the day.

Matte Problems

Specific tools are available to help you manipulate any matte that needs help. You may simply need to loosen or choke a matte edge.

Minimax is powerful, but not as precise as Matte Choker or Simple Choker. It operates in whole-pixel increments to choke and spread pixel values, so the result isn't necessarily subtle. It provides a quick way to spread or choke pixel data, particularly without alpha channel information (since it can also operate on individual channels of luminance).

Simple Choker allows you to choke or spread alpha channel data (via a positive or negative number, respectively) at the sub-pixel level (use decimal values). That's all it does. If you push it hard, it behaves better than the Screen Shrink/Grow control in Keylight, which starts to look blobby. Matte Choker seems more deluxe than Simple Choker (it's not stuck with that "Simple" label), but it merely adds softness controls that can just complicate a bad key. Don't be afraid to "settle" for Simple Choker: It's no monkey wrench.

Edge Selection

Earlier in this article I introduced the three-pass method for deriving a matte; this is one way to derive an edge matte when it's specifically the edge pixels you need to select for adjustment. However, the simplest method to get an edge matte is probably as follows:

  1. Apply Shift Channels. Set Take Alpha From to Full On and all three color channels to Alpha.
  2. Apply Find Edges (often mistaken for a useless psychedelic effect because, as with Photoshop, it appears in the Stylize menu). Check the Invert box (see Figure 34).
    Figure 34

    Figure 34 You can use this selection to blur the background and foreground together along the edge via an adjustment layer. The bottom edge is included in the matte; don't let this bite you if your frame has no padding (non-visible area at the edge of frame).

    Minimax is useful to help choke or spread this edge matte. The default setting under Operation in this effect is Maximum, which spreads the white edge pixels by the amount specified in the Radius setting. Minimum chokes the edge in the same manner. If the result appears a little crude, an additional Fast Blur will soften it (see Figure 35).

    Figure 35

    Figure 35 Need thicker, softer edges? A quick Minimax set to the default Maximum allows you to specify a Radius by which the white area will grow. If the result looks a little chunky, a quick Fast Blur will soften it back.

  3. Apply the result via a luma matte to an adjustment layer. You shouldn't need to precompose before doing so.

Now what? Fast Blur will soften the blend area between the foreground and background, another way around a chewy matte that doesn't harm the overall image. A Levels adjustment will darken or brighten the composited edge to blend it better. Hue/Saturation can be used to desaturate the edge, similar to using a gray edge-replacement color in Keylight.

Matte Holes

Holes can appear in solid areas of a matte: in the background, because of uneven lighting, seams, dirt on the floor; in the foreground, usually because of reflections from the background (especially the floor). No built-in tool in After Effects deals with these difficulties procedurally, but there's a great third-party tool called Alpha Cleaner, part of the Key Correct set (formerly Miracle Alpha Cleaner in Composite Wizard). Because it's an automated solution, it will occasionally fill holes that should remain unfilled, such as the little triangular gap that can open up under outstretched arms (see Figure 36).

Thus, matte holes present a situation in which you may have to rotoscope. Often it's not as bad as you think it will be. The painstaking part of keying is defining the edge, and holes can often be fixed using crude masks or by tracking in paint strokes.

Figure 36

Figure 36 An automated solution, such as Alpha Cleaner (part of the Key Correct Pro pack), fills holes in the foreground matte but may have side effects, closing needed holes such as this tiny gap under the arm.

Matte Fringe

Visible fringing around the edge of a feathered matte can appear when a matte is applied via a track matte. Whether to avoid Keylight's heavy processing of spill and grain or to build a multilayer matte, you have seen a few reasons to work this way.

One solution to fringing is hidden away in the Channel menu. Remove Color Matting (a difficult name to remember, which could instead be "un-premultiply") is designed specifically to remove background color from premultiplied edges.

Remove Color Matting uses black as the default Background Color (usually the right setting), and this is the only user-adjustable parameter in this effect. You can instead use the eyedropper to sample a background color. If the fringing is bright-colored, a white or gray background may have been premultiplied.

Color Spill

Color spill need not be a big deal. If you're not happy with the spill suppression in Keylight (or another keyer), you can apply the matte as an alpha track matte to the source footage and pursue alternative options.

Sometimes the Spill Suppressor tool that's included with After Effects will do the trick. It uses a simple channel-multiplication formula to pull the background color out of the foreground pixels. All you need to do is select a sample from the background color (you can even copy your original choice of screen color from Keylight, but it mostly matters whether you choose blue or green) and leave the setting at 100%.

If even Spill Suppressor has undesirable side effects, then it may be advisable to apply Hue/Saturation and target the specific hue that's causing problems, either desaturating or shifting it. Select the color of the spill under Channel Control—Blues, for example. (For some reason they're all plural.)

Channel Range contains two color spectrums with a set of controls between them (see Figure 37). These settings control the actual range of a given hue. The inner hash marks control the range affected by the controls below; the region between those and the outer, triangular markers is the threshold area.

Figure 37

Figure 37 The hash marks and triangles under the upper gradient of the Channel Range control the core and threshold of the affected hue range; the result is reflected in the lower gradient. This is often an effective method to remove spill.

For the best result, turn off Keylight or any other matte operations and work directly with the plate. Set the Saturation for the channel (Blue Saturation or Green Saturation) to -100%. Move the inner and outer hash marks outward until the background is completely gray; the foreground inside the edges should appear unaffected. Re-enable the matte, now without spill.

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