• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Hour 11. Using Layers in Your Animation > Task: Use Masking to Create a Spotlig...

Task: Use Masking to Create a Spotlight Effect

First let's create the spotlight and its motion. In a new file, draw a filled circle and convert it into a Movie Clip symbol called Spot.

Name the layer in which the Spot instance resides Spot Motion.

Insert a keyframe in frames 10, 20, and 30. In frame 10, move Spot to a new location and move it again for frame 20. (Leave 30 to match frame 1.)

Set up Motion Tweening in frames 1 to 10, 10 to 20, and 20 to 30, either with the right-click method or from the Properties panel.

Change the Spot Motion layer's Type property to Mask. Double-click the Page Curl icon for this layer to access Layer Properties.

Notice that the Page Curl icon changes to the Mask icon (see Figure 11.12). Lock the Spot Motion so that we don't accidentally change this layer.

Figure 11.12. Our Mask layer (Spot Motion) no longer has the Page Curl icon—after you change its type to Mask, the icon looks different.

Now we can insert a layer below this and change its type to Masked. Click the Add Layer button and the new Layer might appear above the Spot Motion. That's fine, but first name the new layer Skyline.

In order for Skyline to be Masked, it must be below the other layer, so click and drag down the Skyline layer. If you get lucky, the Skyline layer will automatically change to Masked (and you'll see an icon like the one shown in Figure 11.13). However, it's easy to do by hand, too. If you must, access Skyline's Layer Properties and change the type to Masked (which will be available only if the next layer above it is already set to Mask). The result should resemble Figure 11.13.

Figure 11.13. The Masked layer Skyline has a special icon; it's indented, and a dashed line separates it from the Mask layer above.

In the Skyline layer, draw lots of boxes (make them different colors to resemble a city skyline).

It should work. However, you'll only see the mask effect if you test the movie or lock all the layers. Change the background color of the movie to black (select Modify, Movie from the menu).

As interesting as this looks, there's something missing. It's actually the way a spotlight would look in space where there's no atmosphere. The black background is too dark. Let's make another layer with a dim version of the skyline to make this more believable.

First, select all the boxes you drew in Skyline (you'll need to make sure just this layer is unlocked to select it), and convert the shapes into a Movie Clip symbol called Building Graphic.

We'll be putting another instance of Building Graphic into a new layer. Create a new layer (click the Add Layer button). Name the new layer Dim Skyline.

At this point, you should analyze the Type property of each layer (which is easy to see by its icon). Chances are that the Dim Skyline layer is also Masked. One Mask layer can have several layers that are being masked. We want Dim Skyline to be Normal, but only after you move it down below Skyline. If Skyline is no longer directly under the shadow of Spot Motion, it will also revert to Normal. Drag the Dim Skyline layer down below Skyline, and then set the Type property for Dim Skyline to Normal.

Copy the instance of Building Graphic and paste in place (Ctrl+Shift+V) into the Dim Skyline layer. Hide all layers except Dim Skyline (so we're sure which one we're affecting). Then, with the instance of Building Graphic (in the Dim Skyline layer) selected, access the Properties panel. Set the Color Effect to Brightness and set the slider to –40%.

Looks great, eh? We didn't need to create this Dim Skyline layer to learn about masking, but it's a nice touch.

There are several things you simply cannot do with masks. Here are a few limits (and some workarounds). You can't have more than one symbol in the Mask layer. When you need multiple objects (like two holes in the mask), be sure to draw regular shapes in the Mask layer. Also, you can't combine Guides and Masks. Recall that Motion Guides involve a pair: the Guide and the Guided. Similarly, masking involves a Mask layer and a Masked layer. You can't combine them directly to have, for instance, a circle following a Motion Guide and masking the contents of the layer below it. It's not as though these limits will prevent you from animating just what you want, but they're small technical issues with which you'll need to find creative solutions. Some ideas will be presented in Hour 21, “Advanced Animation Techniques.”



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint