Showing posts with label Rigging. Show all posts
Showing posts with label Rigging. Show all posts

Wednesday, October 5, 2011

Reverse Foot Lock

Original Link

http://cg.tutsplus.com/tutorials/autodesk-maya/3d_cg_vfx_maya_autodesk_rigging_animation_ik_reverse_footlock/

Ranjit Singh Rana on May 23rd 2011

Tutorial Details
  • Software: Autodesk Maya 2011
  • Difficulty: Intermediate/Advanced
  • Length: 61 Steps
  • Project Files: None
Final Product What You'll Be Creating

 

In this tutorial, new Cgtuts+ author Ranjit Singh Rana will be covering the process of setting up a “Reverse foot lock” rig in Maya. First Ranjit will show us how to create it using a ‘chain of joints’ and then again using ‘groups’. Finally Ranjit will show us how to setup an “IK/FK switch” for an arm. We’ll also take a look at adding ‘Set Driven Keys’ for both the Reverse foot lock and IK/FK switch.

Step 1

To start, first create a joint setup as mentioned in the image below, and rename the joints accordingly. So Hip to ‘Hip_jnt’, Knee to ‘Knee_jnt’, Ankle to ‘Ankle_jnt’, Ball to ‘Ball _jnt’ and Toe to ‘Toe_jnt’.

Step 1 Image


Step 2

Now go to the Skeleton menu and click on ‘IK Handle Tool’ options, and then from the ‘IK Handle Settings’ select IKRPsolver and create a IK handle from the Hip to Ankle joint.

Step 2 Image


Step 3

Again go to the IK Handle settings and select IKSC solver and create two IK handles, first from the ‘Ankle’ to ‘Ball’ joint, and the second from the ‘Ball’ to ‘Toe’ joint. So now the ‘IKHandle1′ is from the ‘Hip’ to ‘Ankle joint’, the ‘IKHandle2′ is from the ‘Ankle’ to ‘Ball’ joint and the ‘IKHandle3′ is from the ‘Ball’ to ‘Toe joint’.

Step 3 Image


Step 4

Now create a chain of joints as mentioned in the image below for the joint setup, and rename it accordingly.

Step 4 Image


Step 5

Select the ‘Rl_base’ joint and Press Ctrl+A, from the Attribute editor go to ‘Drawing Overrides’ and check ‘Enable Overrides’, and choose a different color.

Step 5 Image


Step 6

Also increase the radius size from attribute editor, increase the radius for ‘Rl_toe’, ‘Rl_ball’ and ‘Rl_ankle’ the same way. Now it will be easier to select any joint from this hierarchy independently.

Step 6 Image


Step 7

Select ‘Rl_base’ and move the joint up while pressing the X key on the keyboard (snap to grid), now ‘Rl_toe’ is snapped with ‘Toe_jnt’, ‘Rl_ball’ with ‘Ball_jnt and ‘Rl_ankle’ with ‘Ankle_jnt’.

Step 7 Image


Step 8

Now select the ‘Rl_ankle’ joint first, and then select ‘IKHandle1′ and go to the Constrain menu and click on ‘Point’ constrain. Using the same method, apply a point constrain between ‘Rl_ball’ and ‘IKHandle2′ and ‘Rl_toe’ and ‘IKHandle3′.

Step 8 Image


Step 9

Next, create a controller like the one shown in the image below, ‘Rl_base’, press D first, then V while holding the first key, then snap the pivot of the curve to the ‘Rl_base’ using the middle mouse button. ‘Freeze transform’ from ‘Modify’ and Delete by type History from edit menu.

Step 9 Image


Step 10

Now select the ‘feet_cntrl’ curve and the ‘Rl_base’ and ‘Parent’ constrain them from the constrain menu.

Step 10 Image


Step 11

Now select the the ‘Feet_cntrl’ curve, and from the channel box, click on ‘Add attribute’ from the edit menu.

Step 11 Image


Step 12

Add attribute ‘Ball_roll’, keep the data type on Float, set the Min value to -5, Max to 10 and Default to 0 (as shown.)

Step 12 Image


Step 13

Add another attribute ‘Toe_roll’, keep the data type on Float, set the Min value to -5, Max to 10 and Default to 0

Step 13 Image


Step 14

Now go to Animate>Set Driven Key>Set… from animation module.

Step 14 Image


Step 15

Select ‘feet_cntrl’ and click on the ‘Load Driver’ from the ‘Set Driven Key’ option box. Select the ‘Rl_ball’ joint and click on the ‘Load Driven’. Now you’ll see ‘feet_cntrl’ in the left pane of Driver section and their attributes in the right pane, including two attributes that we’ve added ‘ball_roll’ and ‘Toe_roll’. ‘Rl_ball’ in the left pane of the Driven section and their attributes in the right pane.

Step 15 Image


Step 16

Now select the ‘ball_roll’ attribute of ‘feet_cntrl’ and the ‘Rotate Z’ attribute of ‘Rl_ball’, rotation axis can be confirmed by rotating the ‘Rl_ball’ joint in the viewport. Now click on the key and you’ll see the ‘Rotate Z’ attribute of the ‘Rl_ball’ turns pink, this means the connection has been created for the default value of the ‘ball_roll’ attribute.

Step 16 Image


Step 17

Now select ‘feet_cntrl’, which can also be selected by clicking it in the ‘Set Driven Key’ option, and set the value of ‘Ball roll’ to 10, select ‘Rl_ball’ and rotate it on the Z axis, or manualy give it some value. In my case it’s 40 and than click on key.

Step 17 Image


Step 18

Again select the feet_cntrl, and set the value of ball roll to -5 and Rotate Z of Rl_ball to -15.

Step 18 Image


Step 19

Now select ‘Rl_toe’ from the outliner and Create Set Driven Keys as we’ve created for ‘Rl_ball’. When ‘Toe roll’ is 0 click key on the default value of ‘Rl_toe’.

Step 19 Image


Step 20

When ‘Toe roll’ is at 10 Rotate Z of ‘Rl_toe’ is 70.

Step 20 Image


Step 21

And when ‘Toe roll’ is -5 Rotate Z of ‘Rl_toe’ is -8. And here we are done with the first method of Reverse foot lock.

Step 21 Image


Step 22

This is the second method of creating ‘Reverse foot lock’. Follow Steps 1 to 3 and then rename the ‘IKHandle 1′ to ‘Ankle_ik’, ‘IKHandle 2′ to ‘Ball_ik’ and ‘IKHandle 3′ to ‘Toe_ik’, as shown.

Step 22 Image


Step 23

Now select the ‘Ankle_ik’ and group it by pressing Ctrl+g, rename the group ‘Ankle_IK_grp’, and snap the pivot of this group to the ball position.

Step 23 Image


Step 24

Select the other two IK handles ‘Ball_ik’ and ‘Toe_ik’ and group them. Rename this group ‘Ball_toe_ik’, and snap the pivot of this group to the same ball joint position.

Step 24 Image


Step 25

Now select these two groups ‘Ankle_ik_grp’ and ‘Ball_toe_ik’ and group them by pressing Ctrl+g, rename this group ‘Toe_ik_grp’, and snap the pivot of this group to the toe joint.

Step 25 Image


Step 26

Create one more group of ‘Toe_ik_grp’, rename it ‘Heel_ik_grp’, snap the pivot of this group to the ankle joint position.

Step 26 Image


Step 27

Now create a controller curve ‘Foot_cntrl’ as we did previously in Step 9, and snap the pivot of this controller curve to the ball joint position. Freeze transform and delete the history of ‘foot_cntrl’.

Step 27 Image


Step 28

Select the ‘Heel_ik_grp’ from the outliner, and then Shift select the ‘foot_cntrl’ and press P on the keyboard. You can lock and hide the scale attributes of foot_cntrl.

Step 28 Image


Step 29

Select the ‘foot_cntrl’ and five attribute. First, set the ‘Ball_roll’ to Min 0, Max 10, default 0.

Step 29 Image


Step 30

Second attribute, ‘Toe_roll’ Min 0, Max 10, Default 0.

Step 30 Image


Step 31

Third attribute, ‘Toe_tap’ Min -10, Max 10, Default 0.

Step 31 Image


Step 32

Fourth attribute, ‘Toe_twist’, Min -10, Max 10, Default 0.

Step 32 Image


Step 33

And the last attribute ‘Heel_twist’, Min -10, Max 10, Default 0.

Step 33 Image


Step 34

Now go to Animate>Set Driven Key>Set, and select ‘foot_cntrl’ and click on ‘Load Driver’. Select ‘Ankle_ik_grp’ and click on ‘Load Driven’. Create a set driven key between the ‘Ball_Roll’ attribute of ‘foot_cntrl’ and the ‘Rotate X’ attribute for the ‘Ankle_ik_grp’.

Step 34 Image


Step 35

When the ‘Ball Roll’ of ‘foot_cntrl’ is at 10, set the ‘Rotate X’ of ‘Ankle_ik_grp’ to 30 and key it.

Step 35 Image


Step 36

Now select the ‘Toe_ik_grp’ and click on Load Driven. Create a Set Driven Key between the ‘Toe Roll’ attribute of ‘foot_cntrl’ and the ‘Rotate X’ for the ‘Toe_ik_grp’ and key it.

