This tutorial explains how to rig a closed loop chain like that found on a motorcycle or a bicycle but this can also apply to other things like tank treads. This process includes creating a curve and deforming it to the shape of the chain. Joints are then attached to this curve and skinned to the individual links of the chain. Rotating the curve results in rotation of the chain. So lets begin...
This is the chain geometry I'll be using in this tutorial.
Step 1) Create a nurbsCircle with a high number of spans. The reasons for using high number of spans is so that the nurbs circle can hold its shape while rotating after it has been deformed. Using less number of spans may not result in a smooth deformation. I am using 32 spans here.
Step 2) Select the circle and create a lattice with enough lattice points. Now shape the circle using the lattice to match the shape of the chain. The aim here is to make sure the circle runs through the middle of the chain geometry. The closer you can get the curve to run through the middle of the geometry the better result it would give while rotating.
Step 3) Now create a single joint. Select the joint and then Shift select the circle and attach it through a motion path. In the motion path options set the world up type to object rotation up. Also set the world up vector to the axis that points outwards from your chain. In my case this was the X axis. Setting up the motion path in this way would prevent from joints from flipping over once they have rotated 180°.
The step above creates a node on the input of joint (and the output of the circle) called motionPath1. This node has a channel called U Value. This channel is currently connected the time line, but we need to break this connection. Now if you enter a value in this channel you will notice that the position of the joint on the curve would change. So input a value manually so as to align the joint in the middle of a link geometry. Remember that this channel is 0-1, which means that 1 is the maximum value that can be entered and to place the joints you have to use values between 0 and 1.
Step 4) Do this for all the links in the chain and skin the joints to the respective link geometry.
Now if you rotate the circle, you will notice that it holds its shape due to the lattice and rotates the joints attached on it which in turn moves the geometry.
Showing posts with label How to. Show all posts
Showing posts with label How to. Show all posts
Monday, April 26, 2010
Friday, April 16, 2010
5 More Do's of 3D Rigging
1. KEEP IT SIMPLE - There is little need to create any fancy rigs if all that functionality would not be required.
For example, if you enable your rig to stretch infinitely that might show off your rigging capability, but if the animation doesn't require for such a stretching ability then the rig has no purpose and is rather a waste of time. So keep it simple so your rigs can perform like they should.
2. LESS AUTOMATION - Alright now, automatic rigs are cool! But they also limit the animator from achieving certain poses with the rig. Automation should be limited to only those areas that you know the animator would not like to go in and pose.
3. STACK IT - Make a group for everything. Arrange and order them so that anyone who works with the file in the pipeline can immediately understand what they are looking at. So the controls would have a group for them, the joints would have a separate group, another one for the IK handles and so on. Having a clean hierarchy also mean it easier to go back in later and make some edits if required.
4. CONTROLS - Make sure the size and shape of the controls of your rig are appropriate. They should be neither too small nor too big. The controllers should be easily selectable for the animators and should be distinctive in shape for the animators to understand what they correspond to.
So, for example, the shoulder control and clavicle control are place almost in the same region. But by making controls for both the shoulder and the clavicle distinct from each other in shape and size, makes it easier for the animator to select and use them.
5. LOCK & HIDE - This means to clean up the channel box. You would not want the animators to accidentally move around something that would cause the rig to function improperly. So lock and hide the attributes in the channel box that animator should not be manipulating.
For example, if a controller is to be manipulated by translation only then the rotation channels must be locked and hidden since they would not be of any use. Similarly most controllers or objects in a rig would not require scaling which can also be locked and hidden to make the channel box more clean for the animators to use.
For example, if you enable your rig to stretch infinitely that might show off your rigging capability, but if the animation doesn't require for such a stretching ability then the rig has no purpose and is rather a waste of time. So keep it simple so your rigs can perform like they should.
2. LESS AUTOMATION - Alright now, automatic rigs are cool! But they also limit the animator from achieving certain poses with the rig. Automation should be limited to only those areas that you know the animator would not like to go in and pose.
3. STACK IT - Make a group for everything. Arrange and order them so that anyone who works with the file in the pipeline can immediately understand what they are looking at. So the controls would have a group for them, the joints would have a separate group, another one for the IK handles and so on. Having a clean hierarchy also mean it easier to go back in later and make some edits if required.
4. CONTROLS - Make sure the size and shape of the controls of your rig are appropriate. They should be neither too small nor too big. The controllers should be easily selectable for the animators and should be distinctive in shape for the animators to understand what they correspond to.
So, for example, the shoulder control and clavicle control are place almost in the same region. But by making controls for both the shoulder and the clavicle distinct from each other in shape and size, makes it easier for the animator to select and use them.
5. LOCK & HIDE - This means to clean up the channel box. You would not want the animators to accidentally move around something that would cause the rig to function improperly. So lock and hide the attributes in the channel box that animator should not be manipulating.
For example, if a controller is to be manipulated by translation only then the rotation channels must be locked and hidden since they would not be of any use. Similarly most controllers or objects in a rig would not require scaling which can also be locked and hidden to make the channel box more clean for the animators to use.
Saturday, April 10, 2010
5 Do's in 3D Rigging
1) RESEARCH - Know what the model is required to do. How is it going to move and function and what would be the range of motion it is required to go through. Consult the animators for this.
2) NAMING - Rename EVERYTHING! I mean EVERYTHING! Make sure that every object has a unique name to it so that it becomes easier to find any object quickly.
3) ORIENT - Check the orientation of the joints. Poorly oriented joints can lead to bad deformation results. Take your time to sort the joint orientation out before proceeding further in the rigging process.
4) HIERARCHY - Create a simple hierarchy stack to place all of the objects and nodes.
5) CLEAN UP - Don't leave object just lying around. Clean up the scene. Lock and hide things that are not required to be manipulated.
2) NAMING - Rename EVERYTHING! I mean EVERYTHING! Make sure that every object has a unique name to it so that it becomes easier to find any object quickly.
3) ORIENT - Check the orientation of the joints. Poorly oriented joints can lead to bad deformation results. Take your time to sort the joint orientation out before proceeding further in the rigging process.
4) HIERARCHY - Create a simple hierarchy stack to place all of the objects and nodes.
5) CLEAN UP - Don't leave object just lying around. Clean up the scene. Lock and hide things that are not required to be manipulated.
Thursday, April 8, 2010
How to Rig a Stretchy Spine with Spline IK in Maya - Rigging Tutorial
This is a simple tutorial illustrating how to setup a stretchy spine with the maya Ik spline handle tool.
Step 1) Create a joint chain. I have created a chain of 5 joints, but any number of joints can be used. Now rename the joints and adjust the Local Rotation Axis.
Step 2) Next we have to create the Ik Spline. Select Skeleton>Ik Spline handle Tool options and the Ik spilne options will pop up. Now select Auto Create Curve and Auto Simplify Curve.
Set the Number of Spans to 2.
Alternatively a seperate curve can also be used to drive the Ik Spline, but for this tutorial I have used the settings mentioned above.
Step 3) Create clusters for the curve that was created by the Ik Spline Handle Tool. To do so select the curve, right click and select Control Vertex. Now select the bottom two CVs and create a cluster by going to Create Deformer> Create Cluster. Similarly create clusters of the top two CVs and the single CV in the middle resulting in overall 3 clusters. Create 3 nurbs circles to be used as controls to manipulate these clusters. Rename the nurbs circles and snap them to the position as in the image below.
Step 4) Parent Constraint the controllers to the clusters with Maintain Offset checked. For this first select the controller then shift select the cluster and parent constraint. The Ik spline setup is complete and you will be able to manipulate the chain with the controllers but the only thing missing is the stretch so lets create that next.
Step 5) To create a stretching ability in the chain we must find the length of the chain as in the current/rest position. To do this we will create a curveInfo node on the Ik Spline curve. Select the Ik Spline curve and in the command line type the following
arclen -ch 1
This will create a curveInfo node on the curve with an attribute named Arc Length which gives the length of the curve.
Step 6) Create a Condition node and a MultiplyDivide node in the hypershade found under the General Utilities tab. Rename these utilites.
Step 7) Now to make some connections in the Connection Editor. To open the Connection Editor go to Window> General Editors> Connection Editor. Select the curveInfo node by typing the following in the command line select curveInfo1. Now load the curveInfo on the left side of the Connection Editor. Load the Condition node on the right side of the Connection Editor and connect the ArcLength to the FirstTem.
Similarly, connect the ArcLength to input1x of the MultiplyDivide node.

