Filmora
Filmora - AI Video Editor
Edit Faster, Smarter and Easier!
OPEN

How to Create and Animate a Dashed (or Dotted) Line in After Effects

Effortlessly create video with AI

  • Various AI editing tools to increase your video creation efficiency.
  • Offer popular templates and royalty-free creative resources.
  • Cross-platform functionality for editing everywhere.
Edit Video For Free Edit Video For Free
qrcode-img
Scan to get the Filmora App
100% Security Verified | No Subscription Required | No Malware

Creating a stroke in After Effects is one of the first techniques many of you might have learned when starting with the software. Now, what if you want to turn that regular stroke into a dashed or dotted line in After Effects instead?

This time, we'll show you how to create a dashed or dotted line in After Effects, customize the look, animate it, and even try another way to create and animate a dashed or dotted line you probably like better outside AE.

create dashed dotted line in ae

Part 1. How to Create Dashed and Dotted Lines in After Effects

Creating any kind of stroke, including dashed or dotted lines, in After Effects starts with using the Pen Tool inside a Shape Layer. This is where you can draw your line, apply a stroke, and later animate it using Trim Paths.

For this tutorial, we'll be following the guide created by Ben & Jack Studio using After Effects 2020. However, the same steps also apply to other versions of After Effects, so you can follow along no matter which version you're using.

Step 1. Create a Shape Layer and Path

Select the Pen Tool (or press G) and draw your path on the preview panel. The moment you click, After Effects will automatically create a Shape Layer.

select pen tool in ae

Click once to place the first point, then click again to create the second. After Effects will draw a straight line connecting them.

draw line on preview window

Tip: If you want to make a curved path, click and drag when setting your second point instead of just clicking once. It will create Bezier handles that let you shape your curve.

Step 2. Add a Dashed or Dotted Line

In the Timeline Panel, open your shape layer and navigate to Contents > Shape 1 > Fill 1.

Set the Opacity to 0% to remove the fill color. This keeps only the stroke visible, which is essential for creating a dashed or dotted line.

set fill opacity to 0

Next, go to Contents > Shape 1 > Stroke 1. Find the Dashes section under the Stroke settings and click the + icon to create the dash line in After Effects.

add the dash property

Adjust the Dash value to control how it looks. Lower values create more dashes or dots.

Use the Offset control to fine-tune the dash positioning along the path.

To create a dotted line in After Effects:

In the Dashes section, click the + icon again to add a Gap property.

Adjust the Gap value to control the spacing between the dots. Smaller values make the dots closer together, while larger values spread them apart.

add the gap dashes property

Set the Line Cap option to Round Cap so the stroke ends are rounded.

Set the Dash value to 0, which turns each dash into a perfect dot.

set dash value to 0

You can also customize the dashed or dotted line further by setting the Stroke Color and adjusting the Stroke Width based on how bold you want the line to appear.

Step 3. Animate the Dashed Line with Trim Paths

create dashed line animation in ae

To create a dashed line animation that moves along the line, add a Trim Paths animation to your shape layer.

With the Shape Layer selected, click Add > Trim Paths.

select add trim paths

Expand the Trim Paths menu and you'll see two sliders: Start and End. They control how much of the line is visible.

Set Start to 0% and End to 0%, then click the keyframe icon next to End to create your first keyframe.

add trim path first keyframe

Move the playhead forward on the timeline to where you want the animation to finish, and set the End value from 0% to 100%.

add trim path second keyframe

Play back your composition. You'll see the dashed line smoothly draw itself along the path. You can use the same steps for creating a dotted line animation in After Effects.

Note: This tutorial focuses on making the line draw itself (from invisible to visible). If you want to create the reverse effect, where the line slowly disappears instead, just swap the keyframes. Set the End value to 100 percent at the beginning and 0 percent at the end.

Part 2. Common Issues and How to Fix Them

Did you run into problems while creating or animating your dashed line in After Effects? We've gathered some of the most common issues that usually appear when working with strokes or paths in AE, along with easy solutions you can try to fix them quickly.

1. The Dashed Line Looks Pixelated When Rendered

dashed line looks pixelated

If the dashed or dotted line you created looks blurry or jagged after export, it's usually because the composition resolution is set too low or the line has been scaled up from a smaller shape layer.

Quick Fix:

  1. In the Preview panel, set the Resolution to Full before rendering.
