Hi everybody, in this tutorial we are going
to see a lot of different animation techniques related to stroke, starting from the trim path,
the taper function, the logic behind it and how to combine everything
And we’ll also lo go over some more random stroke effects The first trick is to accept that After Effects is an animation software and not a design software
So if you're working with complex shapes, instead of drawing in after effects, draw
them in Illustrator, select it, copy it, then go to after effects, select the pen tool,
click on a random point and just paste it
If you have two shapes with the same number
of control points you can go to path, set one keyframe, copy from a second shape
and then paste it on the same stroke
Sometimes the morphing doesn't work perfectly, to
solve this you just need to select one point and select “set as first vertex” do the same on the
second shape selecting the same relative point and now their stroke path can morph smoothly If you have more complex shapes maybe with a different number of control points then i’m
sorry but the best solution is to do it by hand. it can be a little bit tricky but you
can achieve way more interesting animations
The trim path is based on two
parameters, the start and the end, by changing these two percentage values
we determine their positions on the line
For example if we change the start
from 0 to 50, the first extreme of the stroke will move forward to the 50% of its
original length or to any other value we put
Same with the end, if we set it to 80 or 60 the
second extreme of the stroke will go back till reaching the percentage of the value we chose
If we set the end first at zero then at 100 the stroke moves along its entire length and we
see it appear. If we also animate the start from 0 to 100 we can make it disappear
But as you can see if the keyframes are overlapped, they cancel
themselves out and we see nothing
If we delay the start animation a little bit
we see the line appearing and disappearing simultaneously or instead of delaying the start
keyframe we can simply work on the graph editor to have different curves. we can select our end
keyframes and give them a long ease, so that they’ll start slow and get faster toward the end
and do the opposite with the end of the stroke
When working with closed shapes if we want
to create a loop seems difficult due to the fact that when you reach 100 you close the shape
Let's say you want to create a repeating loading circle, it seems impossible because when you
reach 100 you can’t go further than this limit
To fix that just use the offset path value,
you can use it to change the relative position of start and end, or even more simple you
can just delete the start and end keyframe and animate only the offset keyframes
Another very common problem is that the stroke never starts where we want. To fix that,
as we saw before, just select the point where we need the shape to start and select “mask and
shape path” then “set as the first vertex”
Also from the path you can click this icon
to invert the direction of your stroke, if you want it clockwise or counter-clockwise Taper is a function that allows you to introduce width variation to your stroke
Using the same setting as before
the taper works by keeping your stroke Width as the
widest base and you can only decrease from that The first two values start length and end
length determine how your thickness increases and decreases based on the length percentage
So if we set 30 for the start length you’ll se that the increasing segment reach the 30% of
the stroke lenght, and if we set the end for example only at 10*, the decrease of the width
will involve only the last 10%* of the stroke
But this percentage is relative to the visible
stroke length, so if we also apply a trim path, let’s say the end at 90 and the start at
20 the percentage system of the taper will change accordingly to the new stroke length
First, I want to increase the stroke width a little bit, because when using the taper
we can only decrease from that value
set a round cap. Then I'll set both the
taper lengths to 40 both the widths at 20 this value determines how much of the
original stroke width we want to keep
and I'll set the ease at
50 to make it more smooth
Now we can introduce some colors to the game.
The simpler way to create a gradient between two colors on a stroke starts with duplicating
the stroke and then changing the color
If we have a taper , we can remove
it because we don’t need it, open the trim path section and edit the values
to have the stroke only on a shorter segment
Then let’s increase the stroke width by
at least the double, set the first stroke as a matte and then apply a blur effect
Now let's duplicate the layer again using control+D, bring it down and remove
the matte to create a light glow, we just need to edit the blur effect a little bit
We can also add some glow to the main stroke using a simple drop shadow effect and
apply the same color of the stroke
We can also duplicate our gradient a second time,
again with control D, and apply a second color, probably white and make it even shorter then
before, to have it only on the tip of the stroke
apply some layer style to the base stroke
to add some light and blend everything
Also if you plan to change or animate your
stroke path another thing to do is this
parent the path of the different strokes used
for gradients to the path of the original stroke, this way even if you change the stroke the
gradient will follow the new direction
So now I want to combine everything we’ve
seen til now. Starting from the path morphing animation to which I added a third path
keyframe to transform it into a circle
Now I want to duplicate it to have a white base
and then our stroke layer is going to be red, let0s put red also as stroke color to
have more visible what we're doing
And now i want to work on the trim path
In the last frame we can animate our offset and I'm going to set it at 120 to have it going back
to its original position, plus 1 round rotation
Now I can start to increase the stroke width a
little bit so that we can also apply the taper
we got our stroke animation, now we can duplicate
it and rotate it by 180 degrees on both the rotation keyframes to mirror it on the other side
Now i wanto to add a circle to a circle to encompass everything
we can bring it to the center and then we can animate this circle to scale
accordingly to the morphing of the stroke inside
We've set our base animation, now i’m just
repeating everything we’ve seen before, adjusting alittle bit the taper
and the trim path and changing just a little bit the structure of the circles
I’m doing a timelapse of this parth because is just setting parameters that we’ve already seen
and i’m also doing some visual styling, setting the colors, the gradient and some color
effect to have everything with black and green
I’m not focusing on the visual style
of the project in this tutorial, since this video is about the stroke animations,
but if you are curious you can download the file project, link in the description and maybe
let me know in the comment if you would like to see a tutorial about visual style,
colors and gradients and this kind of stuff
another really important technique
is moving stuff along your stroke
To do it we’re going to use some animation from
the sponsor celwizard.com which is a library of hundred of elements animated frame by frame so
not the usual stock motiongraphic templates
You have different categories animation
and every asset id loopable and sometimes even modular so that you can compose them in
the timeline to create different sequences
you can just import them into your project with one click and you can edit strok and colors to match them your visual style. Check it out, the link is in the description once you have the object you want to
move across the stroke, just copy the path and paste it into the object position I want to repeat on the timeline the celwizard pointer animation so I'm activating the time remap and duplicating it
I also need to change the spacing between
the position keyframe to make it more slower
now the object will move along the stroke path but
we also want it to follow the stroke orientation
to do so go to, transform, auto-orient
and auto orient along path
fix it a little bit and now our arrow will follow both the path and the orientation of the stroke
I need to fix again a little bit the timing
and i also want to precompose it so i can duplicate it and change the rotation We’ve seen this briefly in the last tutorial about transparency distortion, if you haven’t go watch it after this video
To create a liquid stroke animation like
this we need to animate our stroke with the taper as we did before
then we need to duplicate this stroke and create some variations
with the stroke path, changing also the trim trim path offset to create multiple strokes
to mimic the liquid feel repeat the process and duplicate again for as many time as you
like trying to create some organic flow, so that you stroke split up and comes back
together, or maybe simulating some droplets
one we animated all of our strokes precompose
them together and add the effect gaussian blur
add also the effect simple choke
and set them with the same value
apply also some turbulent displace,
and these effects together will create a liquid shape feeling To have it even more liquid, let’s apply also some layer styles i’m going to use color overlay with a slightly mid-dark tone and then inner glow to have a lighter color on the border let’s also apply some bevel and emboss to give more depth and a more materic feeling Start by appling to your stroke a round cap and round join
then add dashes and set it on a number that feel right for the length of your chain links
then duplicate your layer, with control D and bring it down, and change its color
to see better what’s happening
on this second layer change the
stroke width to three times the initial value to create the larger chain links
parent the dash value and offset value to the first stroke. then from this stroke that will also be the controller set it to a new dashes value that leaves some space between the chain links.
control d again to duplicate the second layer and rename it to remember this copy will be the matte
on this matte layer change again the color and bring the stroke width
back to its original number
now we can set this layer as inverted matte to
make holes in the second layer of the chain
the dashes offset of these two layers
are parented to the first one so edit the expression by adding a number that will
increment tht offset value, in my case is 130 but it will change depending on your chain
change the expression on both the layers
ans also we need to parent these
layers path to the first one
this way everything will follow
the path of the first layer
in addition to the path we can also animate
the offset and again, since we parented it with an increment everything will follow now we just need to style everything a little bit, so color overlay to give it some grey
and bevel and emboss to add shadow and lights copy the layer style and paste it
on the second layer of the chain, add also some extra shadow to separate the layer
and that’s it we got our stroke chain animation
Thanks very much for watching, please
check out the video sponsor cel wizard.com the link is in the description
Subscribe to the channel and let me know in the comments if there are any topics
you would like to see a new video about.