(soft music)
- Hello, and welcome to the 41st video
in this beginner's guide to Adobe After Effects.
In this tutorial, I'm going to demonstrate
how you can animate a mask in After Effects.
In the previous episode,
we continued with the second section
where we introduced the type and shape elements
and animated the type in, like so.
In this video, we are going to complete the sequence
and focus on the shape elements
that also animate in this composition.
Next, we are going to look at how we can animate a mask,
so, these bar graphics in the middle appear
to draw in from the outside like so.
So, in this video, we are going to be covering
the following topics.
Applying a mask to a shape layer
and animating a mask.
So here I am where we left off in the previous episode
where we brought in the type and shape elements
and animated the type.
Now, if you're watching for the first time
and wish to follow along, you can find this document
in the project folder, which you can download.
Link is in the description.
The download folder comes with lots
of exercise documents we will be using on this course
that have been carefully developed
to aid your learning experience.
The folder also comes with document resources,
such as videos, graphics, and images
you can use to build your first video presentation
from scratch, later on in this course.
To get the full learning experience,
I recommend you get the project folder.
Download link with instructions is in the description.
So with the project folder open,
click into folder S3 - Create a project,
then into folder 41-Animate a mask,
and open the Animate a Mask document.
Now, if you are continuing on from the last episode
make sure you have your document open ready.
So with our document open, let's proceed.
So, what we are going to do next
is look at how we can animate the lines
in between the two typed layers,
to make them look like they draw in from the outside.
So, in this instance, to create this effect,
I'm going to use a simple mask.
And I'm going to start with the bar line
on the left-hand side.
So, before I begin, I'll zoom in here
so I can see exactly what we are working on.
Now this bar line is a simple shape layer,
which we created in the previous episode.
And we know it's a shape layer
because of the star icon next to the layer name.
Now, there is a specific way to create masks
on a shape layer.
So down in the timeline panel,
I'm going to drag my time indicator
while holding Shift over to snap to the beginning
of my bar layers.
And then, I'll select the top bar layer.
With the layer selected, we will now see
a bounded box around it in the composition panel.
Now, I'll come into the timeline panel
and toggle down the layer properties
to reveal the contents and transform properties.
With the layer still selected,
I'll come up to the top of the interface and click Layer.
Upon click, I'll scroll down and place my mouse on mask.
Then scroll across and click on New Mask.
Upon click, we will now see a mask property
become available in the layer properties.
This has now applied a new mask to our shape layer.
But right now, nothing has changed.
So I'll press F2 to deselect the layer
and next, I'll come down and toggle down
this new mask property.
Inside we will see a new property called Mask 1.
Now, if we look closely to the right of Mask 1,
we will see a dropdown box with the word Add inside.
Now if we click this and select Subtract,
notice the line graphic now disappears.
By clicking Subtract, we have inverted the mask.
So now, it's hiding the shape layer.
By setting this to either Add or Subtract,
we can toggle the mask object.
Though, for now, I'll just click this
and set it back to Add.
Now if we toggle down Mask 1,
we will see the mask properties,
like here we have Mask Path, Mask Feather,
Mask Opacity, and Mask Expansion.
Here, we can also see there is a stopwatch
on each property which suggests we can animate them,
which is exactly what we are going to do next.
Now, at this point, it's important to note
that when we create a mask like this for a shape layer,
the mask will fit exactly to the size of the shape.
When we select this mask property on the layer,
we will see a bounded box in the composition panel.
This is actually the mask path
and not the shape layer selected.
Now, let's look at animating this mask.
So we want the line to appear
as if it's drawing in from left to right.
So, with my time indicator right
at the start of the layer bar,
I'll come and click on the stopwatch for Mask Path
and add my first position key frame.
Next, I'll drag my time indicator over to three seconds,
then, come back down and click on the diamond shape
to add the second key frame for the Mask Path.
So now I'll drag my time indicator
back to the first key frame while holding Shift to snap
and now, I'll press and hold Shift on the keyboard
and press the left arrow,
and, as we do this, we will move the mask to the left
and away from the line shape.
When the mask is fully off the shape,
the line will now appear invisible.
So, I'll press Alt + / to fit my screen area
to the composition panel and I'll scrub my time indicator
from the first key frame to the second.
And now we can see the sequence.
So next, I'll drag my time indicator
over to the second key frame.
I'll select the two layers above,
the swan shape layer and the type layer,
and I'll drag them back left while holding Shift
to snap the beginning of the layers to the time indicator.
So now, the line appears to animate in from the left
and when it's full, the swan image on the type layer below
appear right on queue.
So that's the first bar done.
To finish the sequence, I'm now going to create a mask
and animate on the next bar.
So now, we have the timing of the first bar,
this is going to make it super easy.
So with the top bar layer selected,
I'll press U to collapse the properties
and just show the key frames.
Next, I'll select the right bar layer above
and like earlier, I'll come and toggle down the properties
to reveal Contents and Transform.
With the layer still selected,
I'll come up to the top of the interface and click layer.
Upon click, I'll scroll down and place my mouse on mask,
then scroll across and click on New Mask.
Upon click, we will now see a new mask property
become available in the layer properties.
So, I'll toggle this down until I an see the properties
for the mask.
And I'll drag my time indicator, while holding Shift
over to the first position key frame
for the mask above so it snaps on top.
Next, I'll come and click on the stopwatch
for Mask Path to add my first key frame.
Then, I'll drag my time indicator
over to the second key frame while holding Shift to snap.
And, I'll come down and click on the diamond shape
to add the second key frame.
Next, I'll drag the time indicator
back to the first key frame while holding Shift to snap
and with the mask property selected,
I'll hold Shift on the keyboard and press the right arrow
until the mask is away from the shape layer below.
So I'll press F2 to deselect my layers
and I'll scrub my time indicator over the key frames
to see the effect that this had.
And now, the two lines draw in from either side.
Perfect.
So I'll place my mouse cursor over the workspace area
and double click.
This will extend the work area to the entire comp timeline.
I'll drag my time indicator
over to the beginning of the timeline
and I'll press Space bar to activate preview.
And that completes the second section
of the video presentation.
First, we have the destination icon appear.
Then after it drops away,
the type and shape elements animate on
while the video transitions in the background.
Perfect.
So now the second section is complete.
We can now move on to the next sections.
Now, if we click back into the main comp,
and we can do this by clicking on the first tab
on the top left of the timeline panel,
we can see we still have another one, two,
three, four, five sections to create.
Now, if you've been following along with this,
I recommend you save your document
so we can continue on in the next episode.
Now it may seem like a lot of work
to create the next five sections.
But in this instance, it's going to be fairly easy.
The next four sections are going to follow the same formula
we just created for section two.
So a really easy way to speed up our workflow
is to simply duplicate the composition
and make subtle changes.
So, in the next video,
I'm going to demonstrate how easy it can be
to duplicate compositions
and replace all the media elements
to speed up the creative process.
In the next video, we are going to create sections three,
four, five, and six,
which is going to progress us along nicely,
which will take us almost up to the end
of the video presentation.
So see you in the next video.
(soft music)