Hey, what’s up everyone?
This is Owen with Motion Array and in this tutorial I’m going to be showing you how
to make a dynamic line graph.
I’m really excited about this one because it’ll be highlighting my favorite new feature
in After Effects 2018 and that's the ability to control mask and shape points independently
from each other with nulls.
It’s a total game changer and it’s making animations like this WAY easier.
Alright, let’s get started.
I’ll start by making a new composition.
I’ll name it “Line Graph”… make sure it’s HD and then hit Okay.
The first thing I’ll do is create a new solid to be my background.
I’ll do that by going to Layer > New > Solid.
I’m not going to worry about the color for now, I just want to make sure it’s comp
sized.
Then I’ll rename it “Background" and hit Okay.
Then I’ll go to Effect > Generate > Gradient Ramp.
Inside the Effect Controls I’m going to change the colors from black and white to
a light blue and a little bit darker blue.
That looks good.
Okay, so now it’s time for the line graph.
Making sure that my background layer isn’t selected, I’ll grab my pen tool and loosely
draw something resembling a line graph.
It’s not important that it’s perfect at this stage.
I’ll rename this new layer to be "Line Graph”.
Then I’ll change the stroke color and the stroke width so it’s wider and easier to
see.
Then, I’ll turn off the fill.
Now that my line graph is drawn, the fun begins.
Again, this will only work in After Effects 2018… or newer if you’re watching in the
future.
I’ll go to Window > Create Nulls from Paths.
This is new to 2018 and it'll bring up a dockable panel.
I’ll to drag it over into my interface on the side so it’s out of the way.
Now I need to twirl down my line graph shape layer until I get to the path and highlight
it.
With the path highlighted I’ll go to my “Create Nulls from Paths” panel and select
“Points Follow Nulls”.
When I do this After Effects creates a new null for every point on my shape’s path…
and now, when I move those nulls you’ll see that my path follows.
To tidy things up I’m going to select all my nulls and go to the Align panel, make sure
it’s set to “Selection” and then distribute my nulls evenly in the X dimension.
Then I’ll just move them so that they are looking nice and centered to my composition.
A huge advantage of having the points following nulls is that you can make other objects follow
them too.
For this line graph, I’m going to create some points for each of the vertices that
will follow the nulls.
I’ll start by making a new shape layer by going to Layer > New > Shape Layer.
Then I’ll go to the add button in the tool bar and choose ellipse.
I’m also going to us the add button to make a fill.
By default it goes to red, so I’ll change that to be something else.
Then I’ll change the name of the shape layer to "Dot 1”.
I’m going to duplicate the dot once for every vertex on the line graph and since I
named my layer "Dot 1”, After Effects will name the duplicates Dot 2, 3, 4, and 5 which
is pretty neat.
You can duplicate a layer by hitting CMD + D or going to Edit > Duplicate.
Okay, now I’m going to parent my first dot to my first null, second dot to the second
null, and so on but I’m going to do this with a catch.
When I’m parenting, I’m going to hold SHIFT on the keyboard.
By holding shift, not only am I parenting the dot to the null, I’m also changing the
dot's position to match the null.
I just learned this trick this week and it’s super useful.
So now that the whole line graph rig is set up, all that’s left to do is animate it.
I’m going to set keyframes on each null’s position.
I’ll highlight all of my nulls and pull up their position with P on the keyboard.
The first keyframe I’ll set at the beginning of my timeline and I’ll make all the Y values
540 so that I’ll have a flat line vertically centered to my comp.
For the second keyframe I’ll move my playhead down 20 frames and change my Y values to create
something line graphy.
Then I’ll move my playhead down 10 frames and add another keyframe with the same value
by going to the left of the stopwatch and clicking the empty diamond on each null.
I’ll repeat this process once more so that we have two different line graph looks.
Then, with my playhead 20 frames further down my timeline, I’ll bring all the Y values
back to 540.
This way we’ll get a nice little loop….
Now that I have all my keyframes in, I’ll offset each of my nulls by a few frames.
Then I’ll highlight all the keyframes, right click on one of them and go to Keyframe Assistant
> Easy Ease.
Now easy ease is great, but the default settings just aren't what I want.
To make my animation have a little more style I’m going to adjust those settings.
With all my keyframes still highlighted I’ll right click on one of the keyframes again,
but this time I’m going to go to Keyframe Velocity.
A dialog pops up and I’m going to change my influence values for the incoming and outgoing
velocity.
I’ll set my incoming velocity to 80% and my outgoing velocity to 70%.
This will give me a more extreme ease and I think it will look a lot nicer.
The little bit of offset and easing is a nice touch to make the animation feel more polished.
Well, that does it for this tutorial.
I hope you guys found it helpful, if you did, there’s plenty more tutorials over at MotionArray.com.
Thanks for watching and see you in the next video.