How to create a simple icon animation in After Effects

Today, I’m going to show you my process of animating an asteroid icon. This simple tutorial should be useful to people that have basic knowledge of Adobe After Effects. The tutorial is not about making a professional animation, it’s about using specific tools and tricks to make a simple animation fast and easy.

1. Static Assets

To save time, I’ve prepared a file which has 2 compositions: star – it’s just a dot of 4px width, and asteroid – an illustration of the asteroid which has 4 layers:  

  • asteroid-outlines – circle and asteroid’s tail
  • craters – 4 craters on the surface of the asteroid
  • craters-mask – hidden layer, which just has a circle with the size of the asteroid (it’s basically a helper layer for our animation)
  • asteroid-color – a back layer which has a color, a shadow and a glance of the asteroid

Download static assets

2. Creating asteroid rotation effect

To make a rotation effect we will use one trick which is simply creating a few more craters and moving them under the mask (craters-mask).

For the animation to be looped out, go to craters -> Contents, select all the craters, press Command+D to duplicate them and with arrow UP key (holding Shift key) move the copied craters 60px up.

Fill the space between the existing craters with some more random craters. It will be the other side of the asteroid. Here is my version:

Change the Track Matte property of craters layer to Alpha Matte (you can see that craters-mask layer now has a mask icon). Now, we can only see the craters that are on the surface of the asteroid.

On the timeline, move the time indicator to 00:00, select craters layer and hit P key on the keyboard (it will open up a Position property of the layer). Click the clock/stopwatch icon to start recording the timeline.

Move the time indicator to 02:00, select the Y coordinate of the Position property and type +60 in the end (it will add 60px to the current vertical position). Now, you can see why we duplicated the craters and moved them 60px up above – our asteroid on the last keyframe looks exactly the same as on the first. Press the Space key to play the animation, the rotation effect is looped out!

3. Animating the asteroid tail

Go inside asteroid-outlines layer and open Contents dropdown. You can see here the outline circle of our asteroid (head) and 4 tail lines:

Select all the layers that start with line-, click Add button (located on the right from Contents dropdown) and select Trim Paths option which will help us easily create looped movement of the tail lines. Let’s start with the first line, open the dropdown of the layer line-1 and then open Trim Paths.

Change Start value to 0 and End value to 75%. To see the desired effect, you can play with Offset property values. Set time indicator to 00:00, click the clock/stopwatch icon near Offset property, then move time indicator to 02:00 and set Offset to: 2x+0.0 (two full cycles). Play animation to see what we’ve got:

For the rest of tail lines we will use the same approach with some customisations.

Let’s animate the 3rd and 4th lines, and then go back to the 2nd line.

Here are the values that I’ve got for the 3rd line. Trim Paths: Start: 0, End: 89; time indicator on 00:00: Offset property: 0x+229; time indicator on 02:00:  Offset: 2x+229.

4th line. Trim Paths: start: 0, end: 85; time indicator on 00:00: Offset property: 0x+150; time indicator on 02:00:  Offset: 2x+150.  

For the line-2 I’ll to add a bit more detail – two gaps instead of one. Select line-2 layer and press Command+D (Ctrl+D on Windows) to duplicate it, rename the copy layer to line-2-2.

Set time indicator to 00:00. Change line-2 Trim Paths properties to: Start: 28; End: 100; Offset: 0x+20. Line-2-2 Trim Paths properties: Start: 24; End: 25; Offset: 0x-20. As you can see, our line has 2 gaps now.

Time indicator is at 00:00, click clock/stopwatch icon near Offset property of both layers line-2 and line-2-2. Move time indicator to 02:00, and change Offset properties: line-2 to 2x+20; line-2-2 to 1x+340.  

4. Adding stars animation

Dive into the star composition. The idea is to make the star smoothly appear, grow and disappear. Let’s select our star layer:

Set the time indicator to 00:00, hit the T key (to open transparency property), set Opacity to 0 and click the clock/stopwatch icon to start recording the value. The next step it to hit the S key (to open scale property), set Scale to 0 and click the clock icon:

Set time indicator to 02:00 and create the keyframes (by clicking the diamond sign on the left side of a property) with 0 values for Opacity and Scale here to show that we want the star to disappear at the end:

To make the star show up, set the time indicator to 01:12 and set the Scale value to 120 and Opacity to 100:

That’s how the star animation looks like now:

Select all the keyframes on the timeline and press fn+F9 (F9 on Windows). It will set the animation transition to Easy Ease which means that the transition between the keyframes will go with acceleration to make the animation look more smooth:

5. Final animation

Let’s create the composition for the final animation with the following settings:

Drop the asteroid composition on the new scene. As you can see, the asteroid animation plays for 2 seconds and then disappears. Let’s add the rotation and some subtle movement to our asteroid first and figure out this problem later. Select asteroid layer, then press R key (to open rotation property) and set the Rotation value to 45 degree:

To add some nice movement:

– press P key (to open position setting) and click on the clock/stopwatch icon to start recording the position values.

– set the time indicator to 00:00 and set: x value: 110; y value: 40

– set the time indicator to 01:00 and set: x value: 115; y value: 45

– set the time indicator to 02:00 and set: x value: 110; y value: 40

– select all the keyframes and press fn+F9 (F9 on Windows) to make Easy Ease transition

Select the asteroid layer, hit command+D(Ctrl+D on Windows) to duplicate it and move the new layer to start in 02:00 position on the timeline:

The asteroid animation is done:

The final step is to add stars. Drop a few star compositions on our scene, locate them as you like and shift them on the timeline to make the stars appear in a different time:

I also increased the size of the second star by making the Scale value 135% to add some diversity:


I hope you will be able to follow the steps above to create your own version of the asteroid animation. Let me know if the tutorial was useful for you and if you have any questions.

Here’s the AE source file of the animation.

Outlane Graphics

Spice up your website with premium vector graphics.

Visit our store
  • কাওসার মাহমুদ

    Great tutorial… Clean and clear .. Helpful for newbies like me