Please note that shapes in Motion 3 now have an Offset parameter and a related Write On behavior. This allows for them to be stroked on, though only solid-line shape types can do this, so this tutorial is still relevant.

A common task in motion graphics is drawing an animated line. In this tutorial, you'll see how you can use the replicator to easily animate a line on a map image, as seen above.

What is the replicator?

For those of you who aren't familiar with the replicator, here's the one-line description: it allows you to create and animate a pattern of objects. Similar to particles, the replicator consists of a parent replicator object and one or more replicator cells.

In this case, we're going to build our replicator from a little rectangle shape object. But first, we need to draw the path that we want our line to follow.

Draw the line path

  1. Select the bezier (or b-spline, if you are so inclined) drawing tool from the toolbar (or press the 'B' key).
  2. Draw a line that will be the path that the replicator will follow in the Canvas.
  3. Double-click on the last point (not the first, because we want an open shape) to finish drawing.
  4. In the Layers list, name this shape something meaningful, like 'Line Path'.

Now we're ready to build our replicator. We need the seed from which all will grow, so let's draw a little box.

Draw the replicator source shape

  1. Select the rectangle shape tool from the toolbar (or press the 'R' key).
  2. Draw a small rectangle in the Canvas.
  3. Press the Tab key to exit the shape drawing mode.
  4. In the Layers list, name the shape something meaningful, like 'Line Box'.

Replicate!

  1. Select the box shape and click on the Replicate button on the toolbar (or press 'L').
  2. Rename the newly-created replicator to 'My Line'.

As you can see, the default build pattern of the replicator is a box, making a nice grid. While there are a number of different (and fun) patterns to choose from, we want to build our replicator along the path that we already drew (Line Path), so we need to change the replicator build type and make our line path the source for the pattern.

Change the replicator build type

  1. Select the replicator and go to the Replicator tab in the Inspector.
  2. Set the Shape to 'Geometry'.
  3. From the Layers list, drag the Line Path shape into the geometry source image well in the Inspector.
  4. In the Layers list, disable the Line Path shape so that it is no longer visible.

Now we have our path-based replicator, with a few little blocks on it. To make it look like a proper line, we'll need to increase the number of points in the replicator. We could increase them to where they touch and form a smooth line, but in this case we're after a dashed-line effect. We also want to enable the Align Angle parameter so that the blocks auto-align their rotation to the path.

Adding points and changing alignment

  1. Select the My Line replicator and go to the Replicator tab in the Inspector.
  2. Increase the Points parameter value until you get a nice, dashed look (20, in my case).
  3. In the Cell Controls section, enable the Align Angle checkbox.

And there you have the basic line. Since the replicator is using the path you drew as its build path, you can easily change the line by adjusting the original Line Path shape. And you're not limited to little blocks: you could make a line out of other shapes, particles, or even video clips. Let's go ahead and make this line a little purtier. Since we're going for a map-effect, let's drop a map into the background.

Now for some color. There are a couple of different ways to colorize our line: we could set the color for the original box shape (Line Box), or we could tell the replicator to colorize the shapes over the build. While the replicator method allows for some wild stuff, like this...

...we want to use the shape controls to add an outline to each line segment, which means we'll do the color in the source shape.

Stylizing the line

  1. In the Layers list, select the Line Box shape and go to the Shape tab in the Inspector.
  2. Change the fill color to your heart's desire (I chose red).
  3. Enable the Outline parameter for the shape, and set the width to 3 and the color to black (or whatever you like).

Now that we have our fully drawn-on line, we need to give it some animation. On to page 2...

Page 2: Animation ->