Publishers of technology books, eBooks, and videos for creative people

Home > Articles

This chapter is from the book

Upgrading the Legs and Feet

You'll follow the same basic process just used for the advanced arm to create all the advanced rig controls for the leg and feet: node creation, hierarchy setup, connections, and channel cleaning. For the advanced leg controls, you should again add skeletons to the upper legs and knees to improve deformations when the limbs twist and bend. Simply apply the same setup and connection techniques as used on the upper arms. A new setup technique, however, will be shown for creating a rolling foot control, which will be useful whenever the character is animated to walk.

Adding Advanced IK Feet Controls

To upgrade the controls for the feet, you need to add locators and IK handles to the basic foot rig. Creating controls for rolling the foot through the heel, ball, and toe (otherwise known as a foot-roll rig), requires adding two new IK handles to each foot skeleton and inserting several group node pivots into the hierarchy.

To add an IK based foot-roll rig to the left FK foot skeleton:

  1. Begin by disconnecting the basic foot hierarchy. In the Hypergraph drag the left foot root and IK handle nodes with the middle mouse button onto an empty area. This detaches them from the left leg icon. It is a good idea to also detach the polygon foot bones from the parent foot joints, so they don't shift when you add IK to the skeleton.
  2. To add two IK solvers to the foot skeleton, choose Skeleton > IK Handle tool icon.jpg, and make sure that the standard RP solver is selected in the options. The IK Handle tool is used to add IK to an existing FK skeleton. To add the first IK solver, in Right view, click the left-foot root followed by the ball joint. Name the resulting IK handle located at the ball of the foot lfBallIk.
  3. Add a second IK handle to the same skeleton by activating the tool again, and click the left-foot ball joint followed by the end joint. Name the resulting IK handle at the end of the foot lfToeIk. Notice that the two IK solvers have not overlapped, so there won't be any conflicts between the constraints. You'll parent the two IK handles under three new locators that will be used as the main pivots for the foot-roll rig.
  4. Choose Create > Locator to manually create each locator, and place them at the heel, ball, and toe of the foot. Use FIGURE 4.17 as a guide for placing the heel locator where the heel of the foot touches the ground, which is where the foot should pivot from when rolling backward, and for placing the other two locators on the ball and end joints. Name the locators lfHeelRoll, lfBallRoll, and lfToeRoll.
    Figure 4.17

    Figure 4.17 Place three main locators at the heel, ball of the foot, and toe to create the pivots for a rolling foot control.

  5. Parent the locators between the left leg icon and the foot skeleton in the following order: lfHeelRoll, lfToeRoll, and lfBallRoll. Parent the two new IK handles under the lfBallRoll locator, and parent the original leg IK handle under the lfToeRoll locator (see FIGURE 4.18). Make sure that you re-parent the polygon bones under the appropriate foot joints, and then rotate the locators to test out the controls.
    Figure 4.18

    Figure 4.18 Here is the hierarchy setup for the standard foot-roll control. The more advanced version on the example rig inserts more locators to create additional pivots for the foot.

  6. Repeat steps 1 through 5 of the process on the other foot. Mirroring a whole hierarchy can be problematic.

This foot-roll rig is a variation of the "reverse foot-roll" setup that has been common in the animation industry for many years. However, even though the foot-roll rig has all the controls needed to animate a rolling foot, it can be further enhanced by adding more locators or group nodes as pivots. For instance, you may have noticed that even though you have a pivot located at the ball of the foot, because of the way it is parented you cannot wiggle the toe joints. Instead, the toes stay still while the foot rotates upward, which is the direct result of the "reverse" parenting of the nodes.

Creating additional controls just involves thinking about how the three locators are moving, and then inserting new locators or group nodes to extend that movement. For instance, in addition to the standard pivots at the ankle and ball of the foot, try adding a pivot to rotate the foot at the outer edge. Some experimentation would show that such a node would need to be parented above the lfHeelRoll locator in the hierarchy, as would a node that will be used to rotate the foot at the ankle. On the other hand, a node that is intended to wiggle the toes should be inserted in the hierarchy below the lfToeRoll locator and above the left leg IK handle and left foot root joint.

Driving and Cleaning the IK Foot Controls

As with the advanced arm controls, the advanced leg controls must also be driven using math expressions, node connections, or SDKs. The foot-roll controls can be entirely driven by custom channels on the leg icon using SDKs. You'll create a custom channel named footroll to drive the three locators created in the last section. After driving the foot to roll, clean the leg icon by locking and hiding the scaling channels, and set the transform manipulator as default.

