• home
  • forum
  • my
  • kt
  • download
  • Part 2: Reverse Foot

    Author: 2007-06-23 18:43:54 From:

    We have already covered creating a skeleton optimized for real-time not only in its number of joints but also in the way the axes of each joint is oriented. We will now address creating controls for the animator to use when positioning the character. This is in essence digital puppeteering.

    Creating Controls:

    The reverse foot:

    For gaming and simulation most characters (especially bipeds) have multiple animation cycles involving their legs ¨C walking , running, creeping, ¡­etc. This kind of movement requires a lot of animation devoted to moving the feet. To make this process simple for the animator we will create a reverse foot setup. Keep in mind, there are a myriad of ways to rig a character¡¯s feet for animation.

    The premise for the reverse foot lies in that there are essentially four pivot points of the foot ¨C the ankle, heel, ball and toe. We need to have a setup where the animator can have access to al the pivot points. We will construct this setup so the animator will only select one controller and have full access to the pivots.

    We want the legs to be controlled by IK primarily. Create a Rotate Plane IK handle from the L_hip to the L_ankle. Name it L_ankleIK. We use the RP Solver to have the ability to control the overall orientation of the leg joints through two means ¨C the twist attribute and the placement of the Pole Vector. Create a Single Chain IK handle from the L_ankle to the L_ball. Name this the L_ballIK.



    Now construct the reverse foot. Draw the following joints in order ¨C LCntrlHeel > LCntrlToe > LCntrlBall > LCntrlAnkle.



    Put these joints on a layer called Control and change its color. Now we need to have the reverse foot joints drive the joints of the deformation skeleton. To do this first have the IK handles as children to the reverse foot joints. So, select the LCntrlAnkle then the L_ankleIK and go Constrain > Point. Select the LCntrlBall then the L_ballIK and do Constrain > Point.

    Now create a poly torus (Radius 1 ¨C Section Radius .5 ¨C Subd Axis 6 ¨C Subd Height ¨C 6). Name it CntrlLankle and make it the parent of the heel joint. Place its pivot point on the ankle joint of the deformation skeleton. This torus represents the ankle¡¯s pivot point. Rotate the torus on the X and notice the leg react accordingly.

    Working with Pole Vectors:

    Take a polygonal cone and have the point facing away from the character. Move it via vert snap to the knee and move it on the Z in front of the knee. Freeze transformations and name it LPoleVector. With the cone selected, select the L_ankleIK and go Constrain > Pole Vector.



    Add a control attribute for the pole vector. On the CntrlLankle add two attributes, the LPVtransX and LPVtransY. Using the Connection Editor, have the LPVtransX value pipe into the translate X of the LPoleVector. Do the same for the LPVtransY.

    To have the pole vector keep up with the CntrlLankle, group the cone to itself and move the group¡¯s pivot point to the ankle. Select the CntrlLankle then the LPoleVector and Constrain > Point.

    Now, when rotating the CntrlLankle in the Y axis we notice only the ankle joint and below respond. We want the whole leg to respond to this rotation so we will access the twist attribute on the RP IK handle. To do this write the following expression:

    L_ankleIK.twist = -CntrlLankle.rotateY;

    Now notice the effect when rotating the CntrlLankle in the Y axis.

    Creating the heart of the reverse foot ¨C the set driven key:

    With the CntrlLankle selected go to Modify > Add Attribute and name the attribute LFootRoll with the min at 0, max at 10 and the default at 5.



    Now we will use the LfootRoll as a driver in a set driven key to drive the rotation of the reverse joints to mimic forward movement on the ball and toe plus backward movement on the heel.

    Select the CntrlLankle. Go to Animate > Set Driven Key > Set > Options. Select the LFootRoll attribute as the Driver. Select the LCntrlHeel.rotateX as the Driven. Make sure the LFootRoll attribute¡¯s value is set to 5. Set a keyframe. In addition, with the value still at 5, set keyframes on the rotation in X for the other reverse foot joints.

    Now set the value of the LFootRoll to 0. Rotate the LCntrlHeel to ¨C38 in the X. Save a key for the heel and all the driven joints.



    Set the LFootRoll to 7. Set the rotation in X of the ball and toe joints to 25 and ¨C12 respectively. Set keyframes on all driven joints.



    Now with the LFootRoll value at 10 se the rotation in X of the ball and toe joints to 0 and ¨C76 respectively. Set keys for all the driven joints.



    Finally, duplicate the steps above for the right foot. The next section will cover working with the spine.

    Keeping the feet from going in the ground:

    When animating a walk cycle for instance one of the more tedious functions for animators is to ensure the feet do not slip or go into the ground. Some of the slipping problem is solved because of the use of IK. We can enhance this through expressions on the body controls so the feet will not slip.

    As far as having the feet not break the ground plane, there are at least two approaches to accomplish this. The first would be to have the ankle controls point constrained to another object. This object would actually move the ankle controls along the path of the character¡¯s movement. When the feet need to be raised the weight of the point constrained is turned to 0 as if there was no constraint at all. The animator would therefore animate not only the movement of the control object and the placement of the ankle control but the weight of the constraint as well.

    Another approach is to utilize a geometry constraint. The geometry constraint places the pivot point of one object onto the surface of the object it is constrained to.

    Create a polygonal plane and name it floorHidden. Position the plane in the Y axis at the same height as the ankle joints. Create a separate controller object (locator or poly object) and name it CntrlBody. Position the object in front of the skeleton and move its pivot point to the root joint.



    We are going to have the ankle controls be constrained to the floorHidden plane through a geometry constraint. We will be able to turn this constraint on and off by the use of custom attributes on the CntrlBody object.

    Create the custom attributes:

    With the CntrlBody selected go to Modify > Add Attribute and add an interger attribute with the min at 0 and max at 1. Default is 0. Name it LGround.



    Add another attribute for the RGround with the same values. Now create the geometry constraint by selecting the floorHidden then the CntrlLankle. Go to Constrain > Geometry. Test out the constraint by moving floorHidden in the Y axis. The left leg should react accordingly.



    Linking the constraint with the custom attributes:

    We will now have the custom attributes of the CntrlBody drive two aspects of the geometry constraint. In order to have this work properly we will not only have to access the weight but also the node state of the geometry constraint. We can accomplish this through a set driven key.

    Go to Animate > Set Driven Key > Set > Options. Load the LGround attribute from the CntrlBody as the driver. In the Outliner or Hypergraph select the geometry constraint. Load that as the driver. This is what you should see:



    Notice the driven attributes are both the nodeState and the floorHiddenW0. With the LGround attribute at 0 have the nodeState at HasNoEffect and the floorHiddenW0 at 0. This will result in the ability to independently position the ankle controller. With LGround at 1 have the nodeState at Normal and the floorHiddenW0 at 1. This will put the constraint into effect and lock the CntrlLankle to the ground plane.




    Do the same process for CntrlRankle using a custom attribute named RGround.

    Skiing anyone?:

    We are now going to take this one step further by adding in the rotation of the ground plane into the mix. This is useful for undulating terrain or if you are animating a skier/snowboarder type of character.

    Select the floorHidden poly plan then the CntrlLankle and go Constrain > Normal.

    The normal constraint works like an aim constraint so if the CntrlLankle flips on you check the aim vector of the normal constraint (it should be the Y axis for this example). Now rotate the floorHidden plane and notice the affect.



    Link the normal constraints nodeState and weight to the LGround attribute:

    Using a set driven key have the Lground attributes state (1 or 0) turn on and off the nodeState and weight of the normal constraint.



    Notice the nodeState is "Blocking" since "HasNoEffect" is not supported in the normal constraint.

    Creating the real ground plane:

    Duplicate the floorHidden poly plane and name this new plane floor. Translate it to 0 in the Y. Freeze transformations. Use the Connection Editor to have the floor¡¯s transformation attributes pipe directly into floorHidden¡¯s transformation attributes.



    Now hide the floorHidden plane and you¡¯re all done!

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      Animation (19)
      Modeling (34)
      Character Setup (12)
      Textures and Materials (17)
      Effects (4)
      Tips and Techniques (3)
      Getting Started (3)
      Using Tools and Scripts (0)
      Lighting (5)

    New

    Hot