Step 8) Set the second term of the Condition and input2x of the MultiplyDivide to the current length of the curve. Set the Operation in the Condition to Greater Than. Also connect outputX of the MultiplyDivide to ColorIfTrueR of the Condition.
Set the Operation in the MultiplyDivide to Divide.
Step 9) Finally connect the outColorR of the Condition to the scale X of all the joints except the end joint or the last joint of the chain. Note that scaleX has been used since in my joint orientation the X axis points to the next joint (see image in step1).
The Stretchy Spine with Ik Spline Handle is now complete.
Step 1) Create a joint chain. I have created a chain of 5 joints, but any number of joints can be used. Now rename the joints and adjust the Local Rotation Axis.
Step 2) Next we have to create the Ik Spline. Select Skeleton>Ik Spline handle Tool options and the Ik spilne options will pop up. Now select Auto Create Curve and Auto Simplify Curve.
Set the Number of Spans to 2.
Alternatively a seperate curve can also be used to drive the Ik Spline, but for this tutorial I have used the settings mentioned above.
Step 3) Create clusters for the curve that was created by the Ik Spline Handle Tool. To do so select the curve, right click and select Control Vertex. Now select the bottom two CVs and create a cluster by going to Create Deformer> Create Cluster. Similarly create clusters of the top two CVs and the single CV in the middle resulting in overall 3 clusters. Create 3 nurbs circles to be used as controls to manipulate these clusters. Rename the nurbs circles and snap them to the position as in the image below.
Step 4) Parent Constraint the controllers to the clusters with Maintain Offset checked. For this first select the controller then shift select the cluster and parent constraint. The Ik spline setup is complete and you will be able to manipulate the chain with the controllers but the only thing missing is the stretch so lets create that next.
Step 5) To create a stretching ability in the chain we must find the length of the chain as in the current/rest position. To do this we will create a curveInfo node on the Ik Spline curve. Select the Ik Spline curve and in the command line type the following
arclen -ch 1
This will create a curveInfo node on the curve with an attribute named Arc Length which gives the length of the curve.
Step 6) Create a Condition node and a MultiplyDivide node in the hypershade found under the General Utilities tab. Rename these utilites.
Step 7) Now to make some connections in the Connection Editor. To open the Connection Editor go to Window> General Editors> Connection Editor. Select the curveInfo node by typing the following in the command line select curveInfo1. Now load the curveInfo on the left side of the Connection Editor. Load the Condition node on the right side of the Connection Editor and connect the ArcLength to the FirstTem.
Similarly, connect the ArcLength to input1x of the MultiplyDivide node.
Step 8) Set the second term of the Condition and input2x of the MultiplyDivide to the current length of the curve. Set the Operation in the Condition to Greater Than. Also connect outputX of the MultiplyDivide to ColorIfTrueR of the Condition.
Set the Operation in the MultiplyDivide to Divide.
Step 9) Finally connect the outColorR of the Condition to the scale X of all the joints except the end joint or the last joint of the chain. Note that scaleX has been used since in my joint orientation the X axis points to the next joint (see image in step1).
The Stretchy Spine with Ik Spline Handle is now complete.
Tuesday, March 16, 2010
Orient Control to Joint MEL Script
This is a script for a previously posted tutorial to orient a control to a joint in maya.
How to Use
1) Copy and paste the following script in notepad and save with an extention .mel
2) Open Script Editor in Maya by going to Window> General Editors> Script Editor
3) Source script and a window will appear.
4) select a joint and a controller in no particular order and click Orient Now!!
Download file here OrientControl.mel
Learn how to orient a control to a joint in maya manually
http://tutnuts.blogspot.com/2010/03/orient-control-to-joint-maya-rigging.html
How to Use
1) Copy and paste the following script in notepad and save with an extention .mel
2) Open Script Editor in Maya by going to Window> General Editors> Script Editor
3) Source script and a window will appear.
4) select a joint and a controller in no particular order and click Orient Now!!
Download file here OrientControl.mel
Learn how to orient a control to a joint in maya manually
http://tutnuts.blogspot.com/2010/03/orient-control-to-joint-maya-rigging.html
Tuesday, March 2, 2010
How to Orient a Control to a Joint in Maya - Rigging Tutorial
Step1) Creating the Control - create your control object with its up axis being the same as the twisting axis of the joint it is to be oriented to. So here the twist axis or the axis that points to the next joint in the chain is X so the nurbs circle which is the control object is created with its normal axis as X. Now rename your control object.

