All Articles After Effects
After Effects: Text That Blows Away Like Sand
Richard Lainhart on Mon, January 23rd 0 comments
You've probably seen the film title effect, where the text of the title blows away like sand or dust. e.g. "Traffic" (the 2000 version) & "The Mummy" films. Here's how to do it in After Effects!

In this article, I'll show you how to use After Effects to recreate that effect by dissolving the macProVideo logo away like windblown sand. Let's get started.

Step 1 - Locate a Sand Image

For this effect, we'll need to use an external image of a close-up shot of desert or beach sand. There are many such images available online for free; what you should look for is a reasonably high-resolution, straight-on shot of just sand, without water or other distractions. Here's the one I'll be using, called BeachSand:

Beach sand scene

You might even already have something appropriate on your computer as a wallpaper image. In any case, we'll be using this image as both a texture for our text and as a source to control how the sand particles blow away.

Step 2 - Set Up the Project

In After Effects, import your sand image into a new project and set up a new composition of 6 seconds or so. I'm going to call mine SandText. Drag your sand image into the new composition and scale it to fit the comp if necessary by typing Command-Option-F (the Scale To Fit command).

Step 3 - Add Your Text

Now grab the Text tool, choose a bold sans-serif font, set its font size to a high value so you get large text on the screen, and type in your text over the sand image . I'm using a version of the mPV logo and font, but make yours whatever you like, of course:

MPV Logo

The color of this text doesn't matter, as you'll see in a moment.

Step 4 - Mask the Sand Layer with the Text

Next we'll use the alpha channel of the text layer to mask the sand layer. In the Layer pane of the Timeline, click the Toggle Switches/Modes button at the bottom of the pane to show the TrkMat (Track Matte) column, and click on the pop-up menu that currently says None next to your Sand layer. Set it to Alpha Matte "(your text layer name)":

Mask sand layer with text

(Note that for this to work, your text layer must be immediately above the sand layer in the Layers pane.) When you choose your text layer as the sand layer's Alpha Matte, After Effects will turn off the visibility of the text layer and use its alpha channel to mask the sand pixels, so your text will appear to be filled with sand:

Text filled with sand

Step 5 - Add Layers To New Comp

Create another new comp, the same length and size as your SandText comp, making sure it has a black background, and call it BlownSandText. Drag the SandText comp into the new comp, then drag your original Sand image into the new comp as well, scaling it to fit if necessary.

Step 6 - Pre-compose the Scaled Sand Image

If you didn't have to scale your Sand image to make it fit the new comp, you can skip this step. If you did though, you should now pre-compose it before moving on. We're going to be using it as a gradient control layer soon, and gradient layers need to be pre-composed before use so that whatever you've done to them to set them up gets passed through to whatever effect is using the layer as a gradient control (This will make more sense very shortly).

Select the scaled image and choose Layer > Pre-compose.... In the Pre-compose dialog, call the pre-comp ScaledSand, choose the "Move all attributes into the new composition" option, and click OK. Finally, turn off the visibility for the pre-comped ScaledSand layer, as we don't need to see it.

Step 7 - Apply Shatter to the SandText Layer

Next, select the SandText comp layer and choose Effect > Simulation > Shatter. Shatter is a physics-based plugin designed to blow layers up in 3D space (check out my  HUB tutorials "Exploding Words: How to Shatter a Title in After Effects" and "Creating Realistic Explosions in After Effects" for other Shatter applications), which is sort of how we're going to be using it here. However, instead of exploding our text, we'll be gently turning it into particles and having them drift away, just by adjusting a few settings. We'll do that next.

Step 8 - Configure Shatter, Part 1

To start, set the View pop-up in Shatter to Rendered, so we'll see the final results, and preview your layer with Shatter's default settings. You'll see something like this:

That's cool—you'll notice that the chunks have the sand pixels mapped onto them—but not at all what we're looking for. To make blowing sand, we need much smaller particles, we need a much slower explosion, we want the sand to drift from right to left, and we don't want the "explosion" to happen all at once. We'll get a much more realistic result if we can gradually blow the particles away from the image, so that it appears to erode, rather than having them all fly off at once. Let's take care of those first few issues now, and deal with the erosion question afterwards.

To begin, here are the settings for the first two groups of Shatter parameters, and what they mean:

Shatter settings

For Pattern, I'm using Octagons & Squares, although you should try some of the other shapes to see how they look—the final particles will be quite small, so you won't necessarily see much of those shapes' details anyway. Octagons & Squares look good to me. 

