Use paths from Illustrator as motion guides in After Effects by converting them into position keyframes for animated elements. This article demonstrates how to synchronize animated lines and markers, apply looping expressions, and manage nested compositions for flexible visual customization.
Key Insights
- After Effects users can copy a shape path (originally drawn in Illustrator and converted into a shape layer) and paste it as position keyframes for another layer, enabling precise motion-following animations.
- To ensure synchronized looping animations, users must align the duration and easing of all animated elements, including both Trim Paths and position keyframes, and apply expressions such as
loopOut("pingpong")for seamless repetition. - Noble Desktop demonstrates efficient animation workflows, including navigating layers with keyboard shortcuts, organizing project panels with nested compositions, and applying global or individual color adjustments using effects like Fill, Gradient Ramp, and Tint.
This lesson is a preview from our Adobe Classes Online (includes software). Enroll in a course for detailed lessons, live instructor support, and project-based training.
This is a lesson preview only. For the full lesson, purchase the course here.
So before I start, I am going to just drag these extra comps. These are all the pre-comps I've made into the pre-comps folder. You don't need to do that, but I like keeping the project panel as organized as possible because it makes it easier to find what you're looking for later.
Now, what I actually did is grab one of the comps that's wrong, and it's the actual shape animation HUD, which is the main comp for everything. So let's drag that right out. The folders are just that.
They're folders like on your computer, so you can use them or not. It's up to you. You can have folders inside of folders.
It's an organizational tool. Okay, so in the shape animation HUD, I want to actually go back to one of the lines we had before. So let me actually fit this little menu here, fit up to right here at the beginning.
We made these animated lines in an earlier lesson, and what I want to do is actually visit this again. So it's the animated lines bundle. I'll just double click on it.
Now I'm going to zoom out again. So let me fit that again with the little magnification menu. That's this area that I really care about.
Okay, so one way to zoom in, by the way, if you have a three-button mouse, is the scroll wheel. Rolling the scroll wheel will zoom in and out. Pressing the scroll wheel turns it into your hand, and you can then pan around.
If you don't have a three-button mouse, not a problem. Turn to fit. You can always zoom in using the zoom tool, either by clicking on the tool itself or by pressing and holding the Z key on your keyboard.
That'll give you the zoom tool, and you can click and drag left or right or up or down to zoom in and out. To get the hand tool, you press and hold H in this way, and you drag around. All the tools have a toggle feature.
If you hover over a tool, it'll tell you the name and the keyboard shortcut to activate it, if it has one. When you press and hold that key, it temporarily toggles to that tool. When you just tap that key, it switches the tool.
So it can be a quick way of navigating around if you use the keyboard to switch tools very quickly or to just toggle between them very quickly. So there were, in this original design, two markers, marker solid and marker outline. Marker solid, marker outline, right there.
And the idea behind them is that they would lead the lines in. They would animate on the screen, the lines would actually follow them. Now let's see if we can do that.
So it is possible to simply add keyframes for the position of this that simply line up with the line itself, but that's a lot of work. So what I want to do is see if it's possible to take this line, this path that was drawn with the pen tool originally in Illustrator, converted to a shape layer, and we can actually use that, that path itself as the position keyframes for any other layer. That way they'll follow each other.
That's my goal, okay? So to do this, it takes a little grinding to find exactly where the path is. So I'm going to go to that layer that has the animated lines themselves, and I'm going to find, it's not left 1, it's not right 1, it's not right 3, it's not right 4. Right 4 is actually up here. It's not right 2, it's right 5. That's the line that this is.
That's the topmost one. If I just counted it would be right there, okay? Now in that is a path, and I can reveal the path by double clicking on the word path as it appears in the properties panel. That'll reveal that path and that path only in the timeline.
Anything you see in the properties panel, like position, scale, rotation, path, that sort of thing, if you double click on it in properties, it reveals it in the timeline because certain things need the timeline active or they need to be selected in the timeline in order to move forward. This is one of those. That path where I see that stopwatch, that's what I want, and I'm going to copy it.
I'm going to copy that shortcut, then I'm going to find that marker outline, okay? And I specifically need to find the position property for it. So I could tap P on my keyboard, which would reveal position, or in the properties panel, now that I have my new marker outline layer highlighted, I'll just double click the word position right here and that reveals it. I'll go back to the beginning of my timeline.
I'm going to click on position and I'm going to paste. So the key is I've selected the path and copied it. I've selected the position property in the layer I want to paste that information to, and then paste.
Either edit, paste, or the keyboard shortcut. And something happened, it went somewhere, just not exactly sure where. Let me zoom out a little bit on my keyboard.
If I tap the comma key, I can zoom out and I see that right there, the path is right over there. Okay, that's interesting. Now, if I had drawn the original shape directly in After Effects, when pasted, the position keyframes would have been exactly on that path.
Because this layer was created by converting an Illustrator document, an Illustrator layer, there's this shift. It has to do with the way that conversion process is done. Okay, so remember, native After Effects graphic made here with the pen tool wouldn't have this extra step.
Because it's been converted, it shifts the position. But I can pretty easily fix it. Okay, here's how I fix it.
So I need to move the path, entire path, over to right over there. Now, if I try that right now, it works. Okay, because every single keyframe here is selected.
Let me zoom in a little more. Okay, so again, I've got every single keyframe selected. I can simply use my selection tool, my black arrow, to pick it up and move it around.
What I'm doing is basically trying to align it visually, like so. And now if I go back to the beginning, what I have is this following the line. Okay, now I need to do is actually find the animated lines keyframe, see exactly how long this is.
So I'm going to highlight animated lines and tap U on my keyboard to reveal its keyframes. And I see right there. So this starts at zero.
That's the beginning of the animation that reveals the line. And it ends right there. Okay, so the timing is off.
They start at the same point, but they don't end at the same point. So when you copy and paste a path as the position keyframes of a layer, what you end up with is a regular keyframe at the beginning, regular keyframe at the end. And these circles, these are called roving keyframes.
What they basically do is they allow you to stretch the time between them. So they rove through time, they're designed to try and create a smooth motion in the animation. Okay, so if I drag that last point out, they'll automatically stretch.
And if I drag it out and shift, I'll be able to line it up. So now when I play this, it's following along exactly. So if you're using a, in this case, what I used was the effect for lines, trim paths to draw the lines on.
When you copy and paste the path as position, they aren't automatically the same length. So I have to make sure that my trim paths animation and my marker outline position animation start and stop at the same point in time. Otherwise it won't line up.
But now the problem I have here is it plays once and then stops. Okay, so let's see if we can fix that. We can, by the way, that's the secret.
So we're just going to loop it. I'm going to hold down Option on my keyboard, Alt if you're a Windows user, and click on the stopwatch right there for position. Okay, and I'll just add in loop out.
I can't type. So I'm using my arrow keys to go up and down, and then I'll just press Return or Enter on my keyboard to have it right loop out for me. Okay, now here's what happens.
It does that. Okay, because effectively the basic problem that I have, I don't need loop out anymore. It's fine.
I might change it later, is that the original animated lines ping pongs. It animates on over three seconds and then holds for another second. So I'm just going to copy that last keyframe for marker outline, copy, and then I'm going to paste it in.
Let's see how that works. Like that. So what I basically have is this point where it stays on screen, but then it repeats completely at a separate rate.
Okay, now this is specifically because one of which means it takes double as long, and the other is just cycling. The default loop out for this is cycle. Okay, so I have to compensate for that extra time.
So right now again it holds, vanishes at that point, and then repeats over and over again. Okay, so what I'm basically going to do is change the same loop. I'm going to open up position.
There's a little arrow to reveal the expression again. I'll click on the expression text field right inside the parentheses and with quotes ping pong. So now it'll play over the same rate.
I'll click away from it to finalize it. Same time, same duration. On and then off and then on and then off over and over and over and over again.
Ad nauseum. Okay, forever. I can do the same thing with any other one.
So marker solid, for example. Let me actually go to where the lines are visible. Marker solid is for... I'm going to close the marker outlines.
I don't see it anymore. Back to my animated lines. Is this left one? No.
Is it... I'm following around. It looks like it would be R2. It is right there.
Okay, and I am wrong. It is not R2. I'm sorry.
It's like R1. Right there. It's in fact R1.
By the way, I'm going to change the order. Okay, I can't drag it right here. I can't adjust the order of the shapes here, but if I open up the contents of animated lines, I'll close it and then open it again.
I can change the order right in here. So in the timeline, I can adjust the order of each shape in the layer. Effectively, it's not going to change anything about the animation.
It's just to keep things nice and organized, in my opinion. But I can't do it here, unfortunately. It would be nice if I could.
So now that I got it organized in a way I can easily read, that's R1. That's the one. So again, R1 is highlighted in my properties panel.
Double click on path to reveal it. Reveals path. I'm actually going to hide everything and do that again because I don't want to see path.
So R1. Right one. Double click on path.
Right there. I click on the path property. The one where the stopwatch is.
Okay. I copy it. Command C, Control C, or Edit, Copy.
I find the marker solid. I reveal its position property. Okay.
Now, why do I move the current time indicator to the beginning? Because when I highlight, position, and paste, the keyframes go wherever the current time indicator is. And I need this at the beginning. So I'll go and did that.
I'll go back. Undo is Edit, Undo. Okay.
Or Command Z, Control Z, if you're a Windows user. There is no button for it. You have to either use the keyboard shortcut or the menu command for this.
So back to marker solid. Back to position. Now this paste.
Right there. And now it animates in. Again, all the keyframes are highlighted.
Not highlighted. Highlighted. Okay.
I'm simply going to the end of the line, which in this case is again four seconds. I've got four seconds in this case. Okay.
Now I can see everything. It's nice. Okay.
And I can see that I zoomed out a little bit. Now I can see that's where the marker solid ended up. So I grab it.
Drag it around. Zoom back in so I can find it. And it's supposed to be lined up with that line.
Okay. And I'm just basically trying to align it so that it's in the middle of the line visually. And that each point is like roughly in the middle like that.
So I'm really doing it by eye. No problem at all. So again, I'll zoom out.
Option Slash or Alt Slash will fit everything in the window. It's the command from magnification. And now I end up with that.
Again, the duration of this animation is different than the duration of the animated lines animation. So I know it's four seconds, but I'm going to press U on my keyboard to reveal animated lines' keyframes. The initial animation is three seconds long.
I'll grab that last keyframe. Hold Shift to snap it. I'll copy that last keyframe to hold.
Paste it to match the last keyframe in the animated lines animation. No problem at all. The key that is if you're going to loop multiple layers and you want them to loop at the same rate, their animations have to have the exact same duration.
And by the way, that includes easing. If I added easing to the animated lines keyframes, the ones for the Trim Paths effect, I'd have to add the same easing to the position keyframes for the markers or whatever else you make it follow it. Okay, that's good.
That's good. Now to loop this, Option or Alt click on the stopwatch for position, and I get loop out again. So to start typing it out, pick it from the list, return or enter on the keyboard.
It automatically puts you and use code completion in the parentheses, quotes, and it's ping pong. Exit the text field. Test your animation.
See how it works. Like that. And now I have a repeating animation.
Like so. That's what it is. So everything I'm doing now has to occur over this four second timeframe.
Okay, that's all it is. If I change the speed of any one of them, I have to make sure I go back and keep the exact same duration for the total animation. Otherwise, the loops will no longer line up.
And for the record, sometimes you don't want the loops to line up. But in this case, I want to keep those consistent. The only thing I wanted to be inconsistent as part of that was the actual diagonal lines being drawn on, the hatch lines.
Okay, so now as you can see that we've got an animation where the balls, the markers, and the lines are now synced up, which is nice. The only thing I built this was with the hatch lines not being synced up. If I wanted to make them a little closer, I could actually open up their animation and just basically make their animation match closer to the timing of the animation for everything else.
So for example, maybe I'll move this out to three seconds, and I'll move the ending keyframe of this out to four. So the animation's a little closer when it plays back. Something like that basically.
Depends. You don't have to have every animation synced up. It really depends on the kind of like look you're going for.
I wanted them a little offset in this, but if you wanted to, you could basically adjust those keyframes, that duration of the animation, to make them sync up perfectly or not perfectly. All depends on what you're going for. I find usually that a little, what's the word, a little randomness usually looks nice in an animation like this, but that's just my taste.
I'll go back to the HUD. I'll look at this again, and this is what I have. Okay, not bad at all.
Pretty good. Pretty good. Okay, if you notice that my background color isn't actually full size, I'm just going to scale that up a little bit to make it like cover the background.
It's just a solid layer. Grid looks lined up perfectly. Let me actually just make sure it's all centered.
Yeah, that's kind of cool. Okay, pretty good. Like that.
Okay, and now I've got, this is my HUD animation. Like so. Pretty good.
Pretty cool. Again, keep in mind that if I want to recolor any of these, since I'm dealing with nested comps, I could always add, let's say the line bundle, just an effect. There's one called fill, which would recolor everything on the comp layer.
So if I wanted, for example, red, I could actually go with this. Okay, if I wanted it to be a gradient instead of fill, what I would use is the gradient ramp effect. Right there, gradient ramp.
That'll give me a two-color gradient, which I can adjust the colors for at any point in time I want. So maybe red, and I'm going to put the red color over here, and maybe blue or green, whatever you like, by the way. It's cool.
I'm going to click on the little end of ramp point selector and put it on the right side of the screen. So now it runs from red to green across the screen. Like that.
There's also a four-color gradient, which actually lets you put a color at each corner, like four control points if you want. No problem at all. You can remove color with effects like tint.
So if you want to colorize the entire layer, just add an effect to it. If you want to colorize specific things inside of that composition, you open the comp and you change them there. So once you're dealing with nested comps, you get more options for how you control the appearance of your layers inside the comp.
Either all at once or individually. It's up to you.