Step2) Creating a Group - select the control object and group it by using the command ctrl + g. This will create a group and parent the selected object (in this case the control object) under it. Now rename this group appropriately as well.
Step3) Creating Constraints - select the joint and then shift select the group of the control object. Now Point and Orient Constraint with the same selection with Maintain Offsets unchecked. This will take the group and its children object to the coordinates of the selected joint and give it the same orientation as that of the joint.
Step4) Cleaning up - now in the Outliner find the group and delete the Point and Orient Constraints that were created in the previous step since they were only required to position and rotate the controller correctly.
The controller is now ready to be used.
By using a group node above the controller, the control object does not get any translation or rotation values as these are stored with the group node. The controller's channels are remain clean while still being in the correct position.

Get a MEL script to orient control to a joint in maya
http://tutnuts.blogspot.com/2010/03/orient-control-to-joint-mel-script-maya.html
Step2) Creating a Group - select the control object and group it by using the command ctrl + g. This will create a group and parent the selected object (in this case the control object) under it. Now rename this group appropriately as well.
Step3) Creating Constraints - select the joint and then shift select the group of the control object. Now Point and Orient Constraint with the same selection with Maintain Offsets unchecked. This will take the group and its children object to the coordinates of the selected joint and give it the same orientation as that of the joint.
Step4) Cleaning up - now in the Outliner find the group and delete the Point and Orient Constraints that were created in the previous step since they were only required to position and rotate the controller correctly.
The controller is now ready to be used.
By using a group node above the controller, the control object does not get any translation or rotation values as these are stored with the group node. The controller's channels are remain clean while still being in the correct position.
Get a MEL script to orient control to a joint in maya
http://tutnuts.blogspot.com/2010/03/orient-control-to-joint-mel-script-maya.html
Tuesday, April 21, 2009
How to Setup a Pole Vector for an Ik Handle in Maya - Rigging Tutorial
This tutorial will teach you how to correctly setup a pole vector for an IK handle. So lets begin...
1. Setup a 3 joint chain. This can be a arm or leg of a character.