set resolution to full
  1. Avoid scaling the entire shape layer. You can increase the Stroke Width or recreate the path at the correct size instead.
  2. When exporting, choose a higher bitrate or a lossless format, such as QuickTime Animation, ProRes 4444, or AVI (Uncompressed), to preserve edge sharpness.

2. The Path Isn't Showing Dashes

path in ae not showing dash

Can't see any dash or dot pattern even after you added a stroke path in After Effects? You can check if the fill is still active, or the stroke properties weren't applied correctly.

Quick Fix:

  1. Open the Shape Layer settings and check if you have set the Fill Opacity to 0% so the stroke is visible.
  2. Go to Contents > Shape 1 > Stroke 1 and make sure the Dash and Gap values are added.

Another possible cause is that the path you're using isn't part of a Shape Layer, but instead a Mask Path. The Stroke effect applied to a mask doesn't support dash or gap properties. Dashes in After Effects only appear when the path exists inside a Shape Layer that has its own Stroke property.

using mask path instead of shape

Quick Fix:

  1. Copy the mask path and paste it into a Shape Layer instead.
  2. Follow the steps on how to create a dashed or dotted line in After Effects above.

3. Dashes Move Too Fast or Too Slow When Animated

dashed line moves too fast

If your dashed line animation feels too fast or too slow, the issue usually comes from how the keyframes are spaced or how the Offset value is set in the Stroke options.

Quick Fix:

  1. Open the Trim Paths settings on your Shape Layer.
  2. Move the keyframes closer together to make the motion faster, or spread them farther apart to slow it down.
  3. Use the Graph Editor to smooth out speed curves for a more natural animation.

4. Edges Look Harsh or Jagged

harsh or jagged edges

When the edges of your dashed or dotted line appear rough, it's usually due to low anti-aliasing or preview quality settings. Scaling the shape layer too much can also cause visible edge artifacts.

Quick Fix:

  1. Enable Continuously Rasterize (the small sun icon) for your Shape Layer to keep lines sharp at any size.
  2. In the Preview panel, set the quality to Best instead of Draft.
  3. Adjust the stroke width if you need a thicker line instead of scaling the shape layer directly.
  4. If edges still look rough, apply a Gaussian Blur effect with a small value, enough to gently smooth them out.

Part 3. Simple Way to Create and Animate Dashed Lines Without After Effects

For something easier and more beginner-friendly than After Effects, you can also try making dashed line animations directly in a video editor like Wondershare Filmora. Filmora offers you a more intuitive way to create custom paths and turn them into dynamic animations without the need for complex setups.

create dashed line on filmora
Try It Free Try It Free
qrcode-img
Scan to get the Filmora App
secure-icon Secure Download

You're not limited to making simple dotted lines — With Pen Tool, you can easily transform the path you created into a glowing trail, a fire-style animation, or even bind an object to follow along the path with just a few clicks. It's straightforward enough for beginners, yet still flexible to create impressive results.

Why We Recommend Filmora:

  • Quickly apply styles and effects like glow, fire, or blur to your dashed or dotted lines for an instant makeover.
  • Easily attach any object (or use a built-in preset) to follow your line animation smoothly along the path.
  • Enjoy a more intuitive interface that's beginner-friendly and far simpler to navigate than After Effects.

How to Create Dashed or Dotted Lines in Filmora

Step 1
Draw a Custom Path Using the Pen Tool
Open a new project in Filmora, then go to the Drawing Tool and select the Pen Tool to start creating your custom motion path.
select pen tool from drawing tools
Click anywhere on the preview window to set your first point. Click again to connect another point and form a straight line. To make a curve, click and drag before releasing.
draw a custom path in filmora
When you're done, press Esc on your keyboard to complete the path and exit drawing mode.
Step 2
Refine and Style Your Path
After you've drawn your path, head to Stroke > Effects settings on the Properties Panel and change the Style to Dashed Line.
set the style to dashed line
Now, you've successfully made a dashed line. You can customize it further by changing the path Cap and Join, or tweak the Weight slider to make the line thinner or thicker.
adjust the dashed line look
Step 3
Animate the Dashed Line Using Trim Path
To make your dashed line move along the path, you can also use the Trim Path feature in Filmora.
Move the playhead to the start of your timeline.
Set both the Start and End values to 0%. Add a keyframe for the End property to mark the beginning of the animation.
add the first keyframe in filmora
Move the playhead where you want the animation to stop, change the End value to 100%, and add another keyframe.
add second keyframe in filmora
When you play it back, the dashed line will smoothly draw itself from start to finish.
animated dashed line created in filmora
Step 4
Make an Object Follow the Path
If you want an object to move along the path you've drawn, enable the Path Follow option. Choose the object you'd like to attach. You can select from available presets, import your own file, or use the one from the timeline.
bind object to the path
Once you're happy with the setup, click Apply to confirm. The object will then automatically follow the motion of your path during playback.

