Walker script prototype.

This is a quick run-though of a script I am developing that automates the process of creating a walking character with multiple legs.

The script is a bit tricky to use at the moment, and has some flaws, so stay posted for updates. But tricky as it is, it saves a heap of time animating things like beetles. Many legs, much keyframe!First your scene needs to be set up so that the leg controls are children of the body layer. I use an IK rig, set up with Duduf’s wonderful DuIK scripts. The controls I am animating are the leg goals and I am animating the position property to create the walk cycle.


Start by moving all the leg goals to their furthest-back point—the point at which they leave the ground to start moving forward.

Then move forward in time and set the keyframe for the furthest forward pose (i.e. the ‘contact’ pose). All the legs need to move the same distance.

2016-11-07-12_52_17 Select the legs on one side, and go to a frame between the first and last keyframes to create the passing pose, where the leg swings out (optional, and you can set as many KFs as you need).

Repeat for the other side.

2016-11-07-12_52_37 Move the body forward the same amount as the legs do. I use a calculator to work out the exact amount. It’s important that this is accurate.
2016-11-07-13_21_23-adobe-after-effects-cc-2017-c__users_sdixon_creative-cloud-files_work_children The keyframes for the legs are currently all at the same time. Now you can sequence them, with overlap if necessary. for the weevil I used the pattern LB, RF, LM, RB, LF, RM with a few frames overlap.The second body KF should align to the last leg KF.

Now you can move the body wherever you want it to go, setting keyframes along the way. The body can be set to auto-orient along the path, or you can manually keyframe the rotation. One of the cool things about the script is that it can deal with the character walking sideways, but unfortunately it’s not very good with walking backwards.

It’s important that the first two Keyframes stay where they are and that the spatial interpolation between them is linear. If you don’t want this bit of the walk you can delete the keyframes after the script has run. The script doesn’t rely on expressions, so all the animation is keyframed. You might want to use the smoother on it to delete some of the keyframes, because it makes one per leg per frame.

Now select the leg KFs and run the script. To run it you go to File>Scripts>Run script file… and choose the unzipped script file. Talking about which, you can download it here: walker_multileg-pos-only.zip

The script is very slow. If your scene is long it can take several minutes, or even lotsa minutes, during which After effects will be unresponsive and look like it has crashed. It might be worth testing it on a shortened version of the timeline, say 10s, to see how it works. Although you can undo afterwards, it’s worth remembering that the script destroys all the leg KFs, so you might want to make a copy of the comp before you run it, just so you can redo it later.

Instructions for if you want to install the script so that it’s available in the File>Scripts> menu:

On a PC it goes in the After Effects folder in the Support Files\Scripts subfolder. That’s usually:

C:\Program Files\Adobe AfterEffects <version>\Support files\scripts\ScriptUI Panels\

On a Mac it’s in the After Effects Folder in the Scripts subfolder:

/Applications/Adobe AfterEffects <version>/scripts/ScriptUI Panels/

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.