|
Tutorial
Maya Tutorials -- Rigging for Animation Page 4 of 7 Expressions Are Evil: Expressions can significantly slow down a rig in Maya. Imagine you are running, and you actually have to plan where you are going to place your foot every time you take a step. This is what Maya is doing for your expressions. It evaluates them every frame. This can cause errors and problems for animators when they’re scrubbing and can slow down render times. Now imagine you have 50 characters in a scene, each having three expressions. You now have 150 expressions that have to evaluate every frame![an error occurred while processing this directive]There is a solution: utility nodes. A utility node is a node within Maya that can have incoming and outcoming connections that can be directly plugged into attributes between objects. If you’re not familiar with utility nodes, using Maya help (F1 on your keyboard while in Maya), you can find out about them in the “nodes and attributes” section of the documentation. Think of them as empty groups, except that you can’t see them in the outliner (use the hyperGraph), and they are used to perform math functions.
Say you wanted “objectA.translateX” to equal the current time plus five additional units. You could easily use a utility node to do this. Let’s write it out to make it easier to see: ObjectA.translateX = the current time + 5 I know that we want to add two things together, so I am going to use an “addDoubleLinear” node. To create this, I am going to type into the script editor: //createNode is a MEL command that is used to create nodes, the –n is a flag that is used //to define the name of the node created. createNode transform -n "objectA"; createNode addDoubleLinear -n "addMe"; //setAttr is a MEL command used to set an attribute of an object setAttr addMe.input1 5; //connectAttr is a MEL command used to connect one object's attributes //to another, the first being the outgoing attribute with the second //being the destination. connectAttr time1.outTime addMe.input2; connectAttr addMe.output objectA.translateX; MEL scripting?! You didn’t say anything about MEL scripting! Well, no, I didn’t. That’s because you don’t necessarily need to know how to script to use utility nodes. You simply need to understand the concept that there’s no button for a utility node, and so you have to manually type it in. It’s not hard, really. The most common functions you will need are add, subtract, multiply and divide. Maya has several utility nodes that will do just that. It might seem like “addDoubleLinear” is a funny name for something as simple as adding one object to another, but you have to understand how it works. Prev 1 2 3 4 5 6 7 Next [an error occurred while processing this directive] ![]() |