STEP 1: Create a reference path
We need a 3D path. This is fairly difficult in After Effects. You can’t
directly create a 3D path with the pen tool that you can use for
motion. The way around this is to animate an object and use that path
for other layers. So, we need to move something in 3D and that
something is a Null object. Create a Null Object (Layer>New>Null)
and make it 3D by clicking on the 3D checkbox.
We are essentially creating a reference path. All the layers that are
going to be moving along the path will refer to this via expressions.
This way, whenever we want to make a change to the path, we only need
to move the Null object. Adjusting the path on 100 layers sort of
defeats the purpose. Null objects are not rendered. Other than creating
a path for us, the Null object won’t have any purpose.
STEP 2: Move the Null
Move the Null object around in 3D space over the course of the
timeline. Set a Position keyframe at Time 00:00, go to Time 02:00 and
move the Null, go to Time 04:00 and move the Null somewhere else, and
so on. You can then look at the Top, Left, Front, etc. camera views and
make adjustments to your motion path.
Make a path that fills you with joy and go to Step 3. Here’s an example of our happy path with 5 keyframes over 10 seconds.
STEP 3: Apply Expression Controls
Make a new Solid (Layer>New>Solid) and name it Expression
Controls. Make it invisible by turning off its visibility. We’re going
to apply some Expression Controls to this layer and use those to
control our replicating, dancing 3D layers. We don’t need to see the
layer, we’re just using it to hold the controls, so that’s why we’re
turning off the visibility.
Actually for the sake of this tutorial, we’re only going to use four
Angle/Rotation controls to make adjustments to the X, Y and Z rotation
of our layers and to move the layers along the path. In the
downloadable project (this entire project file is available at
www.digitalanarchy.com/studiomonthly/synchronicity.htm)
you’ll find controls for Position, Anchor Point, Scaling and Hue &
Saturation.
STEP 4: Apply Expression Angle Controls
Apply four Expression Angle Controls to the Expression Control layer
(Effects>Expressions> Angle Control). Name one X Rotation, name
the second one Y Rotation, name the third one Z Rotation and the last
one Time.
STEP 5: Make the Flower layer 3D
Select the Flower layer and make it 3D. (If you’re not using our
downloadable project, you can just create a new solid or use your own
image. The Flower layer isn’t important, you can use any layer.)
STEP 6: Activate Expressions (time to code – but don’t worry!)
Alt + click (Option + click on Mac) on the stop watch next to the
Position parameter for the Flower layer. This will activate expressions
for that parameter. So here’s where you need to type in a little code.
AAAHH!!! It’s code! OK, but it’s the only difficult thing you’ll have
to type.
Pickwhip the Position parameter of the Null object. This should give
you something like this (note: if you’re using AE 5.5 or 6.0, you’ll
have to type this in.): thisComp.layer("Null
1").position
Now, type in this additional code: thisComp.layer("Null 1").position.valueAtTime(index*
While the text cursor is still after the *, pickwhip to the Time Expression Control, like so:
Now, type in the final bit: /29.97)
This will give you the following expression (if you’re not using the
downloadable project it may look slightly different due to layer names
being different):
thisComp.layer("Null
1").position.valueAtTime(index*thisComp.layer("Expression
Controls").effect("Path Move")("Angle")/29.97)
Let me explain what’s going on.
The Null object is moving in 3D space over time. The
position.valueAtTime function lets us see the value of its position at
any point in time. At Time 01:00 the null object is at one point; at
time 02:00 it’s somewhere else. position.valueAtTime (1.0) and
position.valueAtTime (2.0) will give us those different locations.
What we want to do is give each of our replicated layers the value of
the Null object at a different point in time, so that each subsequent
layer will be a little further along the motion path than the last one.
This will create an echo effect, but each echo will be another layer.
We’re using the Index variable to slightly offset the
position.valueAtTime function, and give each echoed layer a point
slightly further along the 3D path. For example, Layer 1 will get the
position of the Null object at time 00:00. Layer 2 will get the
position of the Null object at time 00:01. Layer 10 will get the
position at time 00:10. Breaking the rest of the equation down you’ll
see it’s only got three parts: 1) Index is simply
the number of layer in the timeline. 2) This is multiplied by:
thisComp.layer("Expression Controls").effect("Path
Move")("Angle")
, which is just pointing to the Time angle
control. 3) The result is then divided by: 29.97,
which is the frame rate of the comp.
The Time Expression Control is important, because as you change it (or
animate it), it moves all the layers forward and backward along the
path. More on this later. For now, just type in the expression exactly
as you see it.
STEP 7: Create a new camera
You also need a 3D camera. Go to Layers>New>Camera and create a
new camera. You can use the 35mm preset. Set these values for the
camera’s position and point of interest:
STEP 8: Hook up Rotation Controls
Now you just need to hook up the Rotation Controls and you’re finished.
Use the Time Expression Control to control where the layers are along
the 3D path. Use the Rotation Controls to create some interesting
animations as the layers move along the path.
Select the Flower layer (or whatever layer you want to replicate) and
hit "R." This will cause all the rotation parameters for that layer to
appear in the timeline. Turn on expressions for the X, Y and Z Rotation
parameters.
For the X Rotation, type in: Index *. Then pickwhip to the X Rotation Expression Control, like so.
Now repeat that step for the Y and Z Rotation parameters, but use the Y
and Z Expression Controls. In the end it should look something like
this:
STEP 9: Make lots of layers
Select the Flower layer and duplicate it nine times (to create 10
layers). Select those 10 layers and duplicate them six times to give
you a total of 60 layers – plenty of layers to work with. You can
always use more if you want.
STEP 10: Create cool stuff
We made it! Now you get to do some cool animations. Set your Time
Marker to 00:00 and set a keyframe for the Time Expression Control with
a value of 0.0. Move the Time Marker to 05:00 and set time to 50.
Notice how the layers extend out over the 3D path.
Now make some minor adjustments to the Rotation Controls and see what
happens. You can also try animating those, or try animating the camera
around the layers as they animate. You may need to adjust the Camera’s
Point of Interest.
Open up the downloadable project and you’ll find a pre-made Comp that
has all sorts of things you can animate and fiddle with. Expressions
are a very powerful way of creating animations. I encourage you to
experiment with these files and come up with all kinds of variations.
To download the project file and media used in this tutorial, go to
www.digitalanarchy.com/studiomonthly/synchronicity.htm

