Making an Animated GIF: Intro to After Effects

Free After Effects Tutorial

Master the art of animation with this After Effects tutorial, providing an in-depth step-by-step guide on creating a short animation and converting it to an animated GIF using Photoshop.

This exercise is excerpted from past After Effects training materials and is compatible with After Effects updates through 2020. To learn current skills in After Effects, check out our After Effects classes and video editing classes in NYC and live online.

Topics covered in this After Effects tutorial:

The Project, Composition, & Timeline panels, Animating with Keyframes, Previewing in Real-Time, Trimming vs. Shifting Layers

Exercise Preview

preview class names

After Effects Bootcamp: Live & Hands-on, In NYC or Online, Learn From Experts, Free Retake, Small Class Sizes,  1-on-1 Bonus Training. Named a Top Bootcamp by Forbes, Fortune, & Time Out. Noble Desktop. Learn More.

Exercise Overview

In this series of three exercises, you’ll create a short animation in After Effects and convert it to an animated GIF using Photoshop. Along the way we’ll introduce the basic skills for Adobe After Effects, such as the functions of all the main panels within this application, and important fundamental concepts of how to animate in After Effects. In some cases there are other ways to do things (which are often more advanced), but we chose to keep it simple for beginners!

Previewing the Final GIF

  1. Download the class files. Refer to the Downloading the Class Files page at the beginning of the workbook on how to download and install the class files. (Skip this step if you’re taking this course at Noble Desktop.)

  2. On the Desktop (not in After Effects), navigate to Class Files > After Effects Class > Classes in a Day GIF > Final GIF.

  3. Ctrl–click (Mac) or Right–click (Windows) on classes-in-a-day.gif, go to Open With and select a web browser (Google Chrome, Firefox, Safari, Microsoft Edge, etc.).

  4. In the web browser window that opens, notice the following (the GIF will loop after a while, so there’s no need to reload it):

    • A list of Noble classes drops down from the top, one word at a time.
    • After viewers have time to read the list, it moves over to the left, to join the icons that are associated with each class’s app or topic.
    • As the icons slide in from left to right, a large blue IN A DAY panel slides in from right to left.
  5. Watch the GIF as many times as you need—we’ll be reproducing it in the next few exercises. Keep it open so you can refer back to it as needed.

Setting Up the Workspace

  1. Launch Adobe After Effects.

  2. Go to Window > Workspace > Standard.

  3. To make sure we’re all looking at the same interface, go to Window > Workspace > Reset “Standard” to Saved Layout.

  4. In the upper right-hand corner of the screen you should see an Info panel. If you don’t see this panel, maximize After Effects so it takes up the entire screen:

    Mac: At the top left, click the green button (the third one).
    Windows: At to the top right, click the Maximize button (the middle one).

Getting Started

You can create designs in After Effects, but people commonly create the layout in Photoshop or Illustrator and then use After Effects to animate it. We created a design in Photoshop. Before we import it, we must ensure After Effects will create compositions that are the correct length. After Effects defaults to the length of a previous composition, so we’ll create a dummy composition with the correct length.

  1. Go to Composition > New Composition. Alternately, you can click the big New Composition button near the middle of the screen.
  2. We don’t care about most of these settings. You only need to set the following:

    Resolution: Full
    Frame Rate: Click the arrow output module templates arrow and from the menu, choose 30
    Duration: 30:00 This assumes After Effects is showing you Timecode (which looks like 0:00:30:00). If you’re seeing frame numbers instead (a number with no colons, such as 00900), then enter 900.
  3. Click OK.
  4. At the top left of the screen, locate the Project panel. Click on the dummy Comp 1.
  5. Press the Delete key to remove it.
  6. Now we can import our design (a Photoshop file). Choose File > Import > File.
  7. Navigate to Desktop > Class Files > After Effects Class > Classes in a Day GIF > Assets and double–click on PSD Layout.psd to choose it.
  8. In the dialog that appears, set these options (we’ll explain them in a later exercise):

    Import Kind: Composition – Retain Layer Sizes
    Layer Options: Merge Layer Styles into Footage
  9. Click OK.

The Project, Composition, & Timeline Panels

  1. The Project panel at the top left displays all the assets in your project. Look there and you should see a PSD Layout composition and a PSD Layout Layers folder.
  2. Double–click the PSD Layout composition to open it in the Composition viewing panel in the top middle of the screen.

    This is the main viewing panel where you can preview the changes you make to a composition as you work. A composition (or comp for short) is a container that stores one or more assets. Putting video files, still images, etc. into a comp allows us to do work such as edit and add effects.

  3. Below the Project panel, locate the Timeline (the long horizontal panel located at the bottom of the screen). Notice that the composition also got loaded into the Timeline. Because we imported a layered PSD, multiple layers are visible here!

    This panel shows all of the layers in the composition you’re working in. It also allows you to add animation to these layers at specific times, and otherwise modify them in various ways we’ll cover throughout the class.

  4. At the top left of the Timeline, the current time display will be showing either Timecode (0:00:00:00) or Frames (00000).

    We want it to display Frames (00000), so if it’s displaying Timecode (0:00:00:00), hold Cmd (Mac) or Ctrl (Windows) and click on it to toggle it to Frames (00000).

    NOTE: At the bottom left of the Composition viewing panel below the video preview, there is also a smaller display of the Frame numbers preview time menu 0 frames.

  5. Go to Composition > Composition Settings.
  6. Most of the settings will already be correct, but make sure you set the following:

    Resolution: Full (so our layers appear as sharp as possible on-screen)
    Duration: 500

    Why 500? After creating the animation in After Effects, we’ll take it into Photoshop to export the final animated GIF. Photoshop cannot export animated GIFs longer than 500 frames, so we’re using 500 frames as the maximum length. 500 frames at 30 fps (frames per second) will give us over 16 seconds, which is plenty of time. We will trim off the extra time when we’re done creating the animation.

  7. Click OK.
  8. Let’s save this After Effects project. Choose File > Save and:

    • Navigate to Desktop > Class Files > After Effects Class > Classes in a Day GIF.
    • Save the project as yourname-classes-in-a-day.aep.

