Working with Alpha Channel Transparencies

Most video clips and many graphics have alpha channels. Coupled with an image's red/green/blue (RGB) color information, an alpha channel defines how clips or graphics will be displayed over a background image.

The alpha channel uses 8 bits of information to describe 256 shades of gray. In typical computer graphics, white regions of the alpha channel are opaque?that is, they cover any clips beneath them on the timeline. Black is transparent and lets any lower clips show through. Finally, gray lets some background come through, depending on the level of gray.

On the other hand, a typical video's alpha channel describes gray values on a pixel-by-pixel basis instead of by a larger region, making it impractical to use the Alpha Channel Transparency setting on a video clip.

An alpha channel is either straight or premultiplied. A straight alpha channel stores its transparency information only in the alpha channel. You'll use Premiere's alpha channel transparency on straight alpha channels. I'll explain how in a moment.

A graphics with a premultiplied alpha channel includes transparency information in both the alpha channel and the edges of the graphic. If you apply an alpha channel transparency to such graphics, they'll probably look blurry or have stray pixels of variable color along their edges. To avoid that, you can use a black alpha matte or white alpha matte on them. I explain more in the "Creating Transparencies with Premultiplied Alpha Channel Graphics" sidebar, later in this hour.

Task: Make an Alpha Channel Visible

To see an alpha channel, follow these steps:

  1. Place any video clip on Video 1 in the timeline.

  2. Import a graphic with an alpha channel to your project and drag it to a superimposing track?Video 2 or higher?directly above the clip on Video 1. If you don't have such a graphic, use the Veloman.eps file from Premiere's Sample folder.

  3. Open the graphic's Transparency Settings dialog box by clicking Setup in the Effect Controls palette. Select Alpha Channel. You'll note in Figure 15.1 that with Alpha Channel selected, there are no sliders. This transparency is either on or off. Even if the alpha channel has some gray in it, you cannot adjust that level from within the Transparency Settings dialog box.

    Figure 15.1. The Alpha Channel Transparency Settings dialog box offers no sliders to adjust values, such as Similarity or Threshold.



    The graphic I used for Figure 15.1 is a Photoshop document (PSD) file type. If you use the Veloman graphic from the Premiere Sample folder, you may note that it's an Encapsulated PostScript (EPS) file type. The latter, Adobe-created format contains vector and bitmap information. You can use both Adobe Illustrator and Photoshop to create EPS files. Desktop publishers frequently use EPS files because they are highly compatible and reliable.

  4. Check the Mask Only box. As Figure 15.2 shows, the white area matches the edges of the logo and is opaque. The black area is, digitally speaking, as transparent as glass.

    Figure 15.2. A logo's alpha channel mask. White is opaque, and black is transparent.


  5. Uncheck the Mask Only box and preview how the graphic appears over the clip below it on the timeline by clicking the page peel icon. It'll look like Figure 15.3.

    Figure 15.3. The logo with a transparent alpha channel over the background image in the lower video track.



This "white equals opacity and black equals transparency" issue may seem a bit confusing, especially because the lettering on the logo graphic I used is black but is opaque. What's more, the rectangle around the logo is white but is transparent.

What determines the opacity/transparency is not the color of the graphic but rather the grayscale level of the alpha channel. In this case, after applying the alpha channel transparency and selecting Mask Only, you'll see that the alpha channel associated with the black logo text is white. The graphic text is black, but the alpha channel beneath it is white, and white is opaque. You will not be able to see through the black text to the clip below because its associated white alpha channel is opaque.

Task: Add Motion Using the Motion Settings Dialog Box

You can apply motion to a graphic using the Motion Settings dialog box. Follow these steps:

  1. Select the graphic with the alpha channel.

  2. Open the Motion Settings dialog box. Either right/Option-click and select Video Options, Motion or open the Effect Controls palette and select Setup next to Motion.

  3. Locate the Alpha radio buttons, highlighted in Figure 15.4, below the preview screen and select Use Clip's. This will ensure that you don't see the graphic's rectangular bounding box moving across the screen. You'll see only the graphic.

    Figure 15.4. Selecting the Use Clip's radio button in the Motion Settings dialog box means only the graphic will move around the screen, not its bounding box.


Creating Transparencies with Premultiplied Alpha Channel Graphics

Think of straight alpha channels as cookie cutters. Graphic artists "bleed" some of their graphics slightly beyond the edges of the white portion of the alpha channel, knowing that when they apply an alpha channel transparency, it will act like a cookie cutter, slicing a sharply defined edge along the graphic and ensuring there will be no gaps along the border.

In a graphic with a premultiplied alpha channel, the white portion of the alpha channel exactly matches the edge of the pixels in the RGB graphic. In most cases, premultiplied graphics have either black or white backgrounds. Because of anti-aliasing, the background color darkens or lightens these pixels along the edge of the graphics.

If you use graphics with premultiplied alpha channels, do not use an alpha channel transparency. If you do, you will experience some unpredictable fringing around the edges. Instead, use an alpha matte that matches the background color.

Figures 15.5 through 15.7 demonstrate how that works and what can happen if you apply the wrong transparency.

Figure 15.5. Applying an alpha channel transparency to a premultiplied graphic with a white background creates stair-step, aliased edges.


Figure 15.7. The same white background graphic with the white alpha matte applied looks sharp and clear.


The solution is simple: To key out the white background of a graphic with a premultiplied alpha channel, use a white alpha matte transparency.

To key out a black background, use a black alpha matte transparency.

Figure 15.6. The same graphic with a black alpha matte applied creates a pixelated mess.


    Part II: Enhancing Your Video