Bonus: Use Built-In Dashed Line Stickers for Instant Animation

If you want to skip drawing paths manually, Filmora offers a variety of dashed line and dotted line sticker presets that you can apply directly to your videos. These are perfect for creators who want a quick and visually appealing animation without spending time on custom path creation.

  • Simply drag and drop the sticker onto your timeline.
  • Customize the size, color, and animation speed to fit your project.
  • Combine with effects like glow, fire, or motion blur for a more dynamic look.
  • Great for social media posts, intros, or motion graphics where speed matters.

Conclusion

Now that you've learned how to create a dashed and dotted line in After Effects, the next thing to do is bring that skill into your own projects. Try using dashed lines to highlight routes on a map, emphasize motion in infographics, or add rhythm to animated transitions.

And since the ability to draw and animate custom paths is not something you can only do in After Effects, you can also create the same effect in Filmora — but with a much simpler workflow.

Filmora
AI Video Editing App & Software
Try It Free Try It Free
qrcode-img
Scan to get the Filmora App
Best tool for making videos anywhere for all creators!
Your Perfect First Video Edit Starts Here - No Experience Needed

💬 FAQs About Dashed and Dotted Lines

  • 1. How do I make dashed lines loop in After Effects?

    You need to adjust the Offset setting under the Stroke options and add keyframes to it. Start by setting the first keyframe at the beginning of your timeline with an Offset value of 0. Then move the playhead to where you want the loop to end and increase the Offset value.

  • 2. Can I make text appear in dashed lines in After Effects?

    Yes, but you'll need to convert the text into a Shape Layer first. Select your text layer, go to Layer > Create > Create Shapes from Text, and After Effects will generate a shape version of your text. Open the shape's Stroke settings, then add Dashes and Gap values just like you would for a line.

  • 3. How to apply dashed or dotted lines to shapes like circles or rectangles?

    First, create a circle or rectangle by holding Shift while drawing with the Shape Tool. Then, go to Contents > [Shape Name] > Stroke 1 and click the + icon next to Dashes. Adjust the Dash and Gap values to get the look you want.

You May Also Like

Audio Effects for Premiere Pro: 5 Essential Techniques + Easier Alternative (2025)

Looking for a tool to give your video's audio a creative flair? Read this article to learn how to apply audio effects on Premiere Pro and its alternatives.

Posted byJames Hogan|2025-10-22 21:01:20
How to Use Essential Sound Panel in Premiere for Clearer Audio

Learn how to use the Essential Sound in Premiere Pro panel to clean up audio. Find out its functions, editing process, and a bonus alternative for smoother results.

Posted byJames Hogan|2025-09-30 18:22:12
Debut Video Capture 2025 Review: Features, Pros, Cons, and Alternatives

If you're looking for a screen recording tool, Debut Video Capture might be just what you need. Check out the full review and the best alternative options here.

Posted byJames Hogan|2025-09-22 16:54:47
A Detailed Lightroom Review: Know All Features and A Better Alternative

Discover the full feature breakdown of Adobe Lightroom 2025 and explore a more intuitive, AI-powered alternative for seamless photo and video editing.

Posted byJames Hogan|2025-09-22 16:54:47
Everything You Need to Know About VSCO: Features, Filters, and Best Alternative

Learn more before you download VSCO for your social media video needs! Find out about VSCO’s features, filters, editing tools, and the best alternative for it.

Posted byJames Hogan|2025-06-24 15:50:32
VN Online Video Editor Review: Is It the Best Choice for Beginners?

Editing made easy or advanced? Which video editor offers more for creators? Dive into VN Video Editor comprehensive review and alternative

Posted byAndrew Murray|2025-06-24 15:50:32
How to Zoom In on Premiere Pro Timeline: Master Essential Techniques & Shortcuts

Master how to zoom in on Premiere Pro timeline with essential shortcuts & pro tips. Troubleshoot common issues and discover a smoother editing experience.

Posted byJames Hogan|2025-09-23 14:40:43