Rigging a Scorpion Mech: Part Three, Tail, Spine and Adding Some Control

Without legs or claws, the mech looks kinda like a snake!

Here we are, part three, and progress is looking good. For this post, I’ll describe some of the processes I’m using to set up the spine and tail’s behavior. Read on!

For both the spine and tail, I used spline IK with the added ability to stretch. For those that don’t know, it’s possible to scale the joints in relation to the length of the spine curve used for the IK. Retrieving the length of the curve is made simple using Maya’s CurveInfo node. This little snippet of Python makes it all possible to get the length node:

maya.cmds.arclen( curve, constructionHistory=True )

Note that there's two Multiply Divide nodes in order to translate the joints along their length as opposed to scaling.

With this node, it’s possible to scale the joints using a multiplyDivide node to normalize the new length versus the default. For example if the default length of the spine is 40 and the current pose stretches the curve to a length of 50, we would stretch, or scale, the joints to 1.25 to match the new length. In the case of the scorpion, I want to avoid scaling joints in order to keep the setup robust, so instead, I lengthen the joints through translation. The trade-off of using translation to lengthen joints opposed to scaling is that extreme stretches wont look as good. In the case of this rig, the stretchy behavior only exists to offer the animator some flexibility to achieve poses and make the controls more predictable, so the stretch shouldn’t be noticeable at all since it merely exists as a cheat. The other issue is that it complicates the multiplyDivide nodes slightly, since I now have to multiply our scale against the bone’s default translate. Going back to the previous example, if our new scale is 1.25 and the default position of the joint is 15 units ahead of its parent in the x-axis, we multiply 1.25 against the position to get our new translation 18.75 on the x-axis. The tail uses a similar setup to the spine, but also has an IK/FK switch for added versatility. The switch is achieved using a 3-bone setup;  it’s a very standard approach and there’s plenty of tutorials that go at-length to describe the same process with eloquence. Including this one.

Deformation-wise, the inner cord that makes up the spine is smooth-bound to the skeleton. Constraints are computationally faster than skinning since the transformation is happening on an object level; with this in mind, the solid segments of armor along the spine and tail are constrained to the nearest joint. I didn’t do this with the Head in the previous chapter due to a brain-fart, so I will have to go back and change it sometime soon (yay!).



  1. Pingback: sasStretchySpline « sergiosykes(dot)worpress(dot)com

  2. Hi Sergio,
    i was reading your blog and i decided to follow your scorpion’s rig.
    Rigging the spine, i don’t understand the part where you speak about stretching the length through translation ??
    Thank you very much in advantage !!

    • Hi,

      Since the spine rig is spline IK, I use clusters to lengthen and deform the spline curve. These clusters are constrained to my control system. When the controls are translated past the length of the joint chain, the curve stretches. The multiplyDivide nodes I created in the Hypershade compute the new curve length and adjust’s the joints translateX, which increases the length of the joint chain accordingly.

      Hope that helps!

      • thank you for answering, quite everthing is clear but the only things that i don’t understand are the connections in the hypershade. you connected the curveInfo at the multiply/divide ??? then you connected the multiply/divide to an other same node and finally connected to translate of the joints ? this is the part that i didn’t understand so much. Sorry for my poor english and my poor knoledge of rigging .

      • The first multiplyDivide is for normalizing the length of the curve. Once I have that normalize value I feed this into a second multiplyNode, this node evaluates how much the joints should translate. The resulting output is connected to the joints translation. Hope that explains it better. Sorry for the late reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s