Foot Setup in Maya

Hey there peeps. This is my second tutorial. Yay...anyways lets get to it shall we. This tutorial will focus on creating a foot setup with a foot controller and a footRoll attribute that will be done using set driven key. I must stress the fact that this is not the only way to do it, there are many other ways to do a foot setup, this is just my personal way of doing it. Without further or do, let us begin.

1. Creating the leg and foot

Whenever I create a skeleton I always make sure that the orientation is set to none. That way you won't have any problems with the rotation axes. So with that in mind lets create the leg. You create joints in maya by going to Skeleton > Joint tool, which is found in the animation module.I then went into the Joint tool option box and set the orientation to none. I created the basic leg with three joints for the leg and another three for the foot. I named these joints accordingly, Hip, Knee, Ankle, Heel, Ball and Toe. Below is a pic of what it looks like. If you do want to change the position of your joints, you should do so by selecting the joint you want to move and hitting the Insert key and then changing it's position. That way you won't affect the other joints in the process.

2. Preferred angle and IK Handles

We will now set the preferred angle of rotation for the knee and create all the IK handles for the leg and foot. Firstly lets set the preferred angle for the knee. Select your knee joint and rotate it in the X axis about 30degrees or so (the value is not that important really, as long as it rotates in that direction). Once it has been rotated, right click on the knee joint and select "Set Preferred Angle". Once that is done, just set the Rotate X value (In the channel box) of the knee back to 0, so that the knee goes back to it's original position. Reason we did that is, when we assign the IK handle, we want the IK handle to bend the knee in the right direction. So now that we have set the preferred angle, the knee will now bend in the right direction. Hope that makes sense to you.

Now lets create all those IK Handles. You create an IK handle by going to, Skeleton > IK Handle Tool. Go into the IK Handle option box and make sure that the current solver is set to the IK Rotate Plane Solver (ikRPsolver), and make sure sticky is un ticked. Leave everything else at it's default settings. Cool, once all that has been done, create the IK handle from the Hip Joint to the Ankle Joint (in that order), by simply dragging a selection box around the hip joint and then dragging again around the ankle joint. Now the IK handle has been created. Name the IK Handle "KneeIK". Now if you move that IK handle up, you will see that the knee bends.

Cool, now create another IK Handle from the Ankle joint to the Ball joint (in that order) and name that IK Handle "AnkleIK", and then create another IK Handle from the Ball Joint to the Toe joint (in that order) and name it "ToeIK". So now you should have a total of three IK handles.

Now lets create a pole vector constraint for the knee. Create a locator, Create > Locator, and name it "KneePV" and place it just in front of the knee joint. Once it has been placed, freeze it's transformations by going to, Modify > Freeze Transformations. This just resets everything back to 0, and keeps everything fresh and clean:) Now select the Locator and then shift select the "KneeIK" handle (in that order) and go to, Constrain > Pole Vector. This will create a Pole Vector constraint for the knee. The purpose of this constraint is to keep the knee in place, so when you bend the knee to an extreme position, the pole vector constraint prevents the knee from clipping.

Cool, now the IK handles are done! Now we move on to the grouping part.

3. Grouping the IK handles

Okay, now we will do all the grouping of the IK handles. We group all the IK handles so that we can key the groups instead of keying the actual IK handles. Firstly, switch to a perspective and hypergraph view, that way we can select all our ik handles in the hypergraph. Switch to Persp/Hypergraph by going to Panels > Saved Layouts > Persp/Hypergraph. Once it switches to the view, in your hypergraph, hit the A key. This will frame all the objects in the scene within the hypergraph window.

Lets begin the grouping. In the hypergraph, select the KneeIK, shift select the AnkleIK and shift select the ToeIK and group them (CTRL + G). Name this group "HeelRotate". You can rename objects in the hypergraph by selecting the object and then hold down the CTRL key and double click on the object. Now, move the HeelRotate groups pivot point to the heel joint. This is done by pressing the Insert key and moving the pivot while holding down V on your keyboard (holding down V on the keyboard enables the point snap). Once you have moved the pivot point, press the Insert key again to leave the "edit pivot mode".

2. Group the HeelRotate group again (CTRL + G) and call the new group "FootRotate" and move it's pivot point to the Toe joint..

3. Select the KneeIK handle and shift select the AnkleIK handle and group (CTRL + G) those two together and call that group "BallRotate" and move it's pivot point to the Ball joint.

4. Select the ToeIK handle and group (CTRL + G) it and call this group "ToeRotate" and move it's pivot point to the ball joint.

5. Lastly, select the FootRotate Group and group (CTRL + G) that to itself again and call the new group "FootCTRLGroup" and move it's pivot point to the heel joint

Well, we are finally done with all the grouping. That wasn't too bad now was it? You should now have five groups in total. Lets move on and create the foot controller that will move the foot around and set up our set driven key.

4. Foot Controller

We will now create a basic NURBS circle and use that as our foot controller. Create a NURBS circle (Create > NURBS Primitives > Circle). When creating the circle go into the option box and create it in the Y axis. Now switch to the top view and re-shape the circle by moving and scaling the points to get a rough oval shape that fits around your foot. Name the circle to "FootCTRL" and delete it's history (Edit > Delete by type > History) and then freeze it's transformations (Modify > Freeze Transformations).