YOUR GUIDE
Jim Tierney
President
Digital Anarchy
Jim Tierney has worked on numerous award-winning products from
companies like MetaCreations, Atomic Power and Cycore. After working on
Adobe After Effects plug-ins for almost a decade, he thought it was
finally time to get out there and do some of his own. As "Chief
Executive Anarchist," Jim conceptualizes and designs Digital Anarchy
products and heads up business development.
Jim Says Keep In Mind…
The goal of this tutorial is to get multiple 3D layers in After Effects to move, rotate and otherwise dance along a 3D path.
It’s very easy to do this for one layer. It’s not even really hard to
do it for 10 layers. However, it’s very difficult and tedious to do it
for 100 layers, especially if you think you might need to make changes
to all those 100 layers. It quickly loses any of its fun.
Using a 3D Null object and some simple expressions, however, makes
these tasks easy and lets us to create some really amazing graphics in
the process.
Note: Just to make Expressions more difficult, Adobe
made some changes in the code the pickwhip generates between versions
6.0 and 6.5. If you’re using AE 5.5 or AE 6.0, I point out in the steps
where you need to manually make changes to the code.
Digital Anarchy
www.digitalanarchy.com
218 Cordova Avenue
San Francisco, CA 94112
ph. 415.586.8434
jim@digitalanarchy.com