If you've checked out my Secrets of Particle Playground tutorial on macProVideo, you've seen that Particle Playground is a powerful, if little-known, tool for all kinds of advanced visual effects, especially for text treatments.
However, one major limitation of Particle Playground is that the particles have no 3D capabilities - particles in Particle Playground exist strictly on a 2D plane, and have no Z-depth. When Particle Playground was first added to After Effects, AE was strictly a 2D environment, so that wasn't an issue. But now that AE supports Z-depth, it would be nice to be able to work with fully 3D particles. We can't with Particle Playground by itself, but if we combine it with Card Dance, another little-known AE special effects plugin, we can take Particle Playground into the third dimension and create some cool effects as well.
Card Dance essentially takes a layer, breaks it into a grid of cards or squares, and lets you use gradient maps to control the position, rotation, and scaling of the cards in all three dimensions. (The principle of using one layer to control another layer's behavior is used extensively in After Effects, so if you're unfamiliar with the concept, you'll find working with it in Card Dance particularly useful.)
In this tutorial, we'll combine Particle Playground with Card Dance to create a cool binary code effect that expands and contracts in 3D space. We're going to do this entirely in After Effects, with no need for any external files, so you can follow along easily.
To begin, we'll set up a Particle Playground Grid Text layer with ones and zeros that change randomly based on a moving noise layer. To do this, make a new 720p comp (Composition > New Composition...), 10 seconds long, with a black background, called 3D Number Grid Comp:
Add a new Solid to that comp (Layer > New > Solid...), set it to the size of the comp, and make it black too:
Apply Particle Playground to the solid (Effect > Simulation > Particle Playground). Then set up Particle Playground on the first frame of your Timeline as follows:
Note that Cannon's Particles Per Second and Gravity Force are both set to 0, that Grid is set to cover the entire comp, and the color is an electric green, for a CRT look. Click Options, then click Edit Grid Text, and set it as follows:
Note that the Grid Particles Across and Particle Down values are 40 and 30, respectively. Remember this, as it will be significant later. Finally, enable keyframing for Grid's Font Size, step ahead one frame in the TImeline (Command-Right Arrow), and set Font Size to 0. This will disable any further particle generation, leaving us with just a static grid.
Next we're going to turn the "A"s in the Grid into ones and zeroes and make them change randomly, for a high-tech data matrix effect. First, make a new composition, 10 seconds long at 1280x720 pixels, and call it AutoNoise. Add a black solid to it, make it the full length of the comp, if it isn't already, and apply, in this order, the Noise (Effect > Noise & Grain > Noise), Gaussian Blur (Effect > Blur & Sharpen > Noise), and Posterize Time (Effect > Time > Posterize Time) effects. Set them up exactly as shown here:
The Noise effect will change every pixel on every frame randomly to a black or white value. The Gaussian Blur smooths out the noise to make it grayer and to reduce the amount of change between pixels, and the Posterize TIme effect will slow down the rate of change of the noise. This rate will be responsible for how quickly the numbers change in our data matrix; if you prefer a jitterier rate of change, increase Posterize Time's Frame Rate, or leave out the effect entirely.
Now drag the AutoNoise comp into the 3D Number Grid Comp, and turn off its visibility by clicking on its Hide Video button. Select the other layer, and in the Particle Playground Effect Controls, roll down the Persistent Property mapper and set its values just as shown here:
This will force the Particle Playground characters to alternate between 1 and 0 only, based on the random change in the AutoNoise comp.
Next, make a new 10-second 720p comp, call it Radio Waves Comp, and create a new black Solid. Apply the Radio Waves effect to it (Effect > Generate > Radio Waves) and set it up exactly as shown here:
Move your CTI to 5 seconds, and you should see an image like this (shown reduced 50% here):
This is the gradient image we'll use to displace the 1s and 0s in 3-D space; since we only need one frame, we'll render out the image at the 5-second point to create the static gradient map. Note that almost any image can work as a gradient map; symmetrical, smoothly-banded images tend to work well for this particular project, but I encourage you to experiment with other images as maps.
So, with the CTI at 5 seconds, choose: Composition > Save Frame As > File... This puts the current frame into the Render Queue for rendering; choose: Window > Render Queue to bring the Render Queue forward. At the bottom of the Comp Name list, click on the hot text (which will say something like Radio Waves Comp (0;00;05;00).psd) next to Output To:, change the output name to RadioWave, set your render location, and Save. Back in the Render Queue window, click Render. In the Project Window, control-click in the window and choose: Import > File..., navigate to where you rendered the RadioWave file, and import it.
Next, make a new 10-second 720p comp, call it Card Dance Comp, drag in the RadioWave image, and turn off its visibility. Next, drag in the 3D Number Grid Comp, and apply Card Dance to it. Set the Card Dance values as shown here:
making sure to set RadioWave.psd as the Gradient Layer 1, and the Z Position Source to Intensity 1. Also be sure to, under Z Position, enable keyframing for Multiplier at Frame 0, as shown; and to set Rows & Columns to Independent, and set Rows to 30 and Columns to 40. You'll note that these values match the Particles Across and Down values back in the 3D Number Comp.
Card Dance breaks up the entire layer, from edge to edge, into cards; we want to map our changing number grid onto the cards so that we can move each changing number around in space independently. Obviously, we want each individual number to map onto the center of its own card, and to do that, we first need to make the number grid completely fill the frame, as we did in the 3D Number Grid comp. Now, when we apply Card Dance to the grid, and set Card Dance Rows & Columns to the same values as Particle Playground's Height and Width, each number should map cleanly onto its own card.
In practice, depending on the font size and shape and other variables, you'll sometimes see certain numbers being split because they're mapped onto two or more cards. That's why we set up the 3D Number Grid in a precomp, so we can nudge it in the frame and align it exactly with the Card Dance grid. In my case, I had to nudge the 3D Number Grid down one pixel in its comp to get it to line up exactly. As with Particle Playground itself, any changes you make in a source map for Card Dance need to be precomposed, or Card Dance won't see the changes.
Now, keyframing just the Z Position Multiplier value up and down over time will displace or position the cards in Z-space based on the luminance or brightness of the gradient map. The higher the Multiplier value, the greater the Z- depth displacement.
So, move the CTI ahead to about 4 seconds, and keyframe the Z Position Multiplier up to about 20. Move the CTI to 6 seconds, and set the value down to about -10. Lastly, move the CTI to 10 seconds, and animate the Z Position Multiplier back down to 0. Using negative Multiplier values simply reverses the Z-depth displacement, so every card that was in the foreground will now be in the background, and vice versa.
Next, select all the Z Position Multiplier keyframes by clicking on the Multiplier property name in the Source Name column in the Timeline, control-click on the first keyframe, and choose Keyframe Assistant > Easy Ease from the popup menu:
This will smoothly accelerate and decelerate between keyframe values, and give you a more organic animation.
Our last step is to apply the Glow effect (Effect > Stylize > Glow) to the 3D Number Grid Comp layer to add a little cathode ray luminance to the changing numbers. These are mostly the default settings, with just slight changes to Glow Radius and Intensity:
Render this out, and you should see something like this:
And that's it! I encourage you to experiment with different values and gradient maps and see what happens. And above all, learn and have fun.