In this tutorial, you’ll learn how to animate icons in 3D in After Effects – without having to use 3D software like Cinema 4D or Maya.
The animation consists of tubes forming the icon – and then a final reveal using masks. You will learn techniques using AE’s Graph Editor, shape layers and how to build sliders to control a wide range of parameters using simple expressions.
By the end of the tutorial, you’ll be able to animate any icon using the methods explained here by Sri Lanka-based motion design and VFX artist Buwaneka Saranga. Here I’m going to use the old Deviant Art logo, and you can see how it works with a bunch of social media-flavoured icons above.
Adobe After Effects CS6 or above
Time to complete
Login / Signup here to download this tutorial's project files (it’s free!)
Download the project file. The rotation null and the icon frame have been setup and animated for you.
Import your icon of choice in .ai or .eps format (as we need it to be a vector). Drag it on to the timeline and make it 3D. Scale the icon so that it fits the ‘Frame’ shape layer. Lastly parent the icon to the ‘Rotation Null’ layer.
Right click on the vector icon layer and select Create shapes from vector layer. This will create a shape layer native to After Effects. Rename this layer to ‘Reveal’.
Create three circular masks on the ‘Reveal’ layer in a way that overlap each other. Go to each mask’s Transform parameter. Scale each down as small as they can get and set a keyframe for each on the Mask Path parameter at frame 28.
As shown in screenshots, scale the masks over time in such a way that it reveals the logo at frame 68. The masks should scale at different rates for a more pleasing effect.
Select all of the mask keyframes and hit
F9 to apply Easy Ease to them. Open the Graph Editor to offset each mask keyframe slightly and adjust their curvature to match what’s shown in the screenshot.
The secondary effects of the reveal are the expanding white rings. To create this, first hit
Cmd/Ctrl + Y to create a new comp-sized white solid and make it 3D. Parent it to the ‘Rotation null’ layer.
Go to frame 1 and draw two masks to form the inner and outer edges of a ring. Change the mask mode of the larger mask to Add, and the smaller to Subtract.
Use the Transform controls (arrow keys or position values) to scale and centre the ring around one of the revealing masks on the icon layer.
Set keyframes at frame 22 on the mask paths of both the outer and inner mask of the ring element. Scale them both down to match the size of the revealing mask on the icon layer.
At frame 70, scale them up to match revealing mask’s size (remember to keep the outer mask and inner mask thickness between them roughly the same). Lastly, apply an easy ease to the start and end keyframes by selecting them and hitting F9. Adjust their curves to resemble a sharp spike.
Create two more rings and repeat the process around the other two revealing masks.
Now let’s create the colorful tubes that form the icon.
This is my sketch of how I wanted to do this. I’ll show you how to do this in the next step.
Create two 3D solids that are 20 x 20 pixels and hit
A to reveal the anchor point property. Enter 0, 0, 0 for the X, Y, Z anchor points.
Go to end of the rotation animation, parent them to the rotation null and place them appropriately where you wish to extend out from.
After placing them, displace one -90 units and the other 90 units (both in the Z axis).
Lock the two solid layers. Select the Pen tool and make sure it’s set to Shape creation mode, not Masks.
Draw a Bezier path connecting the front solid’s anchor point to the rear solid’s anchor point, via the contour of the logo/icon.
Rename the shape layer as ‘dynamicLine’. Lastly, click on the stopwatch icon on Path 1 to set a keyframe.
Move forward 3 frames and manually adjust the Bezier path to fit the contour of the logo icon – ensure that you connect the ends to the anchor points of the solids (that is the top left corner).
Continue placing keyframes every 3 frames till the end of the animation.
Open the settings for Stroke 1. Set the Stroke Width to 6, change the Line Cap mode to Round Cap and the Line Join mode to Round Join. Rhis will create rounded end points and rounded bends.
ename ‘Shape 1’ to ‘Line 1’, and duplicate it twice.
Change the colour of ‘Line 2’s stroke to R34, G169, B225 and change its Stroke Width to 4. The stroke colour of ‘Line 3’ is R217, G211, B35, and its Stroke Width is 2.
Reverse the order of the shape groups so that from top to bottom on your Timeline you have ‘Line 1’, ‘Line 2’ and ‘Line 3’.
Add Trim Paths to all groups. In ‘Line 1’, set the Start parameter of Trim Paths 1 to 80%. In ‘Line 2’, set the Start parameter of Trim Paths 1 to 60%. In ‘Line 3’, set the Start parameter of Trim Paths 1 to 40%.
Create slider controls in After Effects using Expressions
With the shape layer selected go to
Effect > Expression Controls > Slider Control. Immediately hit Enter and rename it as Shrink. Hit Cmd/Ctrl + D to duplicate it and hit Enter again to rename it as Offset. Now you have two slider parameters that we’ll use to tie expressions to.
Alt-click the stopwatch of the Start parameter of ‘Line 1’s Trim Paths 1 and enter the following expression.
shr = effect(“Shrink”)(“Slider”);
value + shr;
For ‘Line 2’s Trim Paths 1 enter:
shr = effect(“Shrink”)(“Slider”);
value + (shr*2);
For ‘Line3’s Trim Paths 1 enter:
shr = effect(“Shrink”)(“Slider”);
value + (shr*3);
Enter the following expression to all the Offset parameters of the Trim Paths:
value + effect(“Offset”)(“Slider”);
Set a keyframe for the Shrink slider control and set its value to 20. Move forward to frame 21 and set its value to -15, move to frame 32 and still keep the value at -15, move to frame 54 and bring back the Shrink value up to 20.
Move back to frame 32 and set a keyframe for offset slider at value 0. Scoot to frame 54 and change the value of the offset slider to -343. Select all keyframes and hit
F9 to easy ease them.
Open the Graph Editor. Drag the Bezier handles and change the curvature of both the Shrink and Offset parameters as shown here. Keep the handles flat to avoid any unnecessary bounces.
Using the techniques you’ve just learned, create a variety of contours extending out in Z-space.
In the example shown here, I have set up four contours extending out into Z-space. Each contour has Shrink and Offset custom slider controls created with expressions.
Turn on Allow Keyframes Between Frames in the Graph Editor to add variety.
If you paid close attention to the video, you may have seen a colourful stack of flat contours settling into the icon. In order to create these, first make an empty shape layer and call it ‘stack_1’. Make it 3D and parent it to the rotation null.
Copy the vector path information from the ‘Reveal’ shape layer that we created at the start. Select Contents on the empty shape layer and hit
Cmd/Ctrl + V to paste.
Add a stroke below the paths to give it thickness. Go to the end of the animation where the icon lays flat. Use the Transform controls to align and fit the stroke layer to match the icon.
Add a Trim Paths to the Contents stack. Set Start and End parameters to 79%. Set a keyframe for Offset at 0 degrees at frame 9. Scoot to frame 48 and set the Offset value to 200°. Wind back to frame 15 and set a keyframe on the End parameter, move forward to frame 22 and set the End’ value to 100%. Select all keyframes and easy ease them and match a curve curvature as shown below.
P on the keyboard and right-click on Position, and select Separate Dimensions. For the Z position, set a keyframe at frame 13 with a value of -160. Move forward to frame 35 and set its value to 0. Select the keyframes and easy ease them.
Go to the Graph Editor and exaggerate the easing by pulling the Bezier handles as shown.
Duplicate the shape layers 5 times. To create a ‘stacked’ effect, offset their Z positions and the Offset parameter of the Trim Paths in the Graph Editor as shown.
Lastly give them some nice stroke colours. The colours I used are shown here.
And you’re done.