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

Home > Articles > Design

This chapter is from the book

This chapter is from the book

Advanced Stretchy IK Legs and Classic Reverse Foot

The Jerk's legs will be rigged up in a similar way to the spine: They will be capable of stretching when the distance between the foot and the hips becomes larger. This is an interesting setup because it causes the foot to stay stuck to the ground, even if the character's root is causing the leg to stretch just a small amount. This capability allows for the animator to hit nice key poses in a walk, or any other pose that involves planting one foot and moving another, without having to worry too much about the terrible "IK snapping" of joints as the IK handle moves too far away from the joint and it can no longer bend to achieve the pose.

In the next exercise, you set up the leg joints so that they will stretch and the animator will never have to worry about this problem.

Exercise 17.5 Classic Reverse Foot Setup

The foot will be set up using a classic reverse foot setup. This simple technique allows the foot to be rotated from all three pivots that a real foot's weight lands upon while walking: the heel, the ball, and the toe. This makes for a very straightforward time when animating the feet for a walk cycle of a character.

  1. Start by opening the file Jerk_IkLegs_Begin.mb on the CD for this chapter.

  2. Next, activate the rotate plane IK Handle tool by going to Skeleton, IK Handle Options and hitting the Reset Tool button. Using the IK Handle tool, create an IK handle from the leg joint to the ankle joint, then from the ankle joint to the ball joint, and finally from the ball joint to the toe joint. Your result should look like Figure 17.37.

  3. Figure 17.37Figure 17.37 The leg after creating the necessary IK handles.

  4. Next, rename all your IK handles to match the portions of the leg and foot that they correspond to—ankle_ikHandle, ball_ikHandle, and toe_ikHandle.

  5. Now create the reverse foot. Start by drawing a backward foot joint hierarchy. The root of this new joint hierarchy should start at the base of the heel and then move to the toe, the ball, and the ankle. Name your hierarchy reverseHeel, reverseToe, reverseBall, and reverseAnkle, accordingly. Your result should look like Figure 17.38.

  6. Figure 17.38Figure 17.38 The reverse foot joint hierarchy.

  7. Next, parent the ankle IK handle to the reverseAnkle joint. Parent the ball IK handle to the reverseBall joint, and parent the toe IK handle to the reverseToe joint, as in Figure 17.39.

  8. Figure 17.39 IK handle relationship in the reverse foot joint hierarchy.

  9. Create three locators that will be pole vector constraints for the leg and feet IK handles. Name the first locator ballPoleVector. Keeping the v key pressed down and using the middle mouse button with the Move tool, point-snap this locator to the reverseAnkle node and make it a child of reverseAnkle. Next, select the ballPoleVector locator that you just parented, Shift+select the ball_ikHandle, and perform Constrain, Pole Vector. Move the locator so that it is off to the side of the foot, not right on top of the ankle joint.

  10. Name the second locator toePoleVector, and point-snap and parent it to the reverseBall joint. Next, select it along with the toe_ikHandle and perform Constrain, Pole Vector. Also move this locator so that it is off to the side of the foot, not right on top of the ball joint.

  11. Finally, name the third locator legPoleVector, and point-snap it to the legJoint; then move it out in front of the knee joint. Parent this locator to the Hips joint. Select this locator, and Shift+select the ankleIk handle and again perform Constrain, Pole Vector. Your result should look like Figure 17.40

  12. The reverse foot setup is completed, and is ready to be animated.

  13. You can animate the reverseHeel, reverseToe, and reverseBall joints to make the character's foot roll as it is walking. Also hide the locators and IK handles that are children of the reverse foot hierarchy so that they aren't accidentally animated or selected.

  14. Now you can create your stretchy legs setup.

    Figure 17.40Figure 17.40 Pole vector constraint for the leg.

  15. Create a distance dimension node from the leg to the ankle with the measuring tool by using the menu command Create, Measuring Tools, Distance Tool. Click first on the leg joint and then on the ankle joint. Now point-constrain the first locator of the distance tool to the leg joint; point-constrain the second locator of the distance tool to the ankle_ikHandle, which spans from the leg joint to the ankle joint, using Constrain, Point (see Figure 17.41).

  16. Next, open the Create Render Node window from the Hypershade window under Create, Create New Node, and create the following utility nodes:

    • Three multiplyDivide nodes

    • Two plusMinusAverage nodes

    • One condition node

    Figure 17.42 shows the result.

    Figure 17.41Figure 17.41 Creating a distance dimension node for the leg.

    Figure 17.42Figure 17.42 Creating utility nodes for the leg.

    Next, you'll hook up a node network that will allow the legs to stretch as the distance between the ankle's IK handle and the leg joint becomes greater.

    To start, you'll create some attributes that can be used to easily control the stretching capabilities of the leg.

  17. Select the reverseHeel joint. This will be the node that you add the additional attributes onto because this is also the joint that you can use to animate the position of the foot. Go to the menu item Modify, Add Attributes and add the following attributes:

    • autoStretch min: 0, max: 1—This is so that the automatic stretching can be blended on and off.

    • shortenTolerance min: 0, max: 1—This attribute will control how short the leg gets before it starts to bend.

    • legScale min: 0, max: 10—This is an extra control that allows the leg to scale on top of the automatic scale.

    Figure 17.43 shows the result.

    Figure 17.43Figure 17.43 The new leg attributes are ready to be connected.

    Now you'll connect all the nodes and attributes that you just created to get the controllable automatic stretchy reaction that you want from the leg.

  18. Connect the distanceDimensionShape.distance attribute to the multiplyDivide1.input1Y attribute. Set the operation mode of multiplyDivide1 node to Divide. Next, copy and paste the number from input1Y (using Ctrl+c and Ctrl+v) into the input2Y attribute of the multiplyDivide1 node.

  19. Next, connect the multiplyDivide1 outputY to the plusMinusAverage1 input1D[0] attribute. Make sure that the plusMinusAverage1 node's operation is set to Subtract. Also make sure that the multipyDivide1 node's input2Z attribute is set to 1. Then connect it to the plusMinusAverate input1D[1] attribute (to subtract 1 from the output).

  20. Connect the plusMinusAverage1 node's output1D to the multiplyDivide2 node's input2Y. Connect the reverseHeel's autoStretch attribute into the input1Y attribute of the multiplyDivide2 node.

  21. Connect the multiplyDivide node's outputY attribute to the plusMinusAverage node's input1D[0]. Then set the multiplyDivide2 node's input2z attribute to 1 and connect it to the input1D[1] attribute of the plusMinusAverage2 node.

  22. Set the operation mode of the condition1 node to Less Than, and connect the plusMinusAverage2 node's output1D attribute to the condition node's colorIfFalseG attribute. Then connect the plusMinusAverage2 node's output1D attribute to the condition node's firstTerm attribute. Next, connect reverseHeel's shortenTolerance attribute to the condition node's secondTerm attribute, and also connect reverseHeel's shortenTolerance attribute to the condition node's colorIfTrueG attribute.

  23. Next, connect the condition1 node's outColorG to the last multiplyDivide3 node's input1Y attribute. Connect reverseHeel's attribute legScale to multiplyDivide3's input2Y attribute.

  24. Finally, connect the outputY attribute of the multiplyDivide3 node into the scaleX attributes of the leg and the knee joint nodes.

  25. Your final node network should look similar to Figure 17.44.

    Figure 17.44Figure 17.44 The final node network for the stretchy leg.

You can now animate the reverse feet, and the leg will actually stretch to compensate for the overextension of the foot. The attributes to control this reaction are right on the reverseHeel, so you can keyframe this behavior on and off and scale the legs on top of it. The completed scene file appears on the accompanying CD as Jerk_IkLegs_Finished.mb.

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