In this lesson of the After Effects Fundamentals series, you'll learn how to create, manipulate, and animate shape layers (including lines). While I wouldn't reccommend creating an entire complex illustration inside After Effects using shapes and paths (it would be much easier in Adobe Illustrator), shape layers have some unique properties that can be handy.
Jump to topic on this page:
Find in video:
0:31
2:09
3:29
5:01
6:15
6:59
8:22
11:57
The Shape Tool is in the toolbar at the top of the screen. If you click and hold the Shape Tool icon, more options for different shapes will appear. Select what type of shape you want to create, then click and drag to create the shape in the Composition Viewer.
To create a perfect circle or square, hold down the shift key while dragging out your shape.
At the top of the screen to the right of the Shape Tool, click the rectangle next to Fill to change the main color of the shape. Click the open box next to Stroke to change the color of the outline (stroke). Adjust the stroke weight with the blue number just to the right of the color.
Make sure your shape layer is selected before adjusting the fill and stroke.
The options to adjust the colors and other settings related to gradient fills or strokes will be in the timeline. Once you apply a gradient fill or stroke to your shape it should automatically open these settings on the shape layer in the timeline. Otherwise, just toggle down the shape layer and these setting will be under Contents.
If you want to create additional shapes on their own layers, make sure that no layers are selected first. If you want to add a shape to an existing shape layer, make sure that layer is selected, then create the shape.
The anchor point is the point that all transformations revolve around. For example, if you rotate or scale a layer, it will do so from the anchor point.
It's a good idea to position the anchor point where you want it before you animate anything. If you set keyframes and then move the anchor point, it may affect your animation.
To adjust the anchor point (on any kind of layer), use the Pan Behind Tool found in the toolbar at the top of the screen. Then drag the anchor point where you want it.
Pan Behind Tool
Y
Snap anchor point to corner, edge, or center
⌘/Ctrl while using Pan Behind Tool
Selection Tool
V
If you want your shape to be a certain size, in pixels, you can type those numbers in here. If you want to animate your shape changing size, you could animate the actual size property instead of animating the scale property. This way, if you have a stroke on the shape, the stroke will always stay the same, even as the shape changes size.
Take a look at the difference in how the stroke on these two squares behaves when animating the scale verses the size property:
Notice how there is a Position property under the Contents > Rectangle 1 > Rectangle Path 1 and a Position property under Transform. The Position property under the the shape is the position of the shape relative to its anchor point. The Position property under Transform will move the position of the entire layer (layers can have multiple shapes within them) and these values are relative to the composition.
There are creative ways to animate these different Position properties depending on what you want to achieve. If you're not trying to do anything fancy, you probably just want to animate the Position property under Transform.
In addition to adjusting the stroke and fill colors of your shape in the top toolbar, there are options to adjust and animate properties of the stroke and fill in the timeline.
To add a stroke or fill, click the Add button in the timeline:
Stroke properties are covered in more detail here.
The layer order matters for the stroke, fill, and any other operators (all the things below fill and stroke in the pop-up menu above, like merge paths, trim paths, etc.).
Shape layers have two sets of Transform properties.
Remember, you can have multiple shapes within a shape layer.
There are creative ways to utilize the fact that there are two sets of transform properties to achieve certain effects. When you're first starting out, and not trying to do anything fancy, you probably want to animate the properties under "Transform" (i.e. the ones for the entire layer).
Click and hold the Shape Tool to get to the Rectangle, Ellipse, Polygon and Star Tool. The Rounded Rectangle Tool is redundant because you can adjust the roundness of the corners of a regular rectangle.
Polygons and stars are interchangeable after you create one–just use the drop down menu:
Adjusting the properties of polygons and stars can result in unique shapes. These are the same shapes as above, just with different values in certain properties:
If you click the triangle next to Add in a shape layer in the timeline, you'll get a pop-up menu with things you can add to your shape layer. These will allow you to manipulate the appearance of your shape by giving you new properties to adjust and even animate. The Trim Paths operator is covered later in this lesson.
The Pen Tool allows you to draw any shape you want. It's located just to the right of the Shape Tool in the top toolbar. The After Effects Pen Tool works the same way as in other programs like Illustrator and Photoshop.
Drawing with the pen tool can take some practice if you've never used it before. Besides using the Pen Tool in AE, AI, or PS, here are some fun ways to practice:
First select the Shape Layer. Then using the Pen Tool, hover over the path where you want to add the point. You should see a + come up next to your Pen Tool cursor. Click to add a point.
Alternatively, you can click and hold the Pen Tool icon in the top toolbar to find the Add Vertex Tool.
Click and hold the Pen Tool icon in the top toolbar to find the Delete Vertex Tool. Then click the point on the path you want to delete.
Click and hold the Pen Tool icon in the top toolbar to find the Convert Vertex Tool. Using the Convert Vertex Tool, you can click a vertex point without handles to add them. Or click a vertex point with handles to get rid of them.
Handles can be adjusted with the Convert Vertex Tool with the Selection Tool (the normal mouse cursor). If you adjust handles with the Convert Vertex Tool, the handles will move independently. With the Selection Tool, handles will move together unless you hold down Option/Alt (after clicking and holding the handle).
To animate the path of a shape changing, toggle down the layer in the timeline to find the Path property that has a stopwatch icon: Contents > Shape # > Path # > Path. Click the stopwatch to set a first keyframe, then move your playhead and adjust the vertex point/s on the path by clicking and dragging them or adjusting the handles.
Understanding the differences between the two types of shape layers in Adobe After Effects, parametric and bezier shapes is key to being able to create complex, shape-based animations like morphs.
To create a line, use the Pen Tool. Holding shift as you add your second point will make the line perfectly horizontal or vertical. Remember to go back to the Selection Tool after you create a line.
Make sure your line has a stoke (both color and thickness > 0 px) and no fill.
These properties can be adjusted or animated to customize your line:
To add dashes, click the + icon next to Dashes. Click the + again to add a gap between dashes. You can add different sized dashes and gaps by clicking the + icon multiple times. To delete a dash or gap use the - button. Animating the Offset will move the dashes along the path.
Either end of a line, or both, can be tapered. To see a taper, the Start Length or End Length must be greater than zero. Here's what the taper properties affect:
There's also an easy way to create and animate a wavy line:
If you're looking for more of a zig zag, check out the Zig Zag operator (click the Add button).
Click the Add button (triangle in a circle). From the pop-out menu, choose Trim Paths.
Animate the End and Start properties to animate the line in and out. The Offset property will move the line along the path (the line will need to be less than 100% to see anything when adjusting the Offset).
Here's what the keyframes look like to animate a line in then out:
Slide the Start property keyframes to the left to have the line start animating out as it's still animating in.
There are tons of creative ways to use trim paths. In fact, the two classes below show you how to use trim paths to animate text:
Here are 7 more tips for working with shape layers in After Effects.
Anchor points were briefly covered in this lesson, but you'll learn even more about them in the next lesson.