SHAPES EXPLOSION ANIMATION - AFTER EFFECTS TUTORIAL

Motion graphics
5 followers
Feb 10, 2026
Hey everyone today I'm going to show you how to create these
animations here— a term commonly used to describe them is accents
In other words something to highlight a particular element in your scene—this is
widely used for instance in explainer videos
—I'll show you how to do it using pre-comps
The advantages of working with pre-comps are that they
allow us to reuse animation and create variations of it
I'm Xucrutz and you're here on the Layer Lemonade channel
I'll start by creating a stroke selecting the pen tool— I
click here or press the G key click once then hold down Shift—
He draws another line straight for me mine
is 100 pixels wide—I'
ll center it in my scene
I'll also set the anchor point here
I hold down Ctrl and double-click this icon
It will center it for me right here
I'll rename it to stroke
Now we're going to do this: we'll create
a position
animation by pressing Alt +Shift+P and I'll move this keyframe forward to one second Perfect one second
I'll move him down here then bring him up here to
the end so we get this animation happening right here
Now we're going to create another animation by diving inside the shape layer
So we'll expand it by clicking the arrow then go here to Contents
On the side you'll see this option here to add
From here we have several options and we'll select trim paths
Trim paths will create animation that makes it look like we'revealing this
stroke So I'll come here adjust the start and end and create the keyframes
Then I turn here at the end and create additional keyframes
If you're not seeing this column of keys
Right-click here above to open columns and keep keys
enabled as it allows you to create keyframes from this point
Alright let's get started—
I'll do this: the end
value must begin at 0 and then go to 100 so here I'll put 0
That's why we'll see this effect occurring
The end started at 0 and went to 100
The counter has to start at 0 and go up to 100 as well but right now
nothing's happening because they're being animated simultaneously
So here's what we do: place this end keyframe here
and this start keyframe here and then we'll get this happening right here
That's exactly the effect we're
aiming for Now I'll select all the
keyframes press Shift+F9 choose position and open the graph editor
I'll select the keyframe here and drag it so the influencer ends up roughly there at 66
Same thing here except I'll lower it all the way down here and pull it back up to 66
So basically what we just did on this curve
It starts off a bit slowly then accelerates roughly around frame
15 and afterward gradually slows down until reaching the end
Here I'll do the same thing—I'll select these keyframes
I'll move this final keyframe all the way to the left
And at this keyframe I'll push it all the way to the right
Here we can leave it just like this
Let's see how the animation turns out
That's basically what we're aiming for—so an instance of our
animation is already ready with the
shape appearing and disappearing
Now we do this: select the shape
press Ctrl+Shift+C—it's the shortcut
to create a pre-composition—I'll type "individual stroke" here
So I tossed it into the pre-composition let me come here to
frame 15 I'll click here and enable the constant rasterize
What keeps our shape layer always sharp
Now pressing Y to activate the anchor point tool
I'll click here at the anchor point and drag it
down there—I think this spot will work fine
This anchor point will determine the rotation origin for our
shapes I'll now center this anchor point within our composition
Just to make visualization a bit
easier keep in mind I'm holding down
Ctrl—then it snaps precisely to the center point of the composition
And we need to consider how many times
we’ll duplicate this shape to create
something like a circle— in my case I want to duplicate it eight times
So if you do the math—let's use the
calculator here just for educational purposes
—we want to double it eight times so
you'd perform the following calculation
360 degrees divided by 8
So each shape needs to rotate 45 degrees
So here's what we'll do
We'll come here on the rotation
We can do this manually
That is this first shape has the value 0
I duplicate I come in rotation pressing R
and set it here at 45 degrees
I can do that
But we're going to do it in an even more practical way
Using an expression
I'll come here on rotation
Holding alt I click the clock
I'll type value
Then I open and close parentheses
I'll write index
Minus 1
And here at the end
I'll leave a space
Times 45
So after writing this expression
She'll basically do the following: she'
ll check the original
value of the layer
examine its index—which
is this address
right here this number—and when I duplicate it
It will have a new layer a
new address and a new value
it will add another 45
degrees so if I
double it here
For now her value is 0
This layer currently has a value of 0
And this one
Looked at this layer and saw that it's zero
It went up to over 45 degrees
So as I keep doubling
This keeps happening in all of them
Updated the value of both
It went to 90 degrees
because it added another
45 degrees and this one here went to 45 degrees
Remembering that she was at 0 degrees
So if I show this again here
Duplicate one more time
Then all were automatically updated
So now we need four more copies
Let's go
Great let's see if this works
It didn't turn out well
Because they're too close
to each other
Let's move the anchor point a bit farther apart I'll press A
To open the anchor point control
Let's see if it works like this
Great that's how it works
So far what you can do is
Select all
Link them to a null object
And reduce the size
Here's what I'll do
Ctrl + Alt + Shift + Y
And I'll create a null object
I'll type Ctrl or CTRL here
I'll link all of them to this null object
and slightly reduce their scale
Perfect this way we can visualize them more easily
And it's no problem if they leak
out of our composition because
with our constant rasterize
enabled that's exactly what happens
They'll still appear even if
they' removed from the
composition Okay Let 's
run the test I'll delete the null
object here I'll select all of them
Because their animation is already ready
Ctrl Shift C
To create a pre-composition
Stroke Explosion Group
That will be the name of this pre-composition
I'll re-enable Stroke Explosion Group
Remember she's exiting here
That's the final point in the composition
Where they get cropped
But if I adjust the scale here now
With constant rasterization
enabled look what happens—I
can seamlessly view the entire
composition no issues at all
That’s one of the advantages of working
with pre-composition and having the constant
rasterize option enabled as it ensures the shape layer remains sharp at all times
Even though he's cropped in the pre-compositions I adjust
the scale here and keep viewing everything perfectly
The animation is already working here
but they're quite symmetrical
so we can do the following now
enter the pre-composition of the shapes
And make some variations—for example
changing the order in which things appear
We can also create a cascading
effect—essentially like a staircase
From this point onward what you do
within the pre-composition is entirely
up to you—there are countless
possibilities That was the first example
So I showed you how to create a stroke
How to adjust the anchor point
And rotate all of them using an expression
I also showed you how to calculate this
using the calculator taking into account
the number of duplications you'll perform So now following the same principle
We'll recreate the same thing using
a different shape I'll show two
variations—one with a fill applied
and another with just a stroke
Come on let me just hide the Stroke Explosion
I'll select the Rounded Rectangle Tool here
I'll create my shape
Right now it has the stroke applied
But I don't want to I'm going to paint here to zero
And here in Fill holding Alt I'll click this icon
It will apply the fill for me
I'll just change the color
Again I'll center the anchor point
Ctrl double-click this icon
I'll move this shape to the center
Rename it to Rectangle
Now I'll create the animation here using Position
Let me come over here for a second
I'll move it up there already
I'll go back to the beginning
Play here downward
I'll adjust the curves of this animation
Shift F9
Click here in the Graph Editor
Manipulate these curves
I play this curve here at 66
And this curve right at the beginning
I descend all the way down here To reach zero speed
And the influence I play for 66
Remembering that I play for a value of 66
Because it's a value that works really well
In many cases it does
Once that's done we get this animation happening here
Now we can also apply a rotation
The rotation starts at zero
I'll play this forward here
In a second
I'll play it at around 75 degrees
I'll animate it the same way again
I select the keyframes
Domo F9
Enter the Graph Editor
Play the curve down to zero
And set the influence to 66%
Just remember I only use this value here
Because it works exceptionally well in various situations
We’re seeing this happen right here
Now let’s animate the scale
Alt Shift S
To create a keyframe for the scale
I'll animate this keyframe which is the
maximum scale of this shape to last for
15 frames which is halfway through the
animation then return
back to the beginning
Bet this amount for 10%
And here at the end I bet for 0%
Basically it's animation we want to appear
And then disappear
The same thing now
Select all keyframes
Shift F9
Enter the Graph Editor
Animate the curves okay
Then drag this curve down to zero
I'll push the influence over there as far as possible in this case
Here too
Push it to the maximum
Let me just grab this section of the curve
Align it roughly here in the center
Try to bring it down to zero
I make a slight adjustment to the curve so it has 33% influence
Around 33% is fine no need
to be exact—just as close
as possible Let
me hit play here and see if it works
The rotation can be a bit stronger
So let's go to the first keyframe and
add a bit more value here for the
rotation Let's see how it turns out
I don't think we need to change anything—this already works fine
The initial animation is already ready
Now we'll do the same thing again
Rectangle Select the shape
Ctrl + Shift + C
To play within a pre-composition
I'll rename the individual rectangle
I'll enable the constant rasterize
We'll do that thing over there again
Reposition the anchor point
Here's what I'll do
I'll press A
Move to this second anchor point value
And drag it upward
I think this value
here at 1080 will
be fine just to speed things up come
over here to rotation and
apply that expression—feel free if you'd like
Come inside the composition where the expression is already applied to the layers
Press R
Click here at the top
With the right mouse button
Copy expression only
Go there and paste it
But remembering the expression is
Value plus
Open and close parentheses
Index Minus 1
Times 45
It's good he checks the current
layer value each time you
duplicate he checks the previous
layer's value which will be zero
And it added up to another 45—just
as I doubled it
here He checked the
value from the previous layer which
is currently zero then added 45
I duplicated it
once more—this
layer is at zero the next one
went to 45 and the other one— right after that it reached 90
So every time you
duplicate it she adds
45 degrees so we
need 8 copies
—let's go
Let me gather the layers here
Let's see if it's working already
The animation is already running here
Now again to demonstrate the advantage
of using the constant rasterize
I'll render all these pre-compositions
Within another pre-composition
Let's go
Ctrl Shift C RectangleGroup
So if I leave it like this
With the constant rasterize applied
When I reduce the scale
we'll see they're cropped
when I activate it
it constantly updates
my composition
And you'll see it through them—
meaning it won't
be cropped Right
here outside the main composition
I can simply adjust the scale
I don't lose quality I
can view them perfectly
amazing so the animation
is already working
If we don't want them touch each
other in this way
we can re-enter
the group go back to the pre-
composition stage and
select all of them
Adjust the anchor point
That is move it slightly farther away
A bit closer
It's up to you
I'll move it a bit farther away
Let's see how it looks now
That's right
So it already works really well
Again You can come in here
And make those layer adjustments
In sequence
Okay
Play ahead three frames
From here you'll have these variations
And another variation it could have
is the following:
here we have these
compositions all
separated here—Individual and Group—let's just organize them
I'll come here
Ctrl B
which is the shortcut I created
to create a new folder
I'll type Individual
I'll create a new
folder Group
I'll place it here for Comps
So there's a folder for the group
And another folder for individual pre-compositions
I'll take the individual ones
And put them inside here
I'll take the Group and move it here into this Group just
for organizational
purposes to make it easier for what we're
about to do Here's what we'll do
We'll grab that
Individual Rectangle
— the square shape
— I'll duplicate
it write "Stroke
" at the end to
distinguish it and
here I'll
write "Fill"
Remember that I'm updating the name
Selecting the composition
And pressing Enter
Then I enter this option to edit a name
So I named one for Fill
And another for Stroke
I'll come over here to Stroke
Double-click So here you go
I already have this animation playing right here
I don't need to do anything else
In this scale animation neither position nor rotation
I'll set the Stroke value to 20
Then here in Fill
I'll click on this blue section
Select this option here
To turn off Fill
Grea
So we already have this animation happening here on the Stroke
but I want to add just one more instance of animation
on the thickness of this Stroke here
So I'll click here on Stroke
Write Width
Then it will search within
Here on the layer
The options that have this name
In this case we want to manipulate this one
Under the Stroke option
Stroke Width
I'll create a keyframe
I'll move this keyframe to the beginning I'll set
it to one second in
And decrease to zero
Let's see how this linear animation turns out
I don't think it worked quite well
enough I'm going to
do this: I'll
increase the value here even further push it up to thirty and then apply that amount here
Influence at 66 on the curve
I'll click here in the Graph Editor
I'll stretch it to 66 influence
That's why I curve it up
there so it starts at zero
speed—okay It'll reduce
the thickness of our stroke
In a slower manner
Speeding up here toward the end
That is the peak speed of the animation
Will be roughly around this point here
Remember this isn't a rule—feel free to
do it however you find most interesting
Marvelous for me it already works this way
Now we're going to do the following
We've created this second version
Of our individual animation
We now need this second
version applied to a group So
let's do this:
in the Rectangle
Group I'll duplicate it
I'll do the same
thing I did before
—press Enter rename
it to
Stroke go over to this other pre-composition press Enter select
Fill and double-click
No Rectangle Group Stroke
To enter the composition
I'll select all these pre-comps here
Go here to Rectangle Individual Stroke
Click Hold Alt
Click again
But I drag and drop it right here
Into this selection I've made
Within the timeline
When I do this
It will automatically replace
All these layers
From this composition I created there
That's how we get this animation happening
Just like the other one
Let me go back to our main composition
It's already been renamed to Fill
Let me also place the Stroke group here
I'll move it a bit further forward
Let's see how it turns out The first one came in with the Fill
Now the second composition
Which is the Stroke
Is also happening
That way I can reactivate
The Constant Rasterize
and reduce the size
I'll set it to 38
Just like our previous composition
This one here
So okay
Our animations are already working
Along with their variations
Let me fast-forward a bit
Re-enable the Stroke visualization
So we have the Stroke
We have the squares
Then another thing we can do
Is have you guys animate the scale
Out here
From the group
That is in the main composition
To bring in an even more layer
In your animation
I'll place it here at 0
Then I'll advance by one second
Skipping 30 frames
10 20 30 Just reminding you that I'm doing this
Same as with Ctrl Shift
And using the arrow
I can create animation here
Entering the Graph Editor
Pulling the curve
Seeing it all the way to the left
As far left as possible
That means the animation's peak
speed will be right
at the beginning
then it will slow down as it reaches the end and we can also animate that
The rotation out here also
I can come here with the value 105
With a random value
And do the same thing I did up here
Enter the Graph Editor
Pull that curve
all the way
to the left at the end as far as it'll go and drop it
down to the 0
Speed mark Okay
Speed peak here at the start
Slowing down toward the end Let's see
how it turns out
And that's it folks
These are just a few suggestions
On how you can do it
Keeping in mind that with a bit more time
And dedication
You can do this here
That is other variations using different shapes
And just to remind you
If you want to use other shapes
Here's what you can do
Let me get in here on the Individual Rectangle
Okay That is the spot where there's only the animated Shape Layer
I can select the Shape Layer
Let's say for example
You want to work with a star
which is essentially this last option here
Start Tool
I'll give it a double click It created a star for me
I can press the U
It'll open up for us
Several options here from our Shape Layer
But in the case of the star
We focus on this section right here
Inner Radius
E Outer Radius
which basically defines its size
I can reduce it here
to make it roughly the same size as the square
With the Shape Layer selected
I can reposition it try to
center it roughly within the
square and adjust these points here
At the ends of the shape
For him to adjust its size
I can hold Shift to keep everything proportional
And the star also allows us to manipulate
O Roundness
That is make it slightly more rounded
In this case the Roundness option
corresponds to that of the square
Let me find the Roundness option
here in Polystar Path Let me
click here Then we get these options here: Inner
Outer Roundness
I can increase the outer radius here and here to increase the inner radius
Once that's done after
I've adjusted the shape
In this case we're working with the star
I can come here
In the Rectangle
And hide it
Okay Let me just go back here
Collect these options
When you expand your layer
It will appear like this here
Contents So when you expand
All Shape Layers within Contents
They'll be here PolystarRectangle
So you can choose
Hide
Or display it
Okay Let's do this one more time
I'm working with the Rectangle here selected
I select the tool here
That I want to use
I now want to create a circle
I'll give it a double-click
It didn't work here because
I have the Shape
selected Let
me click on this layer Okay
Now it works
Just double-click
Marvelous He created the circle for us
Now we can adjust the circle's size
See
When these icons
appear here white
on both ends it
means we're working with the
transform of the Shape
Layer okay For comparison purposes
If I click here
It turned purple
Meaning we're manipulating
The transformation of our layer
When I select the Shape
They turn white
Okay Indicating
that I'm now in the transform
mode for the Shape Layer So now
I'm going to reduce its size
To roughly match the size of the star
Now I can reposition it
Let's see how it looks
So the circle animation is already working
Let's test the star
Marvelous It already works as well
So that's basically what I did
For these other examples here
I went inside the composition
Changed the Shape
And I created a new pre-composition
So I came here In the individual composition
That is where there's only the Shape
I made the replacement
Duplicated the pre-composition here
I renamed it — that
is I just came here to
Star — Individual — and
this will be her version
with the fill applied —
the Fill — now that 's done I came here to
Rectangle Group Fill
I duplicated it
Renamed it to Star Group Fill
When I joined this setup
I selected everything
I came here
I selected the individual star version
I clicked
Holding Alt
And dragged
And replaced the elements
in here Okay
So basically that's what I did—
repeated it across
several other
Shape Layers until I got this
result here I hope it's clear
I hope this has helped you in some way
That you've learned a little more about pre-compositions
Use this rasterize option
Any questions
Leave them in the comments below
I'm Xucrutz
And you were here on the channel
Layer Lemonade
