CAP 151 - Introduction to Computer Animation

Lesson 4 - Creating Transparency


This lesson discusses transparency and tools to create it. Objectives important to this lesson:

  1. Masks, Mattes, and Stencils
  2. Masking
  3. Using Track Mattes
  4. Stencil Alpha and Stencil Luma

We will not hit all the material in this lesson. The most important sections are listed above. You may want to go over more of the tutorials for reference, as needed for assignments and projects.

The text discusses three different but related ways to add some transparency to a comp: masks, mattes, and stencils.

  • masks - a mask cuts out part of a layer, typically so another layer can show through it. A mask affects one layer.
  • mattes - also called track mattes; mattes combine two layers: the first one is called the matte, and it affects what part of the the underlying (fill) layer you see. In that way, the visibility/transparency of both layers will be affected. The matte can be based on the alpha channel (transparency) of the matte layer, or on its luminance (brightness). A matte affects two layers.
  • stencils - stencils affect all layers below them. They can be based on alpha channels or luminance. A stencil affects multiple layers.
Tutorial Notes and Questions

Work through the exercises and turn in your answers to all questions below as part of the homework for this assignment.

Tutorial 1 (Masking):

  1. It's only chapter 4, and the authors are tired. (They are assuming we opened the project file.)
    Start After Effects. Load the project for this lesson. Open and preview the indicated comp to see where we are going.
  2. Open the real starting point comp. The text says to open the foreground layer.
    Question 1: If it were not named, how would you recognize a foreground layer by its position in the Timeline panel?
    Use the Rectangular Mask tool to select a portion of the comp as shown on page 84. Note that it will cause the rest of selected layer to disappear in the comp panel. Press M to add the mask to the Timeline. (This means it will have properties we can manipulate.) If needed, click Toggle View Masks to see the yellow outline around the mask.
  3. The text calls your attention to the handles around the mask that appear when you double-click its yellow border. This lets you tweak the size and shape of it. The text also calls the handles Free Transform Points. As may be obvious, dragging a handle changes the border, but dragging the mask itself will move the mask. (The cutout will be over a different part of the layer.)
  4. Step 4 illustrates a problem and its solution. Having made a mask over the layer, you can't see the layer to make another mask over another part. Double-click the layer to open it in the Layer panel. You will be able to see the whole layer there.
    Question 2: What are the two things you have to do in the Layer panel to get it to show the whole layer?
    At this point, the Layer panel can serve as your work panel, and the Comp panel serves as a quick view of what you have done.
    As you draw the second mask, you are told to make it a square instead of a rectangle.
    Question 3: How do you constrain the tool to draw a square?
  5. Step 5 points out the vertices (corners) of your masks. Note that vertices are not handles: dragging a vertex has the same result as dragging the mask in step 3.
  6. Experiment with the Mask Feather feature to apply soft (blurry) edges to the masks. This feature may or may not be needed, based on the comp you are creating.
  7. Step 7 adds a special effect: a drop shadow. The text points out that a effect of this sort is calculated after the masks have been applied. Good thing, otherwise you couldn't get a drop shadow that the mask didn't block. Applying a drop shadow to the layer effectively applies it to both masks.
  8. Step 8 moves on to animating a mask. First, open the indicated text graphic, adding it to the current comp.
  9. Change the color of the text as instructed. You may want to experiment with other colors once everything else is working.
  10. Select the text graphic layer and double-click on the Rectangular Mask tool to create a mask that fits the layer.
  11. Show the Mask shape again, as instructed. Set the time marker at 1:00 and set a keyframe.
    Move the time marker to the start of the comp.
    Question 4: Note the hotkey sequence to select the Free Transform Points. What is it?
    This hotkey will be more convenient than trying to click the border of the mask.
    Follow the instructions to close the mask, hiding the text. Try the instruction to feather only the x-axis of the mask.
  12. RAM preview. Move the text layer to start later, Preview again. Adjust it to your liking and save the project.
  13. Three more steps. Create another mask, this time as a layer: click Create a Layer, New, Solid. Pick a color that might work with the other colors in the comp. (No color sense? Try Visibone. Pick combinations of colors to see what they look like next to each other.) We will use a mask with this layer to make a vignette. (No, I have never heard of the word being used that way either. That's why I linked to a dictionary. Vignette: a picture whose edges shade off into the surrounding color.)
  14. Choose an elliptical shape for the mask as instructed. Why? Because it will fit the comp, and it will do what the authors want.
    Question 5: What technique are you told to use to make the mask the size of the comp?
  15. Display all the properties of the mask by pressing MM while it is selected. Invert the mask and feather the edges. Work with opacity and expansion to get an effect like the one in the text. Don't expand it too far, or there was no point in making it.

Let's move ahead to Track Mattes, on page 96. This tutorial uses a transparent matte to show the material underneath it in the comp.

Tutorial 2 (Track Mattes):

  1. Close all open comps as instructed. Open the indicated comp,
  2. As noted above, you will need two layers to use a track matte. This step gives us a new term. The matte layer goes on top of the fill layer.
    Add the indicated movie to the comp for use as the fill layer.
    Add the indicated text graphic as the matte layer. Order the layers as needed.
  3. If you can't see the Modes column in the Timeline, press F4 as instructed to display it.
    Confirm that all the choices on the TrkMat popup/dropdown for the movie list the name of the graphic in the layer above it. Choose the one for Alpha Matte.
    This should cause the text to act like a cutout at this point, and the movie should show through the letters of the text.
  4. To show an option that will feel confusing, step 4 shows us that we can an Alpha Matte (see through the matte) or an Alpha Inverted Matte (see through everything but the matte).
    Of course, in this case there would be no need for so much complexity. We could just put white text over the movie and not need a matte at all.

    The text pauses to point out that it would be hard to animate the matte and the fill layers simultaneously, keeping them in alignment. So a new thought is offered: what if we nest the comp they are in inside another comp?
  5. Open the new indicated comp.
  6. This step gives you two ways to add the comp you were working on to the new one (which has some layers in it already). Try the method that says to drag your first comp from the project panel and drop it on the second comp (also in the project panel). Select the second comp to see the first one as a layer in it. (See the illustration on page 98.)
  7. Preview and adjust as instructed.
  8. Step 8 has another new command. The text says the orange-red color of the movie in the first comp is not good, so you are told to invert the colors. (If you don't understand the reference to a color wheel, go back to the Visibone site again. Colors can be shown as a continuous spectrum on a wheel. The inverse of any color is in the opposite place on the wheel.)
    Question 6: What is the command to invert the colors?
    Oops, the authors are still not happy with the colors. (Makes you wonder why they chose that movie, doesn't it?) The next command to fix the color is another effect: Effect, Color Correction, Hue/Saturation. Make the indicated change.
  9. Add the indicated effect to the nested comp.
  10. Add the indicated effect to the nested comp.

Tutorial 3 (Stencil Luma):

The first Stencil tutorial is on a special page in the lesson. Turn to page 102.

  1. On the Comp Viewer dropdown menu, choose Close All. Open the file indicated for this tutorial. Note the description of the material in the comp.
  2. Add the indicated movie to the top of the the timeline stack. Adjust the layer on the timeline so it starts when indicated.
  3. Change the Mode of the movie to Stencil Luma. The dropdown list to select this from is illustrated on page 102. This will cause the lower layers to appear in the outline of the cloud movie.
    This step also tells you to select Silhouette Luma. Just to this for a moment, then change it back. They want to show you that the Silhouette option is the inverse of the Stencil option.
  4. This stencil shows you portions of all layers below it. Since it is a Luma option, it is based on the brightness (luminosity) of the lower layers. Try dragging the layers into another stack order, as instructed.

Look over the Stencil Alpha tutorial on page 103 as well. Do it in class if there is time.


Assignment 5: To be announced.