Tutorial 195: Forklift

Joe Clay | Oct 3, 2019

Master Properties in After Effects enable us to make more complex rigs than we could previously. And because of that, we're going to talk about techniques to rig objects. We start with a simple cube that has some pretty cool behaviors. It can flatten into the ground, which means it comes with its own transition built-in. It can also be scaled without scaling its strokes.

Then we take a look at a rigged forklift. All of the colors have been linked to control layers so you can change the colors of the forklift if you desire. There's an Angle Control that lets us pick between the 4 isometric angles that the forklift can face, even though only two angles were ever illustrated. This is accomplished by scaling our shape layers horizontally to make up the other two angles. While that would normally change our lighting, we've built and rigged luminosity layers—using grey tones and the overlay blend mode—that can swap the lighting back so that the lighting direction doesn't ever change. The forks of the forklift are also rigged so that the main section moves up, and then the rest of the lift sections extend fully.

In short, there's a lot built into this tutorial, and a lot of the techniques are designed to be applicable to all sorts of rigs. For example, one of the expressions shows you how you can build a checkbox that can switch between two keyframes for a property. We use it to change the lighting of the luminosity layers, but you could use to to switch between keyframes on a path, or intensities of an effect. There's a lot of versatility here.

And the best part is that this is only part one. There will at least be a second tutorial, if not a third. The next one will focus on more efficient ways to build this sort of model if you were going to make a whole bunch of different rigs. We're going to show how to take an actual 3D model, render out a minimal amount of frames and yield even more complex animation, versatility, and speed. And there's also something interesting that I want to try, but haven't had a chance to build yet. So please, stay tuned! And if you didn't see Tutorial 188: Isopush, check it out! It's helpful for moving layers in isometric directions.

Expression Code

Make sure to add all of the controls as necessary! If you absolutely want to limit things like the transition slider we used, you can use linear() or clamp(). If you use it directly on the slider itself, you can force it to not pass 0 or 100, or whatever arbitrary number you'd like. For example, our Forklift goes up 800 pixels. Instead of building it for percentage, you could build it for pixel values so that you can more easily match other layers to the forklift. You can use an expression like clamp(value, 0, 800) on the slider to get a slider that only goes from 0-800. There are a lot of possibilities when it comes to rigging with expression controls! Use the expressions below as starting points to build your own rigs!

Scale an object but maintain the stroke width


Add vertical movement to an object based on percentage

y = thisComp.layer("Controller").effect("Transition")("Slider") * 1.085;
value + [0, y];

Add vertical movement to an object based on percentage after a threshold

y = thisComp.layer("Controller").effect("Lift")("Slider");
y = ease(y, 30, 100, 0, 300);
value - [0, y];

Posterize an Angle Control

a = thisComp.layer("Controller").effect("Angle")("Angle") % 360;
if(a < 0) {
    a += 360;
a /= 360;
Math.floor(a * 4);

Even Checkbox

if(thisComp.layer("Controller").effect("Side")("Slider") % 2) { 0; } else { 1; }

Upper/Lower Checkbox

i = thisComp.layer("Controller").effect("Side")("Slider");
if(i == 0 || i == 3) { 1; } else { 0; }

Control visibility with a checkbox

thisComp.layer("Controller").effect("Upper")("Checkbox") * 100;

Control visibility with a checkbox (inverted)


Alternate between keyframes using a checkbox

check = thisComp.layer("Controller").effect("Even")("Checkbox");

Alternate between keyframes using a checkbox (inverted)

check = Math.abs(1-thisComp.layer("Controller").effect("Even")("Checkbox"));

And that's it for now! And don't forget to check out part two!

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains everything shown in the tutorial. It also includes other elements used in the thumbnail and GIF animation as well as the Illustrator and Affinity Designer files used to construct the shape layers. The After Effects project was built in AE CC 2019 but a version that should open in 2018 is included. You might get a notice that you need a plugin or a font, but they aren't required to use this file. They're mainly used for the thumbnail.

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today