Maya, Mental Ray, Photoshop.
Monday, April 26, 2010
Chevrolet Camaro Z28 1968 - Digital Artwork
Labels:
Artwork,
Maya,
Mental Ray,
Rendering
How to Rig a Chain in Maya - Rigging Tutorial
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.
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.
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
Subscribe to:
Posts (Atom)