Inspired 3D: Creating and Understanding Skeletons and Kinematics
As stated earlier, translating the joints pivot point adversely alters your local rotation axis, but this is relatively easy to fix with another simple MEL script.
2. Enter the following command into the Script Editor: joint -e -oj xyz -zso;
3. With the joint still selected, execute the command by selecting the text in your Script Editor and pressing Enter. This tells the selected joint to be in edit mode (-e), to affect the joint orientation (-oj), zero the scale orient so that it will also point down the bone in x (-zso), and return the orientation to the original auto joint orient settings (xyz). If you have changed more than one joint in a chain, you can add the (-ch) flag to the end of the command (joint -e -oj xyz -zso -ch;), and the entire chain below the selected joint will be affected.
1. Select one of your joints from the middle of the chain (not the LRA) and press Insert. Now when you translate, youll only affect the joints pivot point. It quickly becomes clear that the LRA is not maintaining a proper orientation.
GETTING A JOINT TO HIT THE MARK
Now that you have had a brief introduction to building and manipulating joints, try this short exercise designed to reinforce what you just learned. In this exercise, you will create a simple system that will allow you to interactively manipulate the joint orient channels on a joint.



2. Create two locators (Create > Locator). Name them orientLOC and goalLOC.
3. Select goalLOC and enter the following translation values in the channel box: X = 2, Y = -1, Z = 3.
4. In the top view, draw a two-joint chain using grid snapping (hold down the X hotkey to temporarily activate grid snapping) by first clicking on the origin and then clicking on a grid intersection down the Z-axis toward goalLOC (see Figure 9).
5. Select joint1 and bring up the Channel Control window by choosing Windows > General Editors > Channel Control.
6. On the right side of the editor, highlight jointOrientX, jointOrientY, and jointOrientZ, and select the < 7. Bring up the Connection Editor by choosing Windows > General Editors > Connection Editor. The Connection Editor window will allow you to establish a one-to-one connection between attributes on different nodes (see Figure 10).
8. With joint1 still selected, click the Reload Right button at the top of the window.
9. Select orientLOC and click the Reload Left button.
10. On the left side of the Connection Editor, select Rotate (the line will highlight), then on the right side, select Joint Orient, which will make the text for both of these lines change to italics. Now orientLOC will be in control of the joint orient attributes for joint1. This will allow you to use the Rotation Manipulator to rotate the joint into position without picking up any rotation values on the joint itself.
11. Our goal, achieved through a combination of rotating the orientLOC locator and translating joint2 on its local X-axis, is to get joint2 to be as close as possible to goalLOC (see Figure 11).
1. Open a new Maya scene.























Post new comment