Step 36 Image


Step 37

When the ‘Toe Roll’ of ‘foot_cntrl’ is at 10, set the ‘Rotate X’ of ‘Toe_ik_grp’ to 60 and key it.

Step 37 Image


Step 38

Select the ‘Ball_toe_ik group’ and click on Load Driven. Create a Set Driven Key between the ‘Toe_tap’ attribute of ‘foot_cntrl’ and the ‘Rotate X’ for the ‘Ball_toe_ik’.

Step 38 Image


Step 39

In the same way, create a set driven key between the ‘Toe_twist’ attribute of ‘foot_cntrl’ and the ‘Rotate Y’ attribute of ‘Toe_ik_grp.

Step 39 Image


Step 40

And the ‘Heel_twist’ attribute of ‘foot_cntrl’ with ‘Rotate Y’ of ‘Heel_ik_grp’. And with this, you’re done with the second method of the ‘Reverse foot lock’.

Step 40 Image

Tuesday, March 9, 2010

Rigging Reverse IK Foot - Notes V3

 

Create a simple robotic looking leg.

Capture

Capture2

Capture3- Create the basic leg setup and label each joint, hip_RT, knee_RT, ankle_RT, ball_RT, toe_RT

- Add the Ikhandle between the hip_RT and then ankle_RT.  Label it "IK_Handle_Ankle_RT"

Now go to the Skeleton menu and click on ‘IK Handle Tool’ options, and then from the ‘IK Handle Settings’ select IKRPsolver and create a IK handle from the Hip to Ankle joint.

Step 2 Image


Creating the Knee Controller

- Create a small triangle with the curve tool and place it in front of the Knee joint. Label it “Knee Controller” This will be used as a selectable control for the knee direction.

- Select the triangle and freeze the transformations - Modify > Freeze Transformations and center pivot – Modify > Center Pivot This will zero out everything in the channel box. This is especially when you want to return the controller to the starting point; just zero all the translate and rotate attributes.

Knee Controler

- Select the Knee Controller (triangle) and then select the ikHandle_Ankle, under the constrain menu chose Pole Vector. This creates a direct relationship between the triangle and the Knee direction.


Setting up for the Reverse Foot

IK SC

Now going to add IK SC handles to parent the reverse foot to. In the IK Handle settings change the solver to “Single Chain” or IKSCsolver. 

-Add a IK SC Handle from the Ankle to the Ball. Label it “ikHandle_Ball”. These IK SC Handles will

-Add a IK SC Handle from the Ball to the Toe. Label it “ikHandle_Toe”

Step 3 Image



Create the Reverse Foot Lock starting on the Heel of the foot and going to the Toe then the Ball and finally the Ankle; Hence 'Reverse' since the joints are going backwards through the foot.

RF_Foot

Label the joints accordingly, RF_Ankle, RF_Ball, RF_Toe, RF_Foot.

outliner

The Outliner

*It can be a bit difficult to select the newly created joints to label them. Open the Outliner and then you can select them from the list. They should be labeled Joint1, Joint2, Joint3, and Joint4.

Select the ikHandle_Ankle and then the RF_Ankle, press P for parent. Select the ikHandle_Ball then select the RF_Ball, press P for parent. Select the ikHandle_Toe and then the RF_Toe, press P for parent.

After you parent all the RF joints to the IK handles, the Outliner connections should look like this:

outlinerIK

Step 4 Image

Setting up for the Reverse Foot

Now we are going to create the reverse foot

Create the Reverse Foot Lock starting on the Heel of the foot and going to the Toe then the Ball and finally the Ankle; Hence 'Reverse' since it's going backwards through the foot.

RF_Foot

Label the joints accordingly, RF_Ankle, RF_Ball, RF_Toe, RF_Foot.

outliner

The Outliner

*It can be a bit difficult to select the newly created joints to label them. Open the Outliner and then you can select them from the list. They should be labeled Joint1, Joint2, Joint3, and Joint4.

Select the ikHandle_Ankle and then the RF_Ankle, press P for parent.

Select the ikHandle_Ball then select the RF_Ball, press P for parent.

Select the ikHandle_Toe and then the RF_Toe, press P for parent.

After you parent all the RF joints to the IK handles, the Outliner connections should look like this:

outlinerIK p

Create a foot controller and parent it to the RF_Foot.

- Create a NURBS circle and place it at the middle of the foot both vertically and horizontally.

foot controller

- Select the circle and freeze the transformations. This will zero out everything in the channel box.  This is especially when you want to return the controller to the starting point; just zero all the translate and rotate attributes.

- Select the RF_Foot and then the circle foot controller AND then press “p” to parent the RF_Foot to the circle.

Character Rigging In Maya