Control Objects for my "Puppets"

There is som kind of confusion somtime about how to create the control objects for your rig. Even I have failed to talk about it. The way the control object should be designed is that you can type in 0,0,0 in the rotation and translation.

Ex. Your characters Up-Vector is messed up, and you can seem to get back to it's original state. With a good design you should now be able to just typ in 0,0,0 the the Translation.

Create a implicit cube, rotate it and move it up.



If this would have been your default position you would have been forced to write these numbers down, or create a pose clip for each controler. So what we need now is to create the Implicit's Cube world axis where it is (in it's current state).
Right now the world axis for the Cube is the "world". So what we do is to create a null. Then to match all transforms you use (on the right side of the UI) "Transform - Match All Transforms" and then select the cube.
You Null now has the same values as the Cube.



With the Null still selected press down the Parent button and click on the Cube, Right Click to end the function. Now select the Cube. Magic has now happened! The Cube has values 0,0,0 in both translation and rotation.



Next step is to decide if the controller is a rotation controller or a translation controller. In this "case" I've decided it's a rotation controller. Therefor I don't want the animator to be able to translate my rotation object.
Select the Cube if it's not already selected. Press CTRL-K to bring up the kinematic properties. Now right click on the keybutton at the X axis of the Translation. Chose "set expression".



Here is the trick, now you just close the expression dialouge without doing anything. Do the same with Y & Z axis. The kinematic properties should now look like this



And lastly you add a parameter that always switches the transform tool to rotation when you supra select the object. With the Cube selected you go Property - Transform Setup


And there you chose Rotation and Add mode. The just close the window.

Last but not least. You need to make sure thet the null never moves. But first of course you must place the object in it's right position. So copy this script and save it as LockObject.js, thanks to Bradley Gabe for sharing this script.

// Begin Lock Object Script ===============================
list = getValue("selectionList");
for(i=0; i<list.count; i++)
{
oKine = list(i).Kinematics.Local;
 
// Active all position and rotation limit toggles.
oKine.parameters("posxminactive").value = true;
oKine.parameters("posyminactive").value = true;
oKine.parameters("poszminactive").value = true;
oKine.parameters("posxmaxactive").value = true;
oKine.parameters("posymaxactive").value = true;
oKine.parameters("poszmaxactive").value = true;
oKine.parameters("rotxminactive").value = true;
oKine.parameters("rotyminactive").value = true;
oKine.parameters("rotzminactive").value = true;
oKine.parameters("rotxmaxactive").value = true;
oKine.parameters("rotymaxactive").value = true;
oKine.parameters("rotzmaxactive").value = true;
 
// Set all pos limits to their current local values
setValue(oKine + ".posxminlimit", oKine.parameters("posx").value);
setValue(oKine + ".posyminlimit", oKine.parameters("posy").value);
setValue(oKine + ".poszminlimit", oKine.parameters("posz").value);
setValue(oKine + ".posxmaxlimit", oKine.parameters("posx").value);
setValue(oKine + ".posymaxlimit", oKine.parameters("posy").value);
setValue(oKine + ".poszmaxlimit", oKine.parameters("posz").value);
 
// Set all rot limits to their current local values
setValue(oKine + ".rotxminlimit", oKine.parameters("rotx").value);
setValue(oKine + ".rotyminlimit", oKine.parameters("roty").value);
setValue(oKine + ".rotzminlimit", oKine.parameters("rotz").value);
setValue(oKine + ".rotxmaxlimit", oKine.parameters("rotx").value);
setValue(oKine + ".rotymaxlimit", oKine.parameters("roty").value);
setValue(oKine + ".rotzmaxlimit", oKine.parameters("rotz").value);
}
// End Lock Object Script ==================================

Drag 'n drop the file you created to a toolbar, or open it in the script editor. Make sure the null is selected and press the button or in the script editor press "RUN".

Now you have created a object that has:
  1. Default values of 0.0.0
  2. Prefered Transform Tool Selection
  3. Blocked not prefeeed tool
I hope you have learned something new, and that it will enable you to create kickass animations :) You can download my Addon that I made that does everything above, but at least now you know why it does all this. The last part with the script is not in the Addon (since you need to place the object first).



©2003, Stefan Andersson
JS Script©2003, Bradley Gabe, ILM