We will now connect the FootCTRL to the FootCTRLGroup that we made earlier on. Lets bring up the connection editor. Connection editor is found in Window > General editors > Connection Editor. Once the connection window opens, select the "FootCTRL" circle and load (You load an object into the connection editor by clicking on the reload left or reload right buttons at the top of the connection editor) that into the left colum. The left column should be the output column, if not, then reload it in the right where the Outputs column is. Once you have loaded the FootCTRL in the outputs column, select the FootCTRLGroup and load that into the Inputs column. You should now have the FootCTRL circle in the Outputs column, and the FootCTRLGroup in the Inputs column. (I recommend you do the selecting of the FootCTRLGroup in the hypergraph).

Now we will connect the Translate and Rotate nodes. Select Translate in the Outputs column and then select Translate in the Inputs column. Now they should be connected. Do the same for Rotate. In my case the Outputs column was on the left and the Inputs column on the right. Yours could be the other way around, so just check to see where they are.

Once that is done, you can close the connection editor. Now we just need to move the FootCTRL pivot point. So we select the FootCTRL circle and then hit the Insert key and move the pivot point to the Heel Joint.(Remember to always press the Insert key again when the pivot point is in place, so that you exit pivot mode). Once that is done, move the FootCTRL circle around and see what happens. Cool hey? The circle now becomes the foot controller. You can move it and rotate it.

We will now setup the set driven key for a FootRoll

5. Set Driven Key

This is our final step. We will be setting up a FootRoll using set driven key. Lets clean up our FootCTRL first. We will remove the Scale attribute from the controller because we will not be animating or using it for that matter, so lets hide it and lock it. Select the FootCTRL and in the channel box, select the Scale X, Scale Y and Scale Z attributes. You can do so by clicking on Scale X and dragging all the way through to Scale Z. With those selected, right click in the channel box and go to "Lock and hide selected" Now the scale attributes should be removed (Hidden) from the channel box and if you select the scale tool, it will show up in the viewport as grey. Which means that it is locked.

Now we will add the "FootRoll" attribute. With the FootCTRL selected, go to..Modify > Add Attribute. When the window opens, type in FootRoll in the attribute Name row, and then assign values of -15 and 15 to Minimun and Maximum and a 0 for Default in the Numeric Attribute Properties tab. Leave everything else at default. See pic below for settings.

Once that is done, click OK. Now if you look in your channel box, you will see a FootRoll attribute. If you select it and move and drag to 15 and -15 you will notice that it does nothing. Well, thats because we have to setup the set driven key for that attribute. With that in mind, lets bring up the Set Driven Key window. Animate > Set Driven Key > Set. Don't click on Set, instead, click on the little option box next to it so we can go into the Set Driven Key window.

Cool, now lets set it all up. You should see the FootCTRL at the bottom, if not, that means it's not selected, so just select it if it does not show up. The FootCTRL will be our "Driver" Driver as in, the FootRoll attribute will be "driving" (controlling) all the groups that we made earlier on. So, with that in mind, select FootCTRL and click on "Load Driver" It should now move to the top into the "Driver" window. Now we need to load the appropriate groups into the "Driven" window. So, in the hypershade, select FootRotate and then shift select BallRotate and then click on Load Driven in the Set Driven Key Window. Now the Driven window should have those two groups in there.

Cool. Now we select the FootRoll attribute in the top (Driver window) and then we select both the FootRotate and BallRotate in the bottom (Driven window), you can select both of them by holding down the left mouse button and dragging down. Once both of them are selected, select the rotateX attribute on the right hand side in the Driven window.

Now that we have everything selected, just make sure that the FootRoll attribute is set to 0 in the channel box, if not, set it to 0 and then hit the Key button (found at the bottom of the set driven key window). Now we have set a key for it's default position. After that we select the FootCTRL in the set driven key window and then set the FootRoll attribute to 15 in the channel box. Then we go into the Driven window (bottom window in the Set Driven Key window), and select the BallRotate group. With the group selected, rotate in the X axis to a value of about 40 degrees or so. Then select the FootRotate group (again using the Set Driven Key window for all the selection). Once selected, rotate in the X axis to a value of about 40 degrees or so aswell. These are not the standard values, you can use any value that you want. Once you have adjusted your rotation values to the way you like it, select everything (the groups and their rotateX attributes) in the Set Driven Key window again and hit the Key button. Now you should have a foot roll that is animated from 0 to 15.

Don't worry about the toe lifting at the same time as the heel, we will fix that up in the graph editor a little later on. Now we will set the FootRoll attribute to 0, and in the hypergraph select HeelRotate and shift select ToeRotate, and in the Set Driven Key window click on Load Driven. So, now we have HeelRotate and ToeRotate as the "Driven" this time around.

