How to Create Animated Geometric Lines in After Effects

After Effects 09/06/2019 5 min read

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

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

Step 2: Create a Polystar

  1. Create a new shape layer (Layer > New > Shape Layer), name it “Poly 1”, and add a Polystar to it. 
  2. In the Polystar options, change the type from Star to Polygon, Points to 12, and Outer Radius to 400. 
  3. Add a stroke and set the width to 5. 
  4. 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. 
  5. Now, duplicate the new Shape Layer (it will be Poly 3) so there are three shape layers and two are identical. 
  6. Right-click on the polystar path in the Shape Layer’s contents and select Convert to Bezier Path.
  7. 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

  1. 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. 
  2. Create a new null object and name it “CNTRL 1” and duplicate it so you have 2 nulls. 
  3. 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. 
Create Null Objects

Step 4: Connect the Points of the Shapes

Now, this is where you can get really creative.

  1. 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.
  2. 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.
  3. Shift + parent the remaining points on Poly 3 to the identical ones on Poly 2. 

Your shapes should now look like the image below:

Connect Points of the Shapes

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

  1. 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.

Use the Pen Tool
  1. Name this new layer “Extra”. 
  2. Select all the paths and hit the Points Follow Nulls button again. 
  3. 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.

  1. Set a scale keyframe on the CNTRL 1 null at frame 0 and change the value to 0%.
  2. Then at frame 12 set the scale to 115% to provide some overshoot. 
  3. At frame 17 change the scale to 98% and then at frame 22 set the scale to 100%. Ease the last three keyframes. 
  4. 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. 
  5. At frame 60 set a scale keyframe with a value of 100%. 
  6. At frame 65 set a scale keyframe with a value of 115%. 
  7. At frame 85 set a scale keyframe for -115%. 
  8. At frame 90 set a scale keyframe for -98%, and at frame 95 set a scale keyframe for -100%. 
  9. Ease all five of these new keyframes. 
  10. For the keyframe at frame 65, set the incoming influence to 50% and the outgoing influence to 60%. 
  11. For the keyframe at frame 85, set the incoming influence to 80%. 

Step 6: Offset the Animation on the Other Layers

  1. Highlight all the scale keyframes and copy them
  2. With the playhead at frame 0, paste the keyframes onto CNTRL 2. 
  3. Offset the CNTRL 2 layer so that it begins at frame 3. 
  4. 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: 

  1. Create a new null object and name it “Rotate”. 
  2. Parent the CNTRL 1 and CNTRL 2 nulls to the Rotate null. 
  3. 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:

  1. Duplicate the Poly 2 shape layer and name it “Matte”.
  2. Add a Fill to the Matte layer. 
  3. Bring some footage into the composition, directly below the Matte layer and set its track matte to Alpha Matte
  4. 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.

Share this article: