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

# Selections: The Key to Compositing in Adobe After Effects 7.0

• Print
This chapter is from the book

## Blending Modes: The Real Deal

After Effects includes 34 blending modes, each created with a specific purpose ( Figure 3.22 )—although no one is quite sure in what context Dancing Dissolve was ever useful (and I'm only half joking). For effects work, moreover, the majority of them are not particularly recommended. In fact, traditional optical compositing would effectively include only two of them: Add and Multiply.

So that's it? Use these two or none at all? Not quite—I'll point out a few other useful modes as well. Once you understand how your options work, you can make informed compositing decisions, rather than lazily playing Go Fish by trying one mode after the other until you see something you kind of like.

Remember, blending modes are all based on mathematical operations for combining pixels in the layer containing the given blending mode and the pixels behind it—either below it in the stack, if all the layers are 2D, or positioned behind it in 3D space, if all the layers are 3D.

To help you understand what the various blending modes are doing, Figures 3.24 through 3.30 blend a grayscale gradient over a fully saturated background. Contextual examples using these blending modes follow in the next section.

Add and Screen modes both brighten the image. Screen typically yields a subtler effect than Add, which results in brighter values overall.

Add mode is every bit as simple as it sounds; the formula is

newPixel = A + B

where A is a pixel from the foreground layer and B is a background pixel (although they are obviously interchangeable in this formula). The result is clipped at 1 for 8- and 16-bit pixels (but can exceed 1 in 32 bpc mode); any pixels that add up to a value of more than 1 take the value of 1, full white.

In 32 bpc mode, this is likely to be your most commonly used blending mode. It generally brightens the overall image, but any black in the foreground acts transparent by adding a value of 0 to the background. It is useful for laying fire and explosion elements shot in negative space (against black) into a scene, adding noise or grain to an element, or any other element that is made up of light and texture ( Figures 3.31a , b , and c ).

Screen mode has an influence similar to Add mode's, but via a slightly different formula. The pixel values are inverted, multiplied together, and the result is inverted:

newPixel = 1–((1–A) * (1–B))

Note that with this formula, fully white pixels stay white, fully black pixels stay black, but a midrange pixel (0.5) takes on a brighter value (0.75), just not as bright as would be with Add (1).

You use Screen much like Add when working in 8 bpc and 16 bpc modes. Screen is most useful in situations where Add would blow out the highlights too much—glints, flares, glow passes, and so on ( Figure 3.32 ).

#### Multiply

Multiply is another mode that is as simple as it sounds; it uses the formula

newPixel = A * B

This would seem to make the values much higher until you recollect that we are calculating values between 0 and 1; when you multiply by a fraction, the result is lower than the source value. Multiplying two images together, therefore, actually has the effect of reducing midrange pixels and darkening an image overall, although pixels that are full white in both images remain full white.

In optical compositing (the crude method used to do this stuff photochemically before we had computers that could manage it) the equivalent of multiply was layering two images, one over the other, combining their densities such that the dark areas of each image held out light from the other. This process was known as bi-packing.

Multiply literally has the inverse effect of Screen mode, darkening the midrange values of one image with another. It is useful in cases where you wish to emphasize dark tones in the foreground without replacing the lighter tones in the background, for example to layer in texture, shadow, or dark fog ( Figure 3.33 ).

#### Overlay and the Light Modes

Overlay uses the bottom layer to determine whether to screen or multiply. Above a threshold of 50% gray (or .5 in normalized terms), it is screened. Below 50%, it is multiplied. Hard Light operates similarly, instead using the top layer to determine whether to screen or multiply, so the two are inverse effects. Reversing layer order and swapping Overlay for Hard Light yields an identical result.

These modes, along with Linear and Vivid Light, can be most useful for combining a layer that is predominantly color with another layer that is predominantly luminance, or contrast detail ( Figure 3.34 ). This is how you create textures; for example, some of the lava texturing in the Level 4 sequence of Spy Kids 3–D was created by using Hard Light to combine a hand-painted color heat map with moving fractal noise patterns.

This type of usage is fine in 8 bpc or 16 bpc projects, but try to avoid fishing in the various Light modes when combining more detailed and specific elements. These methods don't work properly with 32 bpc overbright levels (explored in Chapter 11), and this method of adjusting images is a warning sign that you haven't thought things through in terms of what you're trying to do.

#### Difference

Difference is a subtraction mode that inverts a pixel in the background according to how bright the foreground pixel is. There is one very specific use for Difference that has nothing to do with creating a blended look: You can line up two identical layers using this mode. When all of the pixels line up properly, layer details disappear ( Figure 3.35 ).

#### HSB and Color Modes

The Hue, Saturation, and Brightness modes each combine the given value from the foreground layer with the other two from the background layer. Saturation applies the foreground saturation to the background hue and luminance values, Hue combines the foreground hue with the background saturation and luminance, and Brightness uses the foreground luminance in combination with the hue and saturation of the background.

Color takes both the hue and saturation of the top layer, using only the luminance from the underlying background ( Figure 3.36 ).

Keep these modes in mind as shortcuts to channel operations in which you might want the color from a foreground combined with the detail (luminance) of the existing background.

#### Stencil and Silhouette

The Stencil and Silhouette blending modes apply transparency information to all of the layers below them in the composition. The Stencil modes use the light pixels, and Silhouette the dark pixels, of either the Alpha or Luminance values to determine the areas that remain visible in the layers below the current layer. You can keep these in mind for occasions in which they save you extra setup work.

#### Alpha Add and Luminescent Premultiply

Alpha Add and Luminescent Premultiply are special-case blending modes that affect semi-transparent edge pixels only.

Have you ever tried matting a layer with an alpha channel over the same layer with the alpha channel inverted? Figures 3.37a through d show the typical result: a semi-opaque line tracing the edge of the alpha, where the pixels remain semi-transparent because they are blended together in the same manner as semi-opaque layers. Alpha Add adds the actual values of the alpha pixels without compensating for the opacity effect, so two 50% opaque pixels become 100% opaque.

Why would you combine a layer with itself, inverting the alpha? You probably wouldn't. But you might combine two layers with overlapping transparency that would require this method—for example, two parts of the same layer.

Luminescent Premultiply is an alternative method of removing premultiplication from source footage, retaining bright values that would otherwise be clipped. Premultiplication over black causes all semi-transparent pixels to become darker; removing the black values while adding transparency, which is what removing premultiplication does, can cause them to appear dimmer than they should. This is useful for bright overlaid elements that come in with alpha channels and premultiplication, such as flares and explosions; you can set the footage to interpret as Straight on import and use this mode instead of Normal to overlay the element. It's another trick to keep in your arsenal should you ever see the symptoms (dim translucent elements) for which it is recommended.

• 🔖 Save To Your Account

### 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.

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.

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.

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.