Friday, 13 May 2011

Rigging Fundamentals

Step by Step notes on creating the legs:


The Easy Stuff
Open up Maya and start a new project
Import the legs (legs.obj for object as opposed to mtl for material)
Select Mesh and create a new layer from selected. (Using layers is helpful to keep work flow tidy)
Save! Never hurts to save.
To Create the Skelaton
Go into side view to make it easier to place the skelaton
Select Skelaton - Joint Tool (always safer to reset settings)
Place the Joints where you want them, in this this case, start with the hip, then the knee, then the ball of the foot and then finally the toe. Try to make sure you place the joints correctly first time as it can make things complicated if you need to move them later.
Holding Ctrl + D will add the next joint in a straight line.
Name Joints (Best to name EVERYTHING! this keeps things neat and easier to find later on)
Open outliner (either by going to Window - Outline) or selecting the persp/outline icon on the side bar) to name joints etc.
Add these joints to a separate layer from the mesh.
Organising the Joints
Now we have to make sure the orientations of the joints are facing the correct way
Holding FN + F8 and clicking the "?" will show the orientations of the joints.
To change these select your joints and then select Skelaton - Orient Tool and bring up options (reset tools)
For this we need to change the +y to a -y so that they are facing the right way. Also untick "orient child joints" if ticked.
If one of the joints has not changed, then simply highlight this one joint and change it. In this case the knee orients were still facing the wrong way so I selected this and redid the latest step.
Mirroring
Now we have one leg done, we need to recreate these same joints for the other leg. We could simply follow the previous steps, but an easier way is to use the Mirror Tool.
Select your joints, select skelaton - mirror joints options. Depending on which way you want your joints to be mirrored, select which orients you want. For this we select the YZ option and apply.
If you have named your joints correctly (eg. Knee_Left) you can change the name of the new joints appropriatly by typing in what maya should look for and what it should be replaced with. For example, if you had named the all the joints and ended them with _Left (e.g. Knee_Left) you could type in "Search for: _Left" and "Replace with: _Right" and it will change the names of the joints on the mirrored joints (e.g. Knee_Right) This can save a lot of time and effort of renaming items and keeps your work neat and easy to follow.
Now we have the opposite leg done as well, we can add this to a separate layer. We can also change the colours of these layers make it easier to follow, e.g. red for the left leg and blue for the right.
The Hard Part
Now we have to organize how our joints relate to each other and how they move by creating Handles.
First select the IKhandle tool, double click for options and select an IKRPsolver as opposed to IKSPsolver
(RP stands for Rotate Plane and SC stands for Single Chain. The difference between these is SC Handle's end effector tries to reach the position and orientation of its IK handle where as RP Handle's end effector only tries to reach the position of its IK handle)
First select the Hip and the the Ankle
Create NURBS primatives - select circle
Hold V and drag the NURB over the ankle.
1. Freeze Tranformation (under Modify window) so that this will always be its "home" (everything set to 0)
2. Select the NURB first and then the IKhandle
3. Then go to constrain, point constrain.
Now when you move this NURB the leg shoul move around the hip.
We need the knee to move and rotate, so we repeat this process.
Create - NURBs primatives - circle
(to rotate vertically change the x value to 90 degrees)
Hold V and drag circle over the knee, then pull out infront but away from the knee joint.
Select the NURB and then the Ankle Handle
Constrain, but this time we will select Pole Vector.
Now when you move this circle/handle, the knee will turn along with it.
Then you simply need to repeat these steps for the opposite leg.
Create a spine
Preferably in the front view, create a new joint in between the hips and just above to creat the bottom of the spine. Select the spine joint, and then the hip and press "P" to parent these two joints. (repeat for opposite leg)
Weight Painting
Now we need to bind the mesh to the joints, so that this moves when the joints move.
Select the Mesh and the the Joints
Go to Skin- Bind Skin - Smooth Bind
Skinning Method - Dual Quaternion
When the leg moves, the skin is affected in different ways. In this case, the back of the knee thins out when bent, so we can use weight painting to change how the skin is effected.
Select the mesh and then the Paint Brush Tool
Paint operation - tick "Add"
select which joint you wish to paint on, e.g. Knee_Left and then paint the areas you want to not be effected.

I found most of this easy to follow, and any problems I had were easily rectified and taught me more about the programme and riggings. For example, I was having problems with my handles because I was selecting the Ankle Handle and then the NURB which meant the ankle affected the NURB rather than the NURB affecting the Handle (Hierachy)

We were then asked to create a reverse foot lock so that the foot could roll and look more realistic when moved. For this we used a free online tutoial from rigging101.com. Following the steps was fairly easy, but could be fiddly and sometimes hard to work out which joint or handle you needed to parent together. However, when creating the Reverse foot lock for the second foot, I ran into difficulty, but we soon found out that the problem was because I has been trying to move an already positioned and attached NURB. Deciding it was best to simply recreate the joints and reverse foot lock again made things easier and didnt take too long to do. This time however, I moved the reverse foot lock so that is was inline with the orginal skelaton joints so that the toes rolled rather than pointed into the ground, which they did previously when I had positioned the reverse foot look below the foot.

 

No comments:

Post a Comment