How to Create a Penrose Triangle in Adobe After Effects

After Effects 16/11/2018 4 min read
Penrose Triangle After Effects

The Penrose triangle is an impossible, but very cool object. If you want to include this optical illusion in your designs, you can create it in After Effects CC. You’ll just need a little creativity first. Let’s take a look at how to create a Penrose triangle in After Effects.

Learn How to Make a Penrose Triangle

Step 1: Create the Triangle Sides

The first step is going to be making a cube, which will be the basis of the entire animation. 

  1. Create a new composition (1920×1080, 29.97fps, 600 frame duration) and name it “Penrose Triangle.” 
  2. Go to Layer > New > Shape Layer, and using the add button, add a Rectangle and a Fill
  3. In the Rectangle Path settings, change the Size to 450. You can change the fill to whatever you like. 
  4. Rename the layer “Side 1,” and make it a 3D Layer
  5. Duplicate Side 1 twice, so that you have two more shape layers (“Side 2” and “Side 3”).
  6. Change the fill on the two new sides so that they are all different from each other. 
  7. On Side 2, use the Anchor Point tool (Y) to move the anchor point all the way to the top of the layer. Holding CMD on a Mac will snap it to edges. 
  8. Change the X Orientation to 90 degrees
  9. On Side 3, use the Anchor Point tool (Y) to move the anchor point all the way to the right side of the layer. Change the Y Orientation to 90 degrees.

Step 2: Add a Null Object

  1. Go to Layer > New > Null Object. Name the null “Control” and make it 3D. Change the Z Position of the the Control null to 225 (half of 450), so that it’s in the center of the cube. 
  2. Parent all 3 sides to the Control null. 
  3. On the Control null, change the Y Orientation to 55 degrees and the Z Orientation to 45 degrees. 

Step 3: Fix the Perspective Warp

Now you can see the cube! The cube is showing a little perspective warp, so to combat that, let’s make a new camera with a strong zoom. 

  1. Go to Layer > New > Camera.
  2. In the camera settings, change the type to One-Node Camera and the Focal Length to 1000mm. This will eliminate any of the perspective warp. 
  3. With no layers selected, use the Pen tool to draw a line that follows the edges of the cube (it’ll end up being two separate paths). 

Step 4: Color the Shape

  1. Name the new shape layer “Lines,” and in the shape contents, delete the Fill.
  2. In the stroke settings, set the Width to 25 and change the Color to whatever you like. 
  3. Toggle the Preserve Underlying Transparency button on the Lines shape layer. This will make the lines only visible where the layers below it are. Now the cube is done. 

Step 5: Animate the Cube

  1. Highlight all the layers and go to Layer > Precompose. Name the new comp “Cube,” and hit OK.
  2. Pull up the Scale of the Cube comp, and change it to 40%
  3. Pull up the Position of the Cube comp, and set a keyframe at frame 0 for 960, 290
  4. At frame 100, change the Position to 1255, 800
  5. At frame 200, change the Position to 665, 800.
  6. At frame 300, bring the Position back to 960, 290
  7. Highlight all the keyframes, right-click on one and go to Keyframe Interpolation. Under Spatial Interpolation, select Linear. This will make the cube move in a straight triangular path. 
  8. Select the Cube comp and go to Layer > Precompose
  9. Name the new comp “Cube Animation,” and make sure “Move all attributes…” is selected.
  10. With the Cube Animation comp selected, go to Effect > Time > Echo
  11. In the Echo settings, change the Number of Echoes to 300 and the Echo Operator to Composite in Front. This gives the “extrusion” of the cube. 

Now, this is where you’ll run into the problem of working with an impossible object. We want the end of the animation to go behind the beginning, but that’s not how it layers with the echo. To get around this, you’ll have to get a little creative. 

Step 6: Create the Triangle Using Masks

  1. Duplicate the Cube Animation comp. 
  2. Rename the duplicate “Front.” Right-click on it and go to Time > Enable Time Remapping. At frame 75, place a keyframe on the Time Remap property. Then go to the keyframe at the end of the timeline for Time Remap and delete it. This stops the animation of the duplicate at frame 75. 
  3. Using the Pen tool, draw a mask on the Front layer so that it just covers where the animation ends. Now we’ve got a fully animating Penrose triangle!

Step 7: Pre-Render the Animation

Now you can focus on refining the animation. Add some nice easing to enhance the flow of the whole design. To do this, you’ll need to pre-render the animation. 

  1. Go to Composition > Add to Render Queue
  2. In the queue, click on the output module (Lossless unless you’ve changed the default). Inside the output module settings under Post-Render Action, select Import. Under Channels, select RGB + Alpha, and then hit OK. 
  3. Click on the blue type next to Output To and choose where the file is saved. 

Once you have all that done, hit Render, and relax for a moment. Without pre-rendering the animation, you may end up getting some weird little twitches on some of the corners. Pre-rendering is the best solution to get around this, with the added bonus is that it’s way faster to work with the pre-render.

Step 8: Refine the Animation

  1. When the render is done, it should import right into your project. Drag the MOV file to the New Composition button to create a new composition based on the file. 
  2. Add a solid (Layer > New > Solid) that’s the same color as your edge lines to be your background and drag it below the MOV file. 
  3. Right-click on the MOV and go to Time > Enable Time Remapping. Move the playhead to frame 300. This is the center of the animation. Move the playhead back in time until you get to the frame where the triangle becomes full connected and set a time remap keyframe. 
  4. Now do the same when the triangle becomes disconnected past the midpoint. So now you should have four time remap keyframes
  5. Highlight all of them and apply an Easy Ease. With all the keyframes still highlighted, hold option (ALT), click on the last keyframe, and drag it to frame 200

Doing this Scales the keyframes, so they all move together and proportionally. The animation will be three times faster now. The reason you did it slowly to begin with is to create a lot of frames for the time remapping to sample. This helps create a smoother animation overall.


And that’s it! There are quite a few steps, but that comes with building a physically impossible object — there need to be a few workarounds to create a Penrose triangle in After Effects CC. At the end of the process, you should have a stylish, smoothly animated Penrose triangle for you to use in any of your projects.