Elegant cursive script text with a pink-to-blue gradient fill and decorative flourishes on a black background, demonstrating an animated gradient text effect in Photoshop
  • How to Animate a Gradient Behind Text in After Effects (Part 2)

  • by Aaron Nace
    July 1, 2020
  • Add to
    favorites

Download Sample Images

Download Assets

This tutorial includes sample images, 1 svg file, 1 ai file and 1 eps file. Downloads are free with a PHLEARN account.

  • Free sample files with every tutorial on PHLEARN
  • New tutorials published every week
  • Unlimited downloads with your free PHLEARN account
Download

description

In part two of our Animating Gradients series, we show you how use After Effects to animate the text and gradients we made in part one. Learn how create a new After Effects Composition, apply a simple rotation effect to add colorful motion to the text, and then export the animation out as both an MP4 and GIF to share with others!

ANIMATING TEXT & GRADIENTS

Collage of three portrait photos demonstrating how to animate text in Photoshop

CREATE SIMPLE ANIMATIONS

Two Keyframes Is a Complete Animation

This is part two of a short series. In part one we built the gradient and text artwork in Photoshop and exported them as PNGs. Now we’ll take those into After Effects, animate them, and export both a looping GIF and an MP4.

If After Effects has always looked intimidating, this is a good first project. The entire animation is two keyframes on a single property — and the result loops seamlessly. You can follow along with the sample PNGs from the download on this page even if you skipped part one.

The After Effects project window with imported PNG assets for an animated gradient

Setting Up the Project

  1. Create a new project

    If your interface looks nothing like the tutorial’s, go to Window › Workspace › All Panels. After Effects has several workspace layouts and it’s easy to be looking at a completely different one.

  2. Import the PNGs

    Drag them straight into the Project panel.

  3. Drag them into the timeline

    After Effects offers to build a composition from them automatically. Accept it — the comp inherits the images’ dimensions, 1080 × 1080 here.

Assets placed into the After Effects timeline, with the text layer above the gradient

Timeline layers stack like Photoshop layers — whatever sits at the top is in front. Drag the text above the gradient so the gradient becomes the background.

Getting Organized Before You Animate

Source and comps folders organising an After Effects project window

Worth two minutes now and it saves real confusion later, especially once a project has several scenes.

Right-click in the Project panel and create two folders: Source for the imported PNGs, Comps for the composition. A useful way to think about the distinction: comps are scenes; source files are the assets those scenes are built from.

Then right-click the comp and choose Composition Settings to confirm the basics — 1080 × 1080, 29.97 fps, and a duration of two seconds for this one. Set duration deliberately; it’s what your keyframes will be spread across.

Keyframes, Briefly

A keyframe records the value of a property at a specific moment. Set one at the start, another at the end, and After Effects calculates every frame in between for you.

That’s the whole idea behind animation in the program. You describe two states; it produces the transition. Everything else is refinement.

Animating the Gradient

The rotation property expanded on a layer in the After Effects timeline

Here’s the trick that makes this look far more complicated than it is: the text never moves. Only the gradient behind it rotates, and because the text sits on top, the result reads as color flowing through the letters.

  1. Select the gradient layer and press R

    That isolates its Rotation property. (Clicking the layer’s twirl-down arrow shows Position, Scale, Rotation and Opacity together, if you’d rather see them all.)

  2. Put the playhead at frame zero

    Drag the blue marker to the very start of the timeline.

  3. Click the stopwatch beside Rotation

    This creates your first keyframe, at 0°. The stopwatch is what turns a static property into an animated one — without clicking it, changing a value just changes it everywhere.

  4. Move the playhead to the end

    Drag it to the last frame.

  5. Set the rotation to 360°

    Type 360 into the second Rotation field. A keyframe is added automatically.

A full 360 degree rotation set as the end keyframe on the gradient layer

Why 360° specifically: a full revolution ends the layer in exactly the position it started. The last frame matches the first, so when the animation repeats there is no visible jump. That’s what makes it a seamless loop, and it’s the reason the number isn’t arbitrary.

Rotation has two fields, not one

The first is the number of complete revolutions, the second is degrees. Scrub past 360° and it flips to 1 x 0.0 — one full turn plus zero degrees.

That first field is your speed control. Type 2 for two revolutions in the same two seconds and the animation doubles in pace, still looping perfectly. Three is usually too frantic; two tends to be the sweet spot. Because the duration is fixed, more revolutions simply means faster.

If the gradient doesn’t cover the text

Press S for Scale and size it up. A rotating square only fully covers a circle inscribed within it, so a gradient sized exactly to the canvas can reveal corners as it turns. Centered text usually needs no scaling at all.

Toggle the text layer’s eyeball off to watch the gradient rotate on its own — a useful way to check the motion before judging the whole thing.

Exporting a GIF and an MP4 Together

Adobe Media Encoder queue set up to export both an H.264 video and an animated GIF

Rendering happens through Adobe Media Encoder, included with your Creative Cloud subscription. The neat part is that one queued item can produce both formats.

  1. Composition › Add to Adobe Media Encoder Queue

    Media Encoder opens with your comp loaded.

  2. Set the format to H.264

    That’s MP4, already configured for streaming. Set the preset to Match Source — size and frame rate were decided in After Effects.

  3. Choose an output folder

    A dedicated Renders folder keeps exports away from your source files.

  4. Right-click the queued item and duplicate it

    This is the step worth knowing. You now have two entries from one render.

  5. Change the duplicate’s format to Animated GIF

    In its settings, drop the quality to around 20% of original. It still looks good and the file size falls dramatically — which matters for a GIF far more than for a video.

  6. Press play

    Both render in one pass, and quickly.

Which format for what

The GIF loops automatically and plays anywhere — email newsletters, websites, messages. Open it in a browser to check how it will actually behave. The MP4 doesn’t loop by itself but is far more efficient, and is what you’d drop into a longer edit as an intro.

Where First Animations Go Wrong

Changing a value without clicking the stopwatch

The most common beginner mistake in After Effects. No stopwatch means no keyframe, so the value changes for the whole layer and nothing animates.

Ending on a value that isn’t a full revolution

350° looks identical while scrubbing and jumps visibly on loop. Full revolutions only.

Animating the text as well

It’s tempting and it makes the result worse. One moving element against one static one reads as deliberate; everything moving reads as noise.

Exporting a full-quality GIF

GIF is an inefficient format. At 100% quality the file is enormous for no visible benefit. Around 20% is the useful range.

Not organizing the project

Two folders, thirty seconds. On a project with several comps, the difference is substantial.

If this was useful, these go further in the same direction:

More Free Animation and Compositing Tutorials

Start Smaller Than You Think

After Effects has a reputation for being hard, and most of that comes from tutorials that open with expression scripting and 3D cameras. The foundation is genuinely this simple: pick a property, set a keyframe at the start, set another at the end.

Everything more advanced is the same idea with more properties. Make this loop, change the revolution count, then try the same two keyframes on Scale or Opacity instead — that’s most of what animation is.

Master Photoshop, Lightroom and Photography

Join PHLEARN PRO for $12.99 a month or $99.99 a year. Cancel anytime, with a 100% money-back guarantee.

As featured in

  • 500px
  • Adobe
  • Fstoppers
  • HuffPost
  • Inc.
  • PetaPixel