How Photoshop Artboards & Groups Import into After Effects

When creating this Photoshop file, we unchecked the Artboards option in Photoshop’s File > New dialog. If we had used an artboard, it would appear as a nested composition in After Effects. That’s not a problem, but avoiding artboards keeps the file cleaner for importing in After Effects. Also, if we were creating the animated GIF solely in Photoshop, we couldn’t use multiple artboards, because Photoshop’s Save for Web doesn’t support them.

Photoshop layer groups are also imported as nested compositions, which can be helpful when animating multiple layers at once!

Animating with Keyframes

We’ll start by animating the list of class names, so that each class name falls in from the top and then the entire list slides left.

  1. In the Timeline, find the Class Names layer.
  2. If Class Names does not have square brackets around its name, look directly above the layer names and click on the Source Name column heading to switch it to Layer Name instead.

    Now the name should be displayed as [Class Names].

  3. In the Timeline, double–click on [Class Names] to open that composition.
  4. At the top of the Timeline notice there is a blue playhead current time indicator (called the Current Time Indicator).

    We want the class names to animate in over the course of a half-second, and end up where they currently are placed. So we’ll set the keyframes at frame 15.

  5. Drag the playhead to frame 15. (Watch the current time display at the top left of the Timeline to make sure it says 00015.)

    playhead

  6. Click once on the SEO layer name to select the layer.

    NOTE: If you double–click it, a Layer panel will open on top of the Composition panel. If you accidentally opened it, close it now by clicking the small x next to the Layer panel’s tab.

  7. Hold Shift and click on the UX Design layer so all the layers are selected.
  8. In the Timeline, to the left of SEO, click the arrow right arrow menu to expand all the layers.
  9. Under SEO, click the arrow right arrow menu next to Transform to expand the Transform under the SEO layer.
  10. Any property that can be animated in After Effects has a little stopwatch stopwatch directly to its left. Click the stopwatch stopwatch next to Position.
  11. On the right-hand side of the Timeline at frame 15 under the SEO layer and to the right of the Position property, notice the keyframe keyframe middle. A keyframe indicates the beginning/end of a transition of the property it’s adjacent to (Position in this case).

    Using the Stopwatch

    Turning on the gray stopwatch next to a property allows that property to animate. Click it only once. After that, simply changing the value of the property automatically creates a new keyframe. Beware, clicking the stopwatch again (when it is blue) will make all the keyframes for that property disappear!

  12. All you need to do to make a transition is create keyframes at key moments in an animation sequence, and After Effects will create in between values for you. Because we want our move to last exactly 15 frames, go to the right side of the Timeline and drag the blue playhead to frame 0.

  13. To the right of the Position property, find the two comma-separated numerical values:

    • The first one is the x-coordinate (distance from the left).
    • The second is the y-coordinate (distance from the top).

    NOTE: After Effects uses the top-left corner as the origin point for all coordinates including those for the Position property.

  14. Hold down the Shift key and press the Up Arrow key on your keyboard. Watch how the second value (the y-axis position) changes over time.

  15. Keep pressing Shift–Up Arrow (or Up Arrow without Shift to go in smaller amounts), until the SEO layer’s Y position value is around –238.

    NOTE: By changing the value of a property that already had keyframes, After Effects automatically added a new keyframe at the current playhead position.

  16. On the Timeline’s right side, notice a new keyframe keyframe end was automatically added at frame 0. A transition takes place between two keyframes of the same property.

  17. If you see dots keyframe dot instead of diamond-shaped keyframes keyframe middle next to any of your layers, there’s a quick way to display keyframes instead:

    • Do an Edit > Select All.
    • Press the letter U on your keyboard.

    NOTE: This keystroke shows any kind of keyframe (in our case it’s Position, but it works for others as well). To help you remember the U key, think of it as a u niversal keystroke that shows all types of keyframes!

Why the Two Keyframes Look Different

You may have noticed that the first keyframe on each layer, now looks like keyframe start. Keyframes in After Effects look different depending on their place in a sequence, and the first one shows that it’s the start of a transition. Selected keyframes are blue, and the currently selected one keyframe end highlighted means that it’s the end of the transition.

