Auto rigging plans

I have decided to create a kind of modular auto-rigging tool suite to speed up my rigging process. There is no shortage of existing auto-rig scripts, but this is for good reason as they are one of the most useful tools a technical artist or character rigger can have under their belt. It seems to be a rite of passage for a rigger to write their own auto-rigging script, so here goes mine.

The general idea is to have building each “task” or “system” of the rig assigned to a single user action, so to create an IK spline with twist controls and a globally scalable stretchIK system should be possible with one button (or at most one button and some settings options for orientation of the spline, and toggles for stretchiness and volume preservation for example.)

These modules could be built into python functions or classes that could then be used to automate larger chunks of a rig, such as whole body parts. The goal is to make an auto-rigging system that is both fast and customisable, while still being simple for the user.

Today I have laid the groundwork for this system in Python and used it to set up IK splines with twist controls, bound to control joints to manipulate the spline. This is something that takes a good 10-20 minutes to set up normally, longer if you haven’t done one in a while, so having a tool to do it at the click of a button is a massive timesaver, even without a larger toolset that is built around it.

I haven’t yet got it correctly setting the twist vectors, it just goes for a default, assuming x as the forward axis (along the bone), with negative y as the up axis (pointing behind the character). The user has to manually configure the twist control values, but everything is connected up properly so that isn’t so bad. You also don’t need to touch those settings if you already use positive z as your “bend forward” direction and x as your forward axis along the bones. Squash and stretch are also applied assuming that x is the forward axis.

The squash and stretch are globally scalable so rigs made using it should not deform if scaled up or down. It includes volume preservation as well using width=1/sqrt(length).

Currently, the process requires an armature or “result skeleton” to be fed into it, with joint orients already set.

Here is an example of it in action:


TIP: Use the PyMel undoChunk class to group your entire process into one undo, so the whole thing can be reverted with one press of undo rather than one for every action your script takes.

with pm.UndoChunk():
    Your code here

Leave a Reply

Your email address will not be published. Required fields are marked *