The motion graphics tutorials continue! Learn how to animate a 3D card flip in After Effects with this quick tutorial.
The 3D card flip is another popular animation effect that’s surprisingly easy, just like animating along a path. This illustration tactic allows designers to incorporate additional messaging via slides. Furthermore, the 3D card flip might demonstrate how to complete a task. I’ve seen it used to inform online shoppers where to find the CVC code to input billing information for example.
Like the last tutorial, a basic knowledge of animations is useful before advancing to After Effects. For instance, Photoshop’s Timeline is a great introduction. There, I learned about animated GIFs, motion graphics, and video animations. So now I’m familiar with keyframes and tweening at least. If you’re not, visit my Photoshop animated GIF tutorials part 1, 2, and 3.
Prepare the Illustrator Artwork
If you’re like me, you probably built your illustration in Illustrator or some other program. Now, prepare the artwork for an import into After Effects.
First, move objects to their own layers. Each object you want to animate needs its own layer. Objects that move together may reside on the same layer. (However, grouping them is unnecessary for After Effects, so that’s up to your preference.)
Then, label layers appropriately. Since After Effects automatically assigns object names based on the Illustrator name, skipping labeling results in a slew of AE layers unhelpful names like <Path> or <Group>.
Save the document and close it.
Import the Artwork into a New After Effects Composition
Launch After Effects. Then, create a new project either from the Home screen or from File > New > New Project > Create Composition from Footage.
Set Import as: to either Composition or Composition – Retain Layer Sizes. The latter composition option imports the artwork in the same size and scale as the original illustration document. However, feel free to choose “Composition” if the sizes are still to be determined.
Finally, click Open.
The Project panel to the left populates with two items:
- A composition created from the imported document
- A folder containing copies of each of the document’s layers
Besides the actual document of artwork, After Effects also imports copies of the layers. This allows you to launch the original creation program and edit the layer once more. (Note the layer is isolated from the rest of the document. So, major edits might involve re-opening the original artwork, editing, and re-importing the artwork into After Effects.)
Find the composition in the Project panel, then double-click it to load it into the Timeline panel below.
Adjust Video Duration as Necessary
Go to Composition > Composition Settings > Duration: to enter a time. Most importantly, format matters here. After Effects applies a specific format to precisely measure time. A value of “0:00:08:00” translates to 0 hours, 00 minutes, 08 seconds, and 00 milleseconds.
Make the Flip Control
First, stack the layers to be flipped in the order of their appearance. Front goes on top, bottom underneath front. If there’s multiple flips, place card #1 a top, followed by card #2, and so on.
Go to Layer > New > Null Object and layer it above card #1. The null layer is completely clear so it has no impact on the appearance of the animation. However, the null layer allows transformations of multiple layers at once for easier, seamless animating. This null object will act as the flip control for the cards.
Grab the Parent Pick Whip (the swirl icon in the Timeline panel) of one of the card layers and click + drag it to the null object layer. As a result, the card layer links with the null object as a child layer which inherits all transformations from the parent Null Object layer.
Then, repeat the Parent Pick Whip on the remaining card layers.
The Timeline’s “Parent & Link” column of the card layers updates to indicate the Null Object is the parent.
By default, After Effects places the null object in the center of the comp. While its position in the workspace doesn’t matter, the position of its anchor point does. However, if the null object’s anchor point is off to the side, the Y Rotation rotates along the edge instead. Simply press Y for the Pan Behind (Anchor Point) Tool to drag the anchor point back to the center.
Enable 3D on the Flip Control and Card Layers
Check the checkboxes under the 3D Layer (the isometric cube icon) for the flip control/null layer and each card layer to enable 3D transformations.
Set the Durations of the Card Layers
Obviously, not all the cards are visible at the same time. They will each share a portion of the video’s timeline. Furthermore, these portions shouldn’t overlap, or else a card will cover the other.
How to Calculate Card Display Time:
To determine the time duration for each card, divide the video’s duration (in the Composition Settings) by the number of cards.
Then, click + cmd to select all the card layers, and drag the purple bar of each to that number. For instance, a video four seconds long with two card means each card gets two seconds.
Finally, drag the purple bars so card #1’s starts at the beginning, then card #2 starts where card #1’s ends, and so on so that there’s no overlapping purple bars.
However, a seamless animation requires an extra step: a duplicate card #1.
How to Calculate Card Display Time While Seamlessly Looping the Flips:
First, duplicate card #1’s layer. Like the other cards, also assign it to the flip control, and enable 3D on it as well. Now, there’s a total number of cards, where the number of unique cards equals the total minus one.
Like before, determine the time duration for each card, divide the video’s by the total number of cards. Then, card #1’s time will be split between its two cards.
Again, re-arrange the purple bars with no overlap. Card #1 A, card #2, [any more cards…], and card #1 B. Card #1 both starts and finishes the animation for a seamless loop of flipping cards, each with the same allotment of display time.
Here’s a visual illustration of the card timing for a seamless loop of three (3x) card flips:
Indicate How to Flip the Cards via the Flip Control’s Y Rotations
Go to the Flip Control (the null object) and expand to Transform > Y Rotation. Modifying the Y Rotations creates a horizontal, left-right flip. On the other hand, go to X Rotation to animate a vertical, up-down flip.
Understanding Y Rotation:
There are two values in the Rotation transformation settings: “0x” and “0.0°”.
The first value specifies the number of full revolutions. Each integer here represents a full 360°.
Then, the second value specifies the rotation amount. 90° is a quarter-clockwise amount, 180° is a full flip, and 360° is a full rotation. After Effects will automatically “convert” a 360° entry here into a “1x” for one full revolution.
Remember, too, that these layers are 3D, versus 2D.
These values will change depending on when and how a card needs to flip.
Pairing Y Rotation Keyframes:
Indicate when and how to flip the cards by adding keyframes to the Flip Control (the null object)’s Y Rotations.
Each flip requires two keyframes. Basically, a “before” and “after” shot.
These two keyframes center over the start/end edges of the cards’ purple bars.
Determining the Y Rotation Values You Need:
For Cards that Flip Back & Forth:
To animate a 3D card flip in After Effects, alternate between setting the keyframes’ Y Rotation values “0x+0°” and “0x+180°”, starting with “0x+0°” at 0:00f. As a result, the card(s) will flip back and forth.
For Cards that Flip Continuously Forward:
Alternatively, to make the cards flip continuously forward rather than back and forth, continue to add 180° perpetually for as many cards there are. For instance, here are the Y Rotation values for each card number:
- 1x+0.0° (or 360°)
Correct the “Mirrored” Cards via the Cards’ Y Rotations
After the Flip Control keyframes and Y rotations are set, the cards flip but every other card looks mirrored. Text might read backwards.
Instead, fix these cards by expanding the card’s layer > Transform > Y Rotation and enter 180°. Now when the card flips, the card will flip into the correct orientation.
Tutorial End Result
It’s easy to animate a 3D card flip in After Effect using simple a Flip Control (null object layer) and Y Rotations. In this tutorial, I used Y Rotations, a seamless loop, and three unique cards continuously flipping forward.
At last, here’s the end result of the animated graphic from this tutorial:
Finally, here’s my final animated graphic with simply position changes on the people:
Next, try experimenting with up-and-down X Rotations, seamless loops, or adding more cards.
For More References:
Visit this excellent walk-through by Caler Edwards for a video tutorial for this technique on how to animate a 3D card flip in After Effects.