Previewing in Real-Time

Let’s preview our video in real-time using the Preview panel!

  1. To the right of the video, locate the Preview panel that allows you to preview in real-time. (It should be below the Info panel and above the Effects & Presets panel).

  2. Make the Preview panel taller, by dragging down its bottom border until you see all its options.

  3. Make sure the following options are set:

    • Set Shortcut to Spacebar.
    • Next to Include, make sure both the Video preview panel eye icon and Audio preview panel audio icon icons are blue (which means they’ll both be included in the preview). Even though this video has no audio track, we’ll add audio in a later project.
    • Uncheck Cache Before Playback.
    • Set Range to Work Area.
    • Set Play From to Start Of Range.
    • Set Skip to 0 so it doesn’t skip any frames on playback.
    • Set Resolution to Auto so it previews using the resolution you set when creating the composition.
  4. At the top of the Preview panel, click the Play button play icon. The text should slide down into position.

  5. When done, click the Stop button stop icon (where the Play button used to be).

    The Play/Stop Button

    The button is technically called Play/Stop, and its icon can look like a Play button play icon (when first loading the video) or a Stop button stop icon (when it’s playing in real-time). If it takes time for After Effects to store each frame into RAM (which is likely not the case with this simple animation), it can also look like play icon with extra lines.

  6. In the Timeline, click the arrow right arrow menu to the left of the SEO layer to collapse all the selected layers.
  7. Click in a blank area of the Timeline to deselect the layers.

Animating In the Class Names

  1. Currently all the class names slide in at the same time, but we want them to slide in one after the other. We can do this by offsetting each individual class name animation by a few frames. Move the playhead back to frame 0.
  2. On the keyboard, press Cmd–Right Arrow (Mac) or Ctrl–Right Arrow (Windows) to go forward by 1 frame. Neat!

    TIP: Instead of holding Cmd (Mac) or Ctrl (Windows) and using the Left Arrow and Right Arrow keys to move the playhead, you could use Page Up and Page Down if you prefer.

  3. Press Cmd–Left Arrow (Mac) or Ctrl–Left Arrow (Windows) to go back by 1 frame, so you are back at frame 0. We’ve just uncovered a trick of the trade to fine-tune the playhead’s location in the Timeline!

  4. Press Cmd–Right Arrow (Mac) or Ctrl–Right Arrow (Windows) 3 times to move the playhead forward 3 frames. The Current Time Display should show 00003.

  5. The bottom layer (UX Design) is the bottom class in the list. We want that to come in first, so we’ll keep that starting at frame 0. Moving up the list, select the Adobe XD layer.
  6. Press the [ key (left square bracket) to snap the layer to the current playhead position.
  7. Again, press Cmd–Right Arrow (Mac) or Ctrl–Right Arrow (Windows) 3 times to move the playhead forward 3 frames. The Current Time Display should show 00006.
  8. Select the HTML Email layer.
  9. Press the [ key (left square bracket) to snap the layer to the playhead.
  10. Repeat this process for the remaining layers (so your Timeline ends up as shown below). Here’s a quick review of the steps:

    • Press Cmd–Right Arrow (Mac) or Ctrl–Right Arrow (Windows) 3 times to move the playhead.
    • Select the next layer (moving up the list).
    • Press the [ key.

    offset classes

  11. Move the playhead to frame 0.
  12. As a quicker way to preview the animation, press the Spacebar. That looks much more interesting!
  13. Press the Spacebar again to stop the playback.

Trimming vs. Shifting Layers

  1. Do a File > Save.
  2. Press Cmd–A (Mac) or Ctrl–A (Windows) to select all your layers.
  3. Press the U key to show the keyframes keyframe middle for the selected layers.

  4. Click in a blank area of the Timeline to deselect the layers.

    Notice how all of the keyframes are shifted over with the start of their layer? That’s because we used the [ key to offset their timing in the previous section.

  5. You can also do this manually by dragging the layer bar. To do this, go to the Tools panel and choose the Selection tool selection tool.
  6. Hover inside any layer bar. Your cursor should look like a black arrow cursor arrow. Drag the layer bar either to the left or right. Notice that again the keyframes are shifted with the layer.
  7. Undo (Cmd–Z (Mac) or Ctrl–Z (Windows)) when done.
  8. You can also trim the start or end of a layer, which shortens or lengthens the layer’s duration, leaving the keyframes in place. Move the playhead to 40 frames.
  9. Click on the HTML Email layer to select it.
  10. Press Opt–[ (Mac) or Alt–[ (Windows) to trim the layer.
  11. Press Spacebar to play it back and see the result.
  12. Let’s see how we can do this manually. Hover over the left end of the layer until you see a resize icon resize bar and drag it to the right.
  13. When you’re done experimenting with trimming and shifting layers in time, go to File > Revert.
  14. In the dialog that pops up, choose Yes to revert back to the last saved version.
  15. Leave this project open. We’ll continue working on it in the next exercise.

How to Learn After Effects

Master After Effects with hands-on training. After Effects is the industry-standard application for motion graphics, animation, and visual effects.

Yelp Facebook LinkedIn YouTube Twitter Instagram