Have you ever seen publications where some text borders images, so it seems to follow their silhouettes perfectly regardless of whether they have curves?
To make this effect when animating is also possible, and it is much more interesting because you can add motion to it. You only need to define a baseline for your words (flat or curved) to move them over. Follow these steps to learn how to move a text through a path in After Effects:
Using the keyframes of the Path option to move text
To animate any element in After Effects, you always need open the properties of the layers that correspond to them. So, to move a text or a word over a defined path, the first thing to do is to activate the Text tool by clicking Ctrl + T or Cmd + T and typing anything on your canvas. Then, once you have your word ready:
- Select the Text layer on the Timeline corresponding to the word you just typed, and then activate the Pen Tool in the toolbar.
- Ensure that the icon next to your cursor is a square with a dot inside, not a star. That means you will create a Mask and not a Shape.
- Click anywhere on your canvas and start drawing a line. Try to make it curved by holding on the click on each dot you place.
- When your line is done, go back to the Text layer corresponding to the typed word and expand the properties tab.
- Open the Path Options, and in the box next to Path, select Mask 1: this is the layer corresponding to the line you drew in step three.
6. Once you select Mask 1, you will see how every character of your word is placed over the created line following its shape. Note the Path options available to you to put your text on your mask and animate it:
- Reverse Path: place your text below rather than above the line.
- Perpendicular Path: position your characters on top of your path.
- Force Alignment: make all the characters occupy the entire space of your mask, depending on their length.
- First Margin: To determine which way your text will move.
- Turn on the Perpendicular Path Option, so your text is read correctly.
- Hover over the First Margin option and scroll its blue highlighted value to the left so After Effects knows that your motion will start from that side. Don't worry if you stop seeing the text; it will enter from outside the screen.
- When you're satisfied with the value you've set, create your first motion keyframe by placing the Time Indicator at the start of the Timeline and turning on the stopwatch next to First Margin.
- Create a second keyframe by moving the Time Indicator forward a few seconds and scrolling again on the value highlighted in blue, but this time to the right. This way, After Effects, will know that you want to move the text in that direction. Increase the value until the text reaches the end of your path.
- Select the two keyframes you created in the Timeline as if you wanted to group them, and hit F9 to ease them.
- Place the Time Indicator at the start of the Timeline and hit the spacebar to play the animation.
You can make any path with the Pen tool, as long as you make a mask and not a shape. This way, the words you type will always follow the line you create, no matter how complicated.
Finally, turn on and off the Path Options presented in step six to try out the different ways of placing a word on a custom line and have fun animating your texts with this trick.