2. Create an Ik handle RP solver with default settings on the joint chain.


3. Create an object to be used as the pole vector. I am using a nurbs surface in this example.
4. Now we have to make a point constraint. Select the first joint (root joint) of the chain, then shift select the last joint and then the nurbs object. Now with the above still selected create a point constraint. Leave the maintain offset unchecked.

5. Next an orient constraint. Select the middle joint of the chain and then shift select the nurbs object. Now create an orient constraint with default options. Make sure the maintain offset is unchecked.

6. Now delete the two newly created constraint nodes on the object. Use the hypergraph to do so. Find the object in the hypergraph and delete the point and orient constraint node under it.

7. Now freeze the object to reset its translation axis. Move it back towards the middle joint. Rotate the object in position if necessary and freeze the transformations again.
8. Select the object, then shift select the ik handle and create a pole vector constraint.
1. Setup a 3 joint chain. This can be a arm or leg of a character.
2. Create an Ik handle RP solver with default settings on the joint chain.
3. Create an object to be used as the pole vector. I am using a nurbs surface in this example.
4. Now we have to make a point constraint. Select the first joint (root joint) of the chain, then shift select the last joint and then the nurbs object. Now with the above still selected create a point constraint. Leave the maintain offset unchecked.
5. Next an orient constraint. Select the middle joint of the chain and then shift select the nurbs object. Now create an orient constraint with default options. Make sure the maintain offset is unchecked.
6. Now delete the two newly created constraint nodes on the object. Use the hypergraph to do so. Find the object in the hypergraph and delete the point and orient constraint node under it.
7. Now freeze the object to reset its translation axis. Move it back towards the middle joint. Rotate the object in position if necessary and freeze the transformations again.
8. Select the object, then shift select the ik handle and create a pole vector constraint.
Sunday, February 8, 2009
How to Create a Bendy Arm Setup in Maya - Rigging Tutorial
This is a tutorial to create a bendy arm setup in maya to get the arms in a tube like pose. Getting the arms to bend like a tube is usually required from cartoon like characters since it gives a lot of expression to the animation.
Lets start by creating a three joint chain for the arm with the joints placed at the shoulder, elbow and wrist.

