DNA is the building blocks of life, so the After Effects double helix can add a lot of meaning to your video project. Perfect for your next science-focused video, or a title sequence for a news story. The double helix has endless applications! You just have to decide what it means to you.

In this tutorial, you’ll learn how to build an animated double helix in After Effects. Follow the steps below to make your double helix come alive. With an animated double helix your video will catch your viewers attention, and keep it.

Like DNA being the building blocks of all life, a new composition is the building block of any After Effects project. Now you get to combine the two by building After Effects DNA! You genius, you!

How to Create a DNA Strand Animation

Step 1: Create a New Composition

Get your project started on the right foot by creating a new composition with the correct settings for your video.

Create a New Composition. Give your new composition a name, something like, “Double Helix.” Make sure your new composition is set to 1920×1080 29.97. Hit OK.

You’re already starting on the right foot! Now things are going to get interesting!

Step 2: Draw a Horizontal Line Using the Pen Tool

In this step, you’ll use the pen tool to draw a horizontal line, and then use the grid to ensure that line is ruler flat.

Activate the Pen Tool. Draw a horizontal line. Click on the top bar button View > Show Grid. Click on the top bar button View > Snap to Grid. In the viewer, grab the line handle and center within the grid. Click on the top bar button View > Show Grid to toggle the grid off.

Now let’s escape the grid and add some more elements!

Step 3: Set Up the Layer Structure for the Double Helix

Time to set up the layer structure you need for creating your double helix.



Give the layer a name, such as “Helix.” Twirl down the layer to reveal the Shape property. Rename Shape to Line 1. Delete the Fill Property. Drag Stroke1 out of the group and drag it below the Line1 layer. Change Stroke1 to be 15 pixels wide. Twirl open Stroke 1 to reveal the Stroke Width property. Switch from Butt Cap to Round Cap.

Now, your line will have the pixels width to make an impact!

Step 4: Make Your Line a Zig Zag

Now, make a zig zag to form the basis of the double helix.



Open the Add menu in the Timeline panel. Select Zig Zag. Twirl open Zig Zag, and adjust the settings: Size to 125, Ridges per Segment to 2.00, and Points to Smooth.

Lookin’ good!

Step 5: Create the Base of the Double Helix

Open the Add menu in the Timeline panel. Select Trim Paths. Twirl open Trim Paths, and set End to 67%. Now, select the Line1 layer. Type Command + D to Duplicate. Twirl open the duplicated layer Line2, and set the scale to -100 in the Y position.

Step 6: Set the First Keyframes to Animate Double Helix

Now that you have created your double helix base, you’re ready to animate. You’ll use Trim Paths to set the first keyframes for your DNA.

Twirl open Trim Paths. Set a keyframe at frame 0. Move playhead to frame 30. Set a keyframe for 118.

Animation will make you DNA strands come alive!

Step 7: Create a Reference Object

A reference object will help you line up your DNA to the center of the viewer! You’ll use a solid layer and change the opacity here.

Click on the top bar button Layer > New > Solid. Click on the button Comp Sized in the dialog box. Choose a color that will stand out from the background, and hit OK. Type t to open the Opacity property, and lower to 35%. Scale the Solid to be the same size as the Helix line in the viewer.

Step 8: Create a Looping Animation

In this step, you’ll create a loop that will make your double helix move across the viewer.

Center your reference object to the composition. With your Helix layer selected type p to reveal the Position property On frame 30, line up your Helix to match with the reference object center, and set a keyframe. On frame 0, line up your Helix to match with the reference object center, then set another keyframe Delete the reference object.

By this point, you should really start to see the sequence come alive!

Step 9: Build the First Vertical DNA Strand

Time to create a vertical line that will be connected to the horizontal lines you’ve already created.

Trim the work area Press Play to check looped animation is working. Click on the top bar button Layer > New > Shape Layer. Click on the top bar button View > Show Grid. Activate the Pen Tool. Draw a vertical line that fills in the helix at the highest point. Click on the top bar button View > Show Grid to disable the grid Name the Shape Layer to something like, “Small Lines.” Twirl open Small Lines, and delete the Fill property. Hit p to activate the Position property. In the viewer, move the vertical line to the first spot on the left side of the helix.

Step 10: Add a Repeater to Copy the Vertical Lines

Use the Repeater property to add more vertical lines to your double helix.

Open the Add menu in the Timeline panel. Select Repeater. Twirl open the Repeater to reveal Transform, and change the Position to 35, and the Stroke Width to 7. Add as many copies as required to fill the length of the helix in the viewer.

As you can see, your project is really starting to take shape!

Step 11: Create a Matte for the Small Lines

Create a matte by drawing a mask to fill in your double helix shapes. Now your DNA strands will not extend past the double helix base.

Click on the top bar button Layer > New > Solid Name Helix Matte Hit OK Type “t” to open Opacity property Lower Opacity to 35% Draw a mask to fill in one of the Helix “lemon” shapes Move the playhead to zero Type “command + d” to duplicate the matte Move the matte to line up with the rest of the Helix “lemon” shapes Parent the Helix Matte layer to the Helix layer so the matte will follow the animation At frame 30, add any mattes to fill in the remaining Helix “lemon” shapes

Superb!

Step 12: Connecting the Track Matte to your Alpha

Select the Helix Matte layer. Turn Opacity up to 100%. Select the Small Lines layer, then switch the Track Matte to Alpha.

Your animation is pretty much ready to go, but with these final steps, you can take your work to the next level.

Step 13: Smooth Out the Vertical Lines

This step will make your animation smoother, so your audience would not be distracted by any bumps.

Select the Small Lines layer. Watch the animation for any points when the vertical lines are close to the screen edge. Bump Position over slightly to create a cleaner view. Set a keyframe for the new position.

Step 14: Infinitely Loop Your Double Helix

Add an infinity loop so your animation will play forever! Or, for as long as you want it to.

Select all layers. Click on top bar button Layer > Pre-compose. Name it something like, “Helix Animation,” then hit OK. Select the “Helix Animation” layer, and go to the pre-comp layer. Click on Time > Enable Time Remapping, then set a keyframe at 30. Hit the Arrow icon beside the keyframe creator to jump to the next keyframe in the timeline. Delete that keyframe, should be the one at the end of the pre-comp. Option + click on the Stopwatch. Use the Add menu, then go to Property > LoopOutDuration.

Presto! You’re done, and you can see that everything is now looping!

Building a double helix in After Effects from scratch has a few steps involved, but it’s an impressive animation to understand how to do! Now that you know how to animate DNA, you can add it to your future projects.

