How To Trim Paths In After Effects - Beginner Tutorial

Trim paths is a feature in After Effects that lets you animate the appearance of a shape layer along a path. You can use trim paths to create different effects, such as drawing a line, revealing a logo, or wiping a screen, by adding keyframes to the Start, End, and Offset properties of the trim path modifier.

December 4, 2024
How To Trim Paths In After Effects - Beginner Tutorial

After Effects Trim Paths

The main reason why some shape layers can’t be animated fully in After Effects is that they lack the trim path modifier. The trim path modifier is a feature that allows you to animate the appearance of a shape layer along a path. You can use it to create various effects, such as drawing a line, revealing a logo, or wiping a screen. In this article, I will show you how to use trim paths in After Effects step by step.

You will learn:

  • How to add trim paths to a shape layer
  • How to animate trim paths
  • How to use trim paths for different effects

How to Add Trim Paths to a Shape Layer

The first thing you need to do is to create a shape layer. A shape layer is a layer that contains one or more vector shapes that you can draw, edit, and animate. You can create a shape layer by using any of the shape tools in the toolbar, such as the pen tool, the rectangle tool, or the ellipse tool. You can also import a vector file, such as an Illustrator file, and convert it to a shape layer.

To create a shape layer, follow these steps:

  1. In the project panel, create a new composition by clicking on the new composition button at the bottom of the panel. A composition is a container for your layers and effects. You can set the size, duration, and frame rate of your composition in the composition settings dialog box that appears.
  2. In the composition panel, select a shape tool from the toolbar. The toolbar is located at the top of the screen, below the menu bar. You can choose from different shape tools, such as the pen tool, the rectangle tool, or the ellipse tool. You can also access more shape tools by clicking and holding on any of the shape tools and selecting from the pop-up menu that appears.
  3. In the composition panel, click and drag on the canvas to draw a shape. The canvas is the area where you can see your composition. You can adjust the size, position, and rotation of your shape by using the selection tool and the transform controls. You can also modify the shape by using the shape options in the toolbar, such as the fill color, the stroke color, and the stroke width.
  4. In the timeline panel, you will see a new shape layer that contains your shape. The timeline panel is located at the bottom of the screen, below the composition panel. You can rename your shape layer by selecting it and pressing the enter key. You can also duplicate, delete, or hide your shape layer by using the layer menu or the keyboard shortcuts.

To add trim paths to your shape layer, follow these steps:

  1. In the timeline panel, select your shape layer and press U twice on your keyboard. This will reveal all the modified properties of your shape layer. You will see a row called Contents, which contains all the shape elements and modifiers. A shape element is a basic shape, such as a rectangle, an ellipse, or a path. A shape modifier is an effect that changes the appearance of a shape element, such as a twist, a zigzag, or a trim path.
  2. In the timeline panel, click on the Add button at the right end of the Contents row. A pop-up menu will appear with various options. Choose Trim Paths from the menu. This will add a trim path modifier below the shape elements. A trim path modifier allows you to animate the percentage of the path that is visible from the beginning and the end of the shape.
  3. In the timeline panel, expand the trim path modifier by clicking on the arrow next to it. You will see three properties: Start, End, and Offset. The Start property controls the percentage of the path that is visible from the beginning of the shape. The End property controls the percentage of the path that is visible from the end of the shape. The Offset property controls the position of the trim path along the shape. By default, all the properties are set to 0%, which means the entire shape is invisible.

How to Animate Trim Paths

To animate the trim path, you need to add keyframes to the Start, End, and Offset properties. A keyframe is a point in time that records the value of a property. By adding keyframes at different points in time and changing the values of the properties, you can create a smooth transition between the keyframes. You can also adjust the speed and easing of the animation by using the graph editor or the speed controls.

To animate the trim path, follow these steps:

  1. In the timeline panel, move the current time indicator to the point where you want to start the animation. The current time indicator is a blue line that shows the current frame of your composition. You can move it by clicking and dragging on the time ruler or by using the keyboard shortcuts.
  2. In the timeline panel, click on the stopwatch icon next to the Start, End, or Offset property. This will create a keyframe at the current time indicator and enable the animation for that property. You will see a small diamond icon on the property row that represents the keyframe. You can also right-click on the property and choose Toggle Animation from the menu to create a keyframe.
  3. In the timeline panel, move the current time indicator to a different point where you want to change the value of the property. You can use the page up and page down keys to move the current time indicator one frame forward or backward.
  4. In the timeline panel, change the value of the property by clicking and dragging on the value or by typing a new value in the box. This will create another keyframe at the current time indicator and change the value of the property. You will see another diamond icon on the property row that represents the keyframe. You can also use the up and down arrow keys to increase or decrease the value of the property by 1%.
  5. Repeat steps 3 and 4 to create more keyframes and change the values of the properties. You can also copy and paste keyframes by selecting them and using the edit menu or the keyboard shortcuts. You can also delete keyframes by selecting them and pressing the delete key.
  6. In the timeline panel, preview your animation by pressing the spacebar or the zero key on the numeric keypad. This will play your composition from the beginning to the end. You can also use the RAM preview button or the preview panel to preview your animation. You can adjust the playback resolution, quality, and loop options in the preview panel.

How to Use Trim Paths for Different Effects

You can use trim paths to create different effects, such as drawing a line, revealing a logo, or wiping a screen. You can also use trim paths on multiple shape elements or layers. To do this, you need to copy and paste the trim path modifier from one layer to another. You can also use the pick whip tool to link the trim path properties of different layers. This will make them follow the same animation. You can also offset the trim path animation of different layers by changing the keyframe timing or the offset value. This can create a staggered or synchronized effect.

Here are some examples of how to use trim paths for different effects:

  1. Drawing a line: To create a drawing effect, you can use a shape layer with a path element and a trim path modifier. You can animate the End property from 0% to 100% to make the line appear gradually along the path. You can also animate the Start property from 0% to 100% to make the line disappear gradually along the path. You can also use the Offset property to shift the position of the line along the path. For example, if you want to draw a line from left to right, you can do the following:
  2. Create a new composition and add a shape layer with a path element. You can use the pen tool to draw a path on the canvas. You can also use the selection tool and the transform controls to adjust the size, position, and rotation of the path.
  3. Add a trim path modifier to the shape layer and expand it. Set the Start value to 0% and the End value to 0% at the first keyframe. This will make the line invisible.
  4. Move the current time indicator to a later point and set the End value to 100%. This will make the line appear gradually along the path.
  5. Preview your animation and adjust the keyframe timing and easing as needed.
  6. Revealing a logo: To create a revealing effect, you can use a shape layer with a vector file and a trim path modifier. You can animate the Start and End properties from 0% to 100% to make the logo appear gradually along the path. You can also use the Offset property to rotate the logo along the path. For example, if you want to reveal a logo in a circular motion, you can do the following:
  7. Create a new composition and import a vector file, such as an Illustrator file, that contains your logo. You can drag and drop the file from the project panel to the composition panel. You can also use the file menu or the keyboard shortcuts to import the file.
  8. Convert the vector file to a shape layer by right-clicking on the layer and choosing Create Shapes from Vector Layer from the menu. This will create a shape layer that contains your logo as a shape element. You can also use the layer menu or the keyboard shortcuts to convert the layer.
  9. Add a trim path modifier to the shape layer and expand it. Set the Start value to 0% and the End value to 0% at the first keyframe. This will make the logo invisible.
  10. Move the current time indicator to a later point and set the Start value to 100% and the End value to 100%. This will make the logo appear gradually along the path.
  11. Move the current time indicator to another later point and set the Offset value to 360 degrees. This will make the logo rotate one full circle along the path.
  12. Preview your animation and adjust the keyframe timing and easing as needed.

These are some of the basic steps for using trim paths in After Effects. You can experiment with different shapes, paths, and values to create different effects.