Now create a CV curve (degree set to 1) from the shoulder to the elbow. Do this by selecting the CV curve tool and click on the shoulder joint and then on the elbow while holding down the v key for point snap.

Now select the newly created curve and hit Ctrl+A to open its attributes. Now click on Display CV under Component Display to see the number of CV's of the selected curve.

Now we need to rebuild this curve to get more CV's at an equal distance from each other. This is required since we will use these CV's as a guide to create a joint chain between the shoulder and the elbow with joints evenly spaced out. In the Rebuild Curve Options the number of spans is set to 6 and the degree to 1. The resulting curve from this command will have 7 CV's and the reason is that the number of CV's on the rebuilt curve would be the number of spans plus the degree (in this case 6 + 1 = 7).

The setup should look like this.

Now again holding down the v key for point snap create a joint chain with a joint on every CV of the rebuilt curve. After completing the joint chain delete the curve.

Once the chain is complete, select the Spline Ik Tool and create a spline Ik handle on the new joint chain with the following setting. This will create an ik handle on the chain and a new curve on the chain which will be used to manipulate the chain.

Now select the new curve create with the spline ik handle and display its CV's by right clicking on it and selecting Control Vertex. Now select the first two CV's and create a cluster. Do the same for the middle CV and last two CV's so that there are 3 cluster total.

Parent these clusters under the shoulder joint. Now move the pivots of the two outer clusters to the corresponding ends of the joint chain. Do this by selecting the cluster and holding down the d key for pivot mode. Also hold down the v key for point snap and snap to the respective joint.

Now we will make this spline chain stretchy. It is a fairly simple process. Select the spine curve and type "arclen -ch 1" in the command line. This will create a curveInfo node on the selected curve. This node is useful since it has an attribute that returns the length of the curve. Hit Ctrl+A on the selected curve and find the curveInfo tab under which you will find the Arc Length attribute.
Now we need a couple more nodes. Open the hypershade and create a condition node found under the general utilities. Also create a multiply divide node.
Now connect the arcLength of the curveInfo node to the firstTerm of the condition node. Set the secondTerm to the same numerical value as the firstTerm. Set the operation to greaterThan. Also connect the arcLength to input1X of the multiplyDivide node. Set its operation to divide. Also set the input2X to the same numerical value as the input1X. Connect the outputX of the multiplyDivide node to the colorIfTrueR of the condition. Leave the colorIfFalse to 1. Almost there. Now connect the outColorR of the condition to the scaleX of the new joint chain. Connect to all the joints but the last one since its scaling is not required.


