TUTORIAL: Using shadingNodes for Rigging

It`s actually funny, but we can really use Nodes, that are actually made for shading, for rigging our character. And it`s - in most cases - a LOT better than using expressions or driven keys.

Here the order, of how quick nodes calculate (from quickest to slowest):
1. shadingNodes
2. driven Keys
3. expressions

Of course, this is not true in every case. For more details you can let Maya tell you with dgtimer, how quick each nodes calculates. Just execute:
currentTime `playbackOptions -q -min` ;
dgtimer -on -reset;
play -wait;
dgtimer -outputFile "/digitimerresults/dgtrace_once.txt" -query;
dgtimer -off;

and open the file: "dgtimerresults" in the folder "dgtimerresults" (which this script created).
In the MEL Command Reference you can find some more info, about how to use dgtimer.



Also, if it is sometimes harder to build, in 95 % we can use shadingNodes.
And for this, in my autoRig (bittnerRig) there is no driven Key and of course no expression.

The best way to work with shadingNodes is the Hypershader. On the left you can find all the nodes. The problem is just, there are so many nodes, that are not interesting for us riggers, but for shader).
Because of this I wrote together all important nodes.
- multiplyDivideNode
- sumDifAverage
- clamp
- setRange
- condition




For connecting the nodes, there are many different ways:

- The easiest way is, to do it in the Connection Editor (Windows - General Editors - Connection Editor ... reload left- and right-list, and mark the parameters, that you want to connect)


- A quicker way is in the Hyper Shader (not the Hyper Graph !!), if you click and hold on the right arrow of the first node (picture below). A markingList appears. Click the parameter, that you want to connect. Click and hold the left arrow of the second node and in the markingList click on the parameter, that you want to connect it to.



- If you have some experience with scripting, you should make a script, as it can make it a lot quicker (expecially, if you have many Nodes)

connectAttr -force
multiplyDivideNode.outputX joint1.scaleX


This connects the Output of a multiplyDivideNode to the scaleX-Parameter of joint1.

The advantage with a script is, that you can do it for many joints in only one step. For example:

string $joints[] = `ls -et joint -dag`;
for ($i = 0;$i<size($joints);$i++)
connectAttr -force
multiplyDivideNode.outputX ($joints[$i] + ".scaleX")


This script connects OutputX of a multiplyDivideNode to the scaleX-Parameter of each Joint in the hierarchy of a selected object.