Follow this tutorial to learn how to create animated geometric lines in Adobe After Effects. The fun effect in this animation is the illusion that the lines in each shape are attached to one another and interact. It looks extremely cool, but it’s all happening with just a handful of keyframes. Read on to learn how to create this awesome geometric effect and impress your audiences.

How to Create a Geometric Line Animation

Step 1: Design the Background

Make a new composition that’s 1920×1080, 29.97. Add a new comp sized solid to be the background (Layer > New > Solid). With the solid selected, add a Gradient Ramp (Effect > Generate > Ramp) and adjust the colors to your taste.

Step 2: Create a Polystar

Create a new shape layer (Layer > New > Shape Layer), name it “Poly 1”, and add a Polystar to it. In the Polystar options, change the type from Star to Polygon, Points to 12, and Outer Radius to 400. Add a stroke and set the width to 5. Duplicate the Shape Layer (it will be Poly 2) and adjust the duplicate’s Path settings to 8 points and an Outer Radius of 300. Now, duplicate the new Shape Layer (it will be Poly 3) so there are three shape layers and two are identical. Right-click on the polystar path in the Shape Layer’s contents and select Convert to Bezier Path. Do this for all 3 layers. Once this is done, the path won’t have the same options of increasing points and radius so make sure you are happy with the shapes before doing this.

Step 3: Create Null Objects

Highlight the paths and click the Points Follow Nulls button in the Create Nulls From Path panel. This creates a null object for every point on the polygons and the points of the polygons will follow the null objects. If you don’t see this panel, go to Window > Create Nulls From Paths and dock it wherever you’d like. Create a new null object and name it “CNTRL 1” and duplicate it so you have 2 nulls. Parent all the nulls of Poly 1 to CNTRL 1 and all the nulls of Poly 2 to CNTRL 2. Your shapes should look like the image below.

Step 4: Connect the Points of the Shapes

Now, this is where you can get really creative.

While holding shift, parent Poly 3’s null 1.0 to Poly 1’s null 1.0. Holding shift parents the layer but it also moves it to the exact position of the parent. This will move the point on Poly 3 up. Repeat these steps with Poly 3’s 1.2, 1.4, and 1.6 being parented to Poly 1’s 1.3, 1.6, and 1.9 respectively. Shift + parent the remaining points on Poly 3 to the identical ones on Poly 2.

Your shapes should now look like the image below:

To finish up the look of this shape, draw with the pen tool and do a similar process of attaching their points to nulls.

Making sure no layers are selected, use the Pen tool to draw 4 separate shapes connecting the remaining Poly 1 points with points of Poly 2 that are connected to Poly 3.

It might sound complicated, but take a look at the image below and it will make sense. Below, the stroke color has been changed so that the newly drawn shapes are easier to see.

Name this new layer “Extra”. Select all the paths and hit the Points Follow Nulls button again. Now Shift + parent the new null points to the points they were drawn to.

With that done, the “rigging” is over. Now it’s time to animate.

Step 5: Add Scale Keyframes

From this point on should be a process of adding keyframes to scale at various points along the timeline to create a smooth ebb and flow effect. The trick to getting a smooth motion is to add the Easy Ease function to the keyframes so the movement doesn’t stop suddenly.

Set a scale keyframe on the CNTRL 1 null at frame 0 and change the value to 0%. Then at frame 12 set the scale to 115% to provide some overshoot. At frame 17 change the scale to 98% and then at frame 22 set the scale to 100%. Ease the last three keyframes. On the keyframe at frame 12 set the incoming influence to 80% to give it a nicer ease in. The rest are good as they are. At frame 60 set a scale keyframe with a value of 100%. At frame 65 set a scale keyframe with a value of 115%. At frame 85 set a scale keyframe for -115%. At frame 90 set a scale keyframe for -98%, and at frame 95 set a scale keyframe for -100%. Ease all five of these new keyframes. For the keyframe at frame 65, set the incoming influence to 50% and the outgoing influence to 60%. For the keyframe at frame 85, set the incoming influence to 80%.

Step 6: Offset the Animation on the Other Layers

Highlight all the scale keyframes and copy them. With the playhead at frame 0, paste the keyframes onto CNTRL 2. Offset the CNTRL 2 layer so that it begins at frame 3. Highlight the last five keyframes on CNTRL 2 and drag them forward in time so the first one is at frame 58 (two frames before CNTRL 1).

Step 7: Add a Constant Rotation

The object should be moving nicely now. Add a constant rotation to keep it looping:

Create a new null object and name it “Rotate”. Parent the CNTRL 1 and CNTRL 2 nulls to the Rotate null. On the Rotate null add the expression “time*30” to its rotation. This will make it rotate 30 degrees every second. You can adjust the value of 30 to whatever you like.

Step 8: Use the Animation as a Transition

You can use this shape animation as a transition to get from one piece of footage to another. To do this:

Duplicate the Poly 2 shape layer and name it “Matte”. Add a Fill to the Matte layer. Bring some footage into the composition, directly below the Matte layer and set its track matte to Alpha Matte. When the shapes scale to nothing for that brief moment, you can transition to another piece of footage if you desire.

As a finishing touch, vary the types of strokes in the shape. Try setting Poly 2’s stroke width to 15, Poly 3 to 10, and Extra to 8. This adds some variance and looks a little nicer.

At the end of this, you should have a very cool animating geometric After Effects project. This is something you could use in your presentations, branded content, or any other kind of video project you’re working on. Spending some time with keyframes and expressions will help you grow your After Effects skills and you can apply this technique to other projects.