For the final step we need to create some aim constraints. We want that when the middle cluster is translated the other two clusters should aim at it to create a better curve in the chain. To do so select the middle curve, then shift select one of the other curve and create an aim constraint with maintainOffset checked ON. Repeat the same with the other cluster.
Now repeat the same setup with the lower half of the arm chain. Here is how the final setup looks like.
Lets start by creating a three joint chain for the arm with the joints placed at the shoulder, elbow and wrist.
Now create a CV curve (degree set to 1) from the shoulder to the elbow. Do this by selecting the CV curve tool and click on the shoulder joint and then on the elbow while holding down the v key for point snap.
Now select the newly created curve and hit Ctrl+A to open its attributes. Now click on Display CV under Component Display to see the number of CV's of the selected curve.
Now we need to rebuild this curve to get more CV's at an equal distance from each other. This is required since we will use these CV's as a guide to create a joint chain between the shoulder and the elbow with joints evenly spaced out. In the Rebuild Curve Options the number of spans is set to 6 and the degree to 1. The resulting curve from this command will have 7 CV's and the reason is that the number of CV's on the rebuilt curve would be the number of spans plus the degree (in this case 6 + 1 = 7).
The setup should look like this.
Now again holding down the v key for point snap create a joint chain with a joint on every CV of the rebuilt curve. After completing the joint chain delete the curve.
Once the chain is complete, select the Spline Ik Tool and create a spline Ik handle on the new joint chain with the following setting. This will create an ik handle on the chain and a new curve on the chain which will be used to manipulate the chain.
Now select the new curve create with the spline ik handle and display its CV's by right clicking on it and selecting Control Vertex. Now select the first two CV's and create a cluster. Do the same for the middle CV and last two CV's so that there are 3 cluster total.
Parent these clusters under the shoulder joint. Now move the pivots of the two outer clusters to the corresponding ends of the joint chain. Do this by selecting the cluster and holding down the d key for pivot mode. Also hold down the v key for point snap and snap to the respective joint.
Now we will make this spline chain stretchy. It is a fairly simple process. Select the spine curve and type "arclen -ch 1" in the command line. This will create a curveInfo node on the selected curve. This node is useful since it has an attribute that returns the length of the curve. Hit Ctrl+A on the selected curve and find the curveInfo tab under which you will find the Arc Length attribute.
Now we need a couple more nodes. Open the hypershade and create a condition node found under the general utilities. Also create a multiply divide node.
Now connect the arcLength of the curveInfo node to the firstTerm of the condition node. Set the secondTerm to the same numerical value as the firstTerm. Set the operation to greaterThan. Also connect the arcLength to input1X of the multiplyDivide node. Set its operation to divide. Also set the input2X to the same numerical value as the input1X. Connect the outputX of the multiplyDivide node to the colorIfTrueR of the condition. Leave the colorIfFalse to 1. Almost there. Now connect the outColorR of the condition to the scaleX of the new joint chain. Connect to all the joints but the last one since its scaling is not required.
For the final step we need to create some aim constraints. We want that when the middle cluster is translated the other two clusters should aim at it to create a better curve in the chain. To do so select the middle curve, then shift select one of the other curve and create an aim constraint with maintainOffset checked ON. Repeat the same with the other cluster.
Now repeat the same setup with the lower half of the arm chain. Here is how the final setup looks like.
Subscribe to:
Posts (Atom)
