Post Production

How to Animate a Line in After Effects

How to Animate a Line in After Effects

[mks_tabs nav=”horizontal”]
[mks_tab_item title=”Overview”]
In this video, you will learn how to animate a line in After Effects.

1. Create a line using a pen tool. Make sure that the FILL is set to none.

2. To animate the line, notice that ‘Add’ button with the play button next to it? Click this button then click Trim Paths.

3. Click the drop down menu for trim paths. There you will see start and end options. Play around with these to see what they do to your shape.

4. The basic animation will be done setting keyframes for these starting and ending points.

Video by Video School Online
[/mks_tab_item]
[mks_tab_item title=”Transcript”]

hey what’s up everyone welcome to
another After Effects tutorial I
recently posted a little montage that I
did in Switzerland
with that has these little loop-de-loop
line drawing things you see this going
up there let me just rewind it a little
bit so you can see it see this little
dotted line going across the screen so I
posted this and goose taught us sorry if
I’m pronouncing that wrong
he asked about if I could create a
tutorial on how to do that so I want to
do that for him and for anyone else that
is interested and so here I am an After
Effects and you can see actually here
this is the exact composition that I
used for that little portion of the
video it’s a very simple dotted line
that animates on and it’s actually very
simple to do as always please watch in
full screen I shoot I record these
videos at full resolution on my iMac so
it’ll look best if you’re watching this
in full-screen HD so first we’re going
to just start a new composition 1920 by
1080 10 seconds that’s perfect then
we’re going to create our line so just
take our pen tool up here make sure that
the fill is set to none so just click
fill and from solid color move to none
and then the stroke set it to about 3 or
4 and you can change the color depending
on what you want but I just want white
so then we just want to create the shape
now you can create a line like I did
with a little loop you could create a
heart you could create a circle you can
even use the shape tool if you want
rather than the append tool but the pen
tool allows you to do custom shapes like
this one where I’m just going up then
down up and down up and down ok so you
have this little Hill line thing now we
have to turn it into a dashed line so
drop down our shape drop down drop down
our contents menu our shape menu and
then our stroke menu under dashes click
this plus sign now we have a dashed line
now you can press + again where you get
this gap option you can increase or decrease the
gap so that’s basically spreading out
the dashes you can also change whether
the dash is straight as a straight edge
or a round edge so let me zoom in here
really much so you can see it’s
pixelated now because I’m so sumed in
but here’s the round cap here’s the butt
cap sometimes the round cap just looks a
little bit better in my opinion okay so
now we just have to animate this on so
to animate we’re going up to the
contents over here where it says add
click this button and then click trim
paths this is one of my favorite effects
if you haven’t played with trim paths
yet it is amazing it will change your
life literally drop down the trim path
options and you will see a start and end
percentage and percentage is at 100 and
if I drop this to save 50 you can see
that are shaped only 50% complete if I go back to 3%
it’s just starting out so if you were a
betting man or woman what do you think
we would do to animate this well you
probably guess adding some keyframes so
that’s exactly what we’re going to do so
I’m going to set this to zero click the
stopwatch icon right here to create a
keyframe then go to 5 seconds or so
depending on how long you want the
animation to be and then type in 100 and
that automatically sets a new keyframe
going from 0 to 100 so if I play through
this now you can see what it would look
like so here we have this line that’s
kind of animating it looks like it’s
animating on to our screen one other
cool thing you can do is animate the
start point so that’s this point over
here right now it’s at 0 but if I move
it forward you can see that it moves
forward so about a second after this
animation starts maybe a second and a
half I’m going to click the stopwatch to
set a keyframe there then around 6 and a
half seconds I’m going to animate this
to 100% just by dragging it up to 100% now if I
play through this you can see what it
looks like it looks like a little trail
of ants or clouds or whatever you
imagined this to be this is a pretty
cool effect in my video I actually
didn’t do the start animation so it
wasn’t sort of trailing like this but
that’s a pretty darn cool effect and
very easy now again you could change the
shape of this you can change the shape
now by going back to your path and
moving it around or you can just start
from scratch and do the same thing with
a heart or a circle or whatever you want
now how do you actually use this in a
video well there are two ways one is
either exporting this clip and bringing
it in on top of your video or just
taking this into your Premiere Pro
application so one way to add it is
through the Adobe dynamic link which is
an amazing tool that adobe has come up
with to basically be able to use After
Effects and Premiere Pro at the same
time basically what does that mean we
can actually take this composition that
we just created that I just clicked it
so I clicked and I’m dragging it I still
have it clicked I’m going to tab over
using command tab on my Mac ctrl tab on
a PC to Premiere Pro and then I’m just
going to drop it into my project file so
now I can open this up in my preview
window and if I take just the video and
drag it onto my video timeline onto the
second layer let me just turn off this
audio this is from a course that I did
on email list building you can see now
that this line appears on top of this
video now that would be very distracting
for this video but if it was on a
montage like I created it would be kind
of cool then you can just you could even
duplicate it you could do whatever you
want with it to actually export the
video so you can bring it in wherever
you want without this Die Adobe dynamic
link you need to export with a
transparent background
so go up to composition add to render
queue click lossless click RGB go to RGB
+ alpha click OK click comp 1 and choose where
you want to save it and then click
render over here and then you can take
that file that exported file and bring
it into Adobe Premiere Pro just like a
normal video file and then place it on
top of the video that you want the
little line to appear on now I’ve had a
lot of people saying that this technique
doesn’t work if you’re using Sony Vegas
so and when you import it it still has a
black background so please if anyone
knows how to do this in it Sony Vegas
let me know because I’m not a Sony Vegas
editor most of you are probably editing
in Premiere Pro so this should work
completely fine for you but as always if
you have any questions or any issues let
me know thank you so much again for this
tutorial for the request I love doing
tutorials like this for people who ask
me on YouTube or Facebook or whatever so
if you have any motion graphic editing
any sort of thing just let me know you
can also visit my website video school
online.com where you can enroll in some
premium courses or you can subscribe to
my email list where you will get a free
freelance kickstart guide which is a 50
page ebook for free for signing up for
my email list thank you so much much for
watching please subscribe to the YouTube
channel and we’ll see you in another
tutorial.

[/mks_tab_item]
[/mks_tabs]

Comments