Next, Repetitions is set as high as it will go, to 200. This will drastically shrink the size of the exploded chunks, so they'll look much more like sand particles than blocks of wood. After that, Extrusion Depth is set to zero, which will give us flat particles instead of blocks. The reason for this is that with such a high Repetitions setting, we're going to be generating a lot of particles, which are actually tiny 3D objects consisting of polygons. All those polygons require a lot of memory, potentially more than you may have available. With an Extrusion Depth of zero, the particles will consist of only one or two polygons instead of six or more, and so we'll reduce our memory requirements significantly, as well as speeding up our render times.

Under Force 1, Position is set to the right of the SandText image itself, so the force of the explosion, which will simulate the wind that blows the sand particles away, will be blowing from right to left. The Radius of the explosion force needs to be large enough to cover the entire SandText image (just the active pixels, not the entire frame), or a piece of the text might be left behind. 0.70 works for me but depending on the size of your text, you may need to increase or decrease this value. Finally, Strength is set down to 0.50, so the explosion is much less vigorous that the default value. This will give us a slower "wind" and more of a drifting feel to the sand particles. 

Step 9 - Configure Shatter, Part 2

Now, if you preview your project so far, you'll see that the sand particles just fall off the bottom of the screen before they have a chance to drift off. To fix that, we need to adjust our Gravity, which is under the Physics category. Here are those settings:

Gravity settings

The Physics parameters set how the particles will behave in 3D space once they've been blown up. The important parameters here are Randomness, which is set up to 1.0, so we get more variety in the particles as they move; Gravity, which is set down to 2.0, so there's less gravity force, and most significantly, Gravity Direction, which is set to -90°. A Gravity Direction of -90° will pull the particles off to the left, rather than straight down, which is just what we want. If you preview your project so far, you'll see something like this (note that this preview will take much longer than previous previews, because of all the particles involved):

OK, we're getting closer, but it still looks like the text is all blowing up at once, instead of drifting off as individual sands grains. So, our next step is to control which particles get blown away when. This is where the original sand image that's been sitting and turned off in the comp all this time comes in.

Step 10 - Configure Shatter, Part 3

In the Shatter Effect Controls, roll down the Gradient property twirly arrow, and set the Gradient Layer to your ScaledSand pre-comp (or to the original image layer if you didn't have to scale it.) Next, make sure your CTI is set to the beginning of your comp, click the Enable Keyframe stopwatch for the Shatter Threshold property, and set the value to 30% or so. Move your CTI to about the 3 second point, and set the Shatter Threshold value to 100%. Believe it or not, these are the only keyframes we'll be setting for this entire animation. Here are the initial settings:

Shatter settings, part 3

OK, what did we just do? Enabling a Gradient Layer in Shatter tells Shatter to use the grayscale values in the gradient layer image to determine which particles will be blown away, based on the Shatter Threshold setting, rather than blowing them away all at once. With a Shatter Threshold of 50%, for example, pixels in the gradient layer with a luminance value of 50% or greater will cause the corresponding particles in the Shatter layer to be blown away. 

Animating this value upwards forces progressively darker and darker pixels to be blown away.  Since the luminance values in the sand image are essentially random, the order of particles being blown away is correspondingly random. So, using the sand image as the Gradient Layer results in a much more natural, organic sand blow pattern:

And here are the results:

You'll see that we have a pretty realistic effect of the text blowing away in the wind. Also notice that the speed of the "explosion" is now controlled more by the rate of the Shatter Threshold animation rather than the direct explosion physics settings, although they all interact, of course.

To make this even a little more realistic, try duplicating the Shatter layer, placing it beneath the original layer, and applying a little Gaussian Blur to the particles. Be sure to change the Randomness settings in the blurred layer's Physics settings, or else your duplicated particles will line up exactly with the original particles. This second, slightly blurred layer will add more density to the blown sand, along with a little more depth and "dustiness" to the overall effect (at the expense of more render time):

And there you go. As always, I encourage you to experiment with this concept to see what you can come up with on your own, and above all, have fun.

Related Videos
Comments (0)

You must be logged in to comment.

Motion Tracking and Stabilization
After Effects CS5 201
Dream It. Do It.
Do you want to learn Motion Tracking and Stabilization?
Yes, I want to learn!
No Thanks, I just want to read the article.
Course Advisor
Don't Know Where To Start?
Ask A Course Advisor
Ask Us!
Copy the link below and paste it into an email, forum, or Facebook to share this with your friends.
Make money when you share our links
Become a Affiliate!
The current affiliate rate is: 50%
Classes Start Next Week!
Live 8-week Online Certification Classes for: