Writing on your shape's outline
Motion gives you the ability to draw and erase shape outlines easily. Maybe you want to draw on an animated line over a map to animate the path of travel. Let's see how we can use this.
- From the exercise files of this chapter, open the
03_10
project by double-clicking on it. - The project consists of a simple circle and square. Let's apply a Shape behavior to draw these objects on the screen. Select the Rectangle layer and click on the gear icon under the Canvas. Navigate to Shape | Write On as shown in the following screenshot:
- Nothing happens. That's because the Write On behavior will only work on the outline, not the fill of a shape. Press the F4 key to go to the Shape tab of the Inspector. Under the Style pane, turn off Fill and turn on Outline as shown in the following screenshot. Play back the animation.
- The Rectangle layer is drawn onscreen over the length of the project. Stop the playback. Select the Write On behavior in the Layers tab and move your playhead to 2 seconds in the mini-Timeline. Press the O key to trim the out-point of the behavior. Play back the animation and notice the outline being drawn over 2 seconds.
- Let's spice up the look of the outline. Select the Rectangle layer and press the F7 key to bring up the HUD. Click on the icon next to Shape Styles and select Frost Heavy from under Garnish as shown in the following screenshot. Increase the Width of the outline to 16.
The outline is now a Frost Heavy texture as shown in the following screenshot. Your system may slow down if you try to play back. If it does, press the Command + R shortcut to create a RAM preview.
- Let's add another Write On behavior to the Circle. Rather than selecting the behavior from the gear icon, Option + click on the existing Write On behavior from the Rectangle and drag it to the Circle in the Layers tab.
- Select the Circle, and in the HUD, turn off Fill and turn on Outline. Increase the Length to
16
and the Roundness to 20
. Click on the icon next to Shape Style and choose Frost Light from under Garnish. - Select the Write On behavior under the Circle and change the value of Shape Outline to Draw and Erase, the Direction to Reverse, and the Speed to Ease Both. Move to 5 seconds on the mini-Timeline and press the O key to trim the behavior's out-point. Use the following screenshot for reference:
- Press the Command + R shortcut to create a RAM preview and then the Space bar to play back the animation. The circle draws on and erases off over a span of 5 seconds.
- The relationship between shapes and Paint in Chapter 6, Paint and Masks
- Using shape masks in Chapter 6, Paint and Masks