To drive the left foot-roll rig with SDKs:

  1. Create a custom channel on the leg icon by choosing Channels > Attributes > Add Attribute in the Channel Box. Set the limits for your footRoll channel to minimum –5 and maximum 10, with a default setting of 0.
  2. In the Set Driven Key dialog box, load the leg icon's custom footRoll channel as the driver, and load the lfHeelRoll locator's rotateX channel as the driven. Set two SDKs on the heel locator to roll backward about 35 degrees when the footRoll channel is manipulated from 0 to –5.
  3. Load the lfBallRoll locator, and drive its rotateX channel to rotate upward about 30 degrees when the footRoll channel is manipulated from 0 to 5.
  4. Move the footRoll channel to 10, and rotate the ball of the foot locator back down about 10 degrees to uncompress the foot. To complete the roll up onto the toes at 10 on the footRoll channel, load the lfToeRoll locator and set a driven key on the rotateX channel at about 30 degrees.
  5. To test the control, set the driver channel back to 0, and scrub the channel. You should see the foot roll back onto the heel at –5, up onto the ball of the foot at 5, and up onto the toe at 10 with a slight decompression at the ball (see FIGURE 4.19). Of course, if you added other pivots for the foot and toes to your foot controls, make sure that you create driver channels on the foot icon and drive those pivots as well.
    Figure 4.19

    Figure 4.19 Create custom channels to drive the foot-roll pivots, as well as other pivots on the advanced foot rig.

MEL Scripting the Advanced Controls

Writing MEL code for the advanced controls involves all the commands and techniques used in the basic scripts, plus new commands for connecting channels and editing attributes. You can find most of these commands by doing the rigging tasks in the interface, and then examining the history in the Script Editor. Remember to always look up new commands in the MEL Command Reference to streamline the code by using available flags. For instance, after connecting channels with SDKs in the interface, the code in the History field will contain many select, setAttr, and rotate commands as you manipulate the driver and driven channels. The code will look something like this:

select -r cm:lfArm_icon ;
select -r cm:lfArmTurn_bindJt ;
setDrivenKeyframe -currentDriver lfArm_icon.armTurn lfArmTurn_bindJt.rotateX;
// 1 //
select -r lfArm_icon ;
setAttr "lfArm_icon.armTurn" 10;
select -r lfArmTurn_bindJt ;
rotate -r -os 36.379451 0 0 ;
select -r lfArm_icon ;
setDrivenKeyframe -currentDriver lfArm_icon.armTurn lfArmTurn_bindJt.rotateX;
// 1 //
setAttr "lfArm_icon.armTurn" -10;
select -r lfArmTurn_bindJt ;
rotate -r -os -115.024388 0 0 ;
setDrivenKeyframe -currentDriver lfArm_icon.armTurn lfArmTurn_bindJt.rotateX;
// 1 //
select -r lfArm_icon ;
setAttr "lfArm_icon.armTurn" 0;
setAttr "lfArm_icon.armTurn" -10;

You can consolidate all of this code into three SDK commands simply by adding the flags to set the driver and driven values, which is –dv, or driver value, and –v, or value (which specifies the driven value). Loops and procedures further streamline the code in the advanced scripts. Here is a simplified example:

//Set SDKs to create forearm twist controls:
setDrivenKeyframe -cd "lfArm_icon.armTurn" -dv 0
            -v 0 "lfArmTurn_bindJt.rotateX";
setDrivenKeyframe -cd "lfArm_icon.armTurn" -dv 10
            -v 35 "lfArmTurn_bindJt.rotateX";
setDrivenKeyframe -cd "lfArm_icon.armTurn" -dv -10
            -v -115 "lfArmTurn_bindJt.rotateX";

The advanced controls also require connecting channels using math expressions. Maya sees a math expression as a string, so you specify the expression using the string flag on the expression command. Since most expressions have multiple lines, it is advisable to store them in separate string variables that can be combined. Be careful to avoid breaking long strings onto multiple lines, as this will cause an "unterminated string" error. Also be aware that names won't be hard-coded in the advanced scripts, so names stored in variables and arrays will further break up the expression string. Here is one example of using MEL to declare an expression:

//Expression for twisting the upper arm joints:
string $exp1 = "lfNewUpArm_rootJt.rx = 0 + (lfArm_ctrlRt.rx / 3);\n";
string $exp2 = "lfNewUpArm1_bindJt.rx = 0 + (lfArm_ctrlRt.rx / 2); \n";
string $exp3 = "lfNewUpArm2_bindJt.rx = 0 + (lfArm_ctrlRt.rx); \n ";
expression -name "newUpArms_exp" -string ($exp1 + $exp2 + $exp3);

Creating direct node connections in the advanced scripts is basically the same as described in "Driving the Upper Arm Twisting," earlier in this chapter. You run createNode commands to create utility nodes, and then use the connectAttr commands to connect these nodes to other transform channels. In addition, you'll use setAttr commands extensively to set how the utility nodes affect the connections. You'll use similar setAttr commands to lock and hide attributes, and set default manipulators. As a final step, you'll use a transformLimits command in the process of cleaning up icons to set limits on the icon transform channels. All of this will, of course, be organized into procedures with arguments for all the node names and values.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020