Make sure that the FootRoll attribute is set to 0, if not then set the value to 0 and then select the HeelRotate and ToeRotate groups and select the rotateX attribute and hit the Key button. We have now set the default value for these groups. Now go to the FootRoll attribute and set the value to -15 and then set the HeelRotate and ToeRotate rotateX values to something like -40 degrees or so, and then select the groups and their rotateX attributes in the Set Driven Key window and hit the Key button again. Now you should have a FootRoll from 0 to -15 now. Pretty cool hey?

Cool! You can now close the Set Driven Key window and play around with your newly created FootRoll attribute. We now have a FootRoll! Yay! We do have one more step and that involves using the graph editor.

6. Modifying Curves

Okay, so this is the final step. We will use the graph editor to modify the animation curves in the FootRoll. Whenever I use the graph editor, I always use the Hypergraph/Perspective/Graph Editor layout. So, to bring up this layout you go to Panels > Saved Layouts > Persp/Graph/Hypergraph. You should now have three views with all the windows mentioned. For this exercise we will use our side view, so I just change my perspective view to my side view.

Okay, so now that we have everything that we need, lets fix a few things up. Firstly, we need to adjust our heel lift. When we walk or run or actually pick our feet up for that matter, the heel lifts first after which the balls lift and finally our toes. It happens really quick that we don't really take notice, but it does happen. So, with that in mind lets adjust that really quick. The graph editor serves as an excellent editor for these type of things. We need to determine when we should delay the toes from lifting. Select the FootCTRL shape and move the FootRoll attribute to say about 7.5 or even 8, lets do it at 8. So at 8 you can see how far up the ball joint is. Select the FootRotate Group as that is the group that we set the key for. Once selected a curve will show up in the graph editor. It actually just looks like a straight line.

Select RotateX in the graph editor and then select the curve. Then click on the Insert Keys Tool in the graph editor. It's the second icon at the top of the graph editor, and make sure that the Time Snap button is pressed down aswell. The Time Snap icon is the 4th icon from the right. Then, with your middle mouse button, click on the curve and hold the button in. A line that has a little square where the curve meets it will show up. While still having your middle mouse button pressed down, drag that line up the curve to frame 8. Frame numbers should displayed at the bottom of the graph editor. Once you have placed it at frame 8 let go of the middle mouse button. You now have a new key at frame 8 with handles on both sides..

Now click on the Move Nearest Picked Key Tool (the first icon on the left), and then make sure that the Value Snap icon is pressed down (the third icon on the right). Then select the key and with your middle mouse button move it straight down to 0. You should now notice that the ball joint has moved down and the value in the channel box has a value of zero. Thats because we have just inserted a key with a value of 0 at frame 8 for the FootRotate group.

When you look at the curve now, you can see that the curve goes through the floor. Which is not what we want, we want the curve to remain above the floor or on top of the floor. When I say floor, I refer to the dark black line (the zero value). So, to fix that up we select the key at frame 0 and frame 8 (shift select or drag a bounding box around the keys). Once both keys are selected click on the Flat Tangents icon. The 4th icon from the left (these icons look blue lines with dots on them and are relatively in the center of the graph editor). Once clicked, you will see that the line now straightens itself out with a smooth transition to frame 15. Now if you move the footRoll from 0 to 15 you will see that up until the value of 8, the ball joint stays behind, which gives the impression of it being delayed. Just what happens in real life.

Okay, Now we will adjust the toe lift. Set the FootRoll value to -8. You will notice that the ball joint has once again lifted before it should have. In this case, when we rotate our heel upwards, our toes lead the way and then the ball follows. Once again this happens really quick in real life and we hardly notice it at all. So, we want to do the same thing and delay the ball joint from lifting at the same time as the toe joint. With all that being said, we select the HeelRotate group in the hypergraph. It might not show up in the graph editor because we are working with negative values now, so, if it is not showing up, just hit the "A" key in the graph editor, and that should center the curve. We are going to do the same thing to this curve as we did to the previous curve. Select the curve and click on the Insert Keys Tool and drag a key to -8..

Now, we select the newly created key and move it straight down to zero with the middle mouse button. Then, select the key at -8 and 0 by shift selecting or dragging a box around them. Once both are selected, click on the Flat Tangents icon. The line should now straighten itself out with a nice smooth transition to frame -15. It is the opposite of what the previous one looks like because of the negative values.

Once that is done, go ahead and play around with your FootRoll. Change the value to -15 and back to zero again. You will see that before -8 the toe now leads the way and the ball stays behind, after -8, the ball begins to lift, which is what we want.
Pretty cool hey!?

Well, that is the end of the tutorial!! This one was a pretty long tut, but I hope that it has helped someone along the way, and that you have learnt a new thing or two with it. If you are having problems following the tutorial or nothing is coming right for you when you do some steps, please do not hesitate to post a message on my forums. I check the forums on a daily basis and will respond fairly quick. I would also appreciate any response to the tut. Was it good or not? Let me know so that I can improve on tuts in the future.:) I have also attached a maya file of the scene so that you can see first hand what is going on. Anyways, thank you for taking the time out to go through the tutorial! Greatly appreciated:) Happy Maya learning :)

© A. de Carvalho (Mills)

Maya Scene File - FootSetup.mb

Enter content...

Fetching comments...

Post a comment