I’ve made this little tutorial because Andrea Giovannini asked me if I could do it, so… If you like it, give thanks to Andrea :)
Before start, I want to say I leart the way of this rig looking inside a scene of Jason Schleifer who did a ballon dog for a cgtalk animation.
I’m sure that there’s so many ways to rig a ball and sure that these ways are best than this one, but this is how I did my ball rig.
Wrote this. Let’s go:
- 1.- Create a nurbs sphere and set translateY to “1”. Rename it to “ball”, delete history and do Freeze Transformations.
- 2.- Create a hierarquia of two joints with snap to grids like in “Image 1”, so the “joint1” has its translate on “0,0,0” and the translateY of “joint2” is “2”.

- 3.- Parent “ball” to “joint1”.
- 4.- Create a nurbs circle and scale in XYZ to “0.5”. Rename it to “SQSTdown_CTRL”. Duplicate it and set its translateY to “2”. Rename it to “SQSTup_CTRL”. Delete their history and do Freeze Transformation.

Ok, We’ve the basic controls. Now let’s do the hierarquia.
- 5.- Parent “SQSTdown_CTRL” and “SQSTup_CTRL” to “ball_CTRL” and parent “joint1” to “SQSTdown_CTRL”.

Now, we’re going to make the Squash and Stretch.
- 6.- Create an ikHandle from “joint1” to “joint2”
- 7.- Create a distanceDimension with “Create/Measure Tools/Distance Tool” from “joint1” to “joint2” with snap to grids or points. The Distance Tool will create two locators and a distanceDimension1 node.

- 8.- Parent “ikHandle1” and “the upper locator” (maybe “locator2”) to “SQSTup_CTRL”.
- 9.- Parent “the lower locator” (maybe “locator1”) to “SQSTdown_CTRL”.

You can try to move the controls and see that all work but without Squash and Stretch.
Now we’re going to create the differents connections to do it works.
Now with these three nodes, we’re going to create the connections:
- 12.- Connect “distanceDimmensionShape1.distance” to “multiplyDivide1.input1X” and to “multiplyDivide1.input2Y” from “Hypershade” or “Connection Editor” window or writting this line into “Script Editor” window:
connectAttr -force distanceDimensionShape1.distance multiplyDivide1.input1X;
connectAttr -force distanceDimensionShape1.distance multiplyDivide1.input2Y;
Set the “Operation” attribute of “multiplyDivide1” node to “Divide”. Set the attribute “input2X” to “2” and “input1Y” to “2” of the same node:
setAttr multiplyDivide1.operation 2;
setAttr multiplyDivide1.input2X 2;
setAttr multiplyDivide1.input1Y 2;
With this part we’ve created a division, so “outputX” will give us a number and “outputY” will give us the “outputX” invert. We’ve set the “input2X” and “input2Y” values to “2” in order that the division give us “1” in the default pose which it’s the default scale.
Connect “multiplyDivide1.outputX” to “ball.scaleY” and connect “multiplyDivide1.outputY” to “ball.scaleX” and “ball.scaleZ”:
connectAttr -force multiplyDivide1.outputX ball.scaleY;
connectAttr -force multiplyDivide1.outputY ball.scaleX;
connectAttr -force multiplyDivide1.outputY ball.scaleZ;

Now when “scaleY” is “2”, “scaleX” and “scaleZ” is “0.5”, its invert ( 1/scaleY, in our example 2/scaleY*2 because our distance in its default value is “2”)
We want that the “ball” scales from the floor, so translate its pivot to “joint1” (its floor) with snap to points or grids.
And that’s the basic setup.
Now, we can group “distanceDimension1” and “ball_CTRL” in a new group called “ball_group”. We can use this new group to scale the ball if we want. The problem is that if you scale “ball_group” we also “scale” the distance. So we need to add a new “multiplyDivide” node so when we scale “ball_group” this node multiplies the “Divide” value of “multiplyDivide1”.
- 13.- Select “ball” and “ball_group”,open “Hypershade” window and click on “Input Connections” node. Create a new “multiplyDivide” node.
- 14.- Connect “ball_group.scaleX” to “multiplyDivide2.input1X”. Set “multiplyDivide2.input2X” to “2” which is the default value of the distance:
connectAttr -force ball_group.scaleX multiplyDivide2.input1X;
setAttr multiplyDivide2.input2X 2;
- 15.- Connect “multiplyDivide2.outputX” to “multiplyDivide1.input2X” and “multiplyDivide2.outputX” to “multiplyDivide1.input1Y”. So we connect the scale value to the inverse of “multiplyDivide1”:
connectAttr -force multiplyDivide2.outputX multiplyDivide1.input2X;
connectAttr -force multiplyDivide2.outputX multiplyDivide1.input1Y;

Now we can scale “ball_group” and all will work ( ignore the joint scale ;) )
Also you can add another control which move a cluster for the central part of the ball like I did in my ballRig.
Hope it’s useful and easy to understand.