Inverse Kinematics

Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Slide 1: 

Inverse Kinematics <CHAPTER 5> <BMULT3609> • <Character Animation>

Contents : 

<BMULT3609> <Character Animation> Contents Understanding forward and inverse kinematics Using interactive and applied IK methods Setting thresholds in the IK panel of the Preference Settings dialog box Learning to work with the HI, HD, and IK Limb solvers

Inverse Kinematics : 

Inverse Kinematics Kinematics is a branch of mechanics that deals with the motions of a system of objects. Inverse kinematics would be its evil twin brother that deals with the non-motion of a system of objects. not exactly. In Max, a system of objects is a bunch of objects that are linked together. <BMULT3609> <Character Animation>

Inverse Kinematics : 

Inverse Kinematics After a system is built and the parameters of the links are defined, the motions of all the pieces below the parent object can be determined as the parent moves using kinematics formulas. Inverse kinematics (IK) is similar, except that it determines all the motions of objects in a system when the last object in the hierarchy chain is moved. <BMULT3609> <Character Animation>

Inverse Kinematics : 

Inverse Kinematics The position of the last object, such as a finger or a foot, is typically the one you’re concerned with. Using IK, you can then use these solutions to animate the system of objects by moving the last object in the system. <BMULT3609> <Character Animation>

Forward Kinematics versus Inverse Kinematics : 

Forward Kinematics versus Inverse Kinematics Before you can understand inverse kinematics (IK), you need to realize that another type of kinematics exists—forward kinematics. Kinematics solutions work only on a kinematics chain, which you can create by linking children objects to their parents. Forward kinematics causes objects at the bottom of a linked structure to move along with their parents. <BMULT3609> <Character Animation>

Forward Kinematics versus Inverse Kinematics : 

Forward Kinematics versus Inverse Kinematics For example, consider the linked structure of an arm, where the upper arm is connected to a forearm, which is connected to a hand, and finally to some fingers. Using forward kinematics, the lower arm, hand, and fingers all move when the upper arm is moved. <BMULT3609> <Character Animation>

Forward Kinematics versus Inverse Kinematics : 

Forward Kinematics versus Inverse Kinematics Having the linked children move with their parent is what you would expect and want. but suppose the actual object that you wanted to place is the hand. Inverse kinematics (IK) enables child objects to control their parent objects. <BMULT3609> <Character Animation>

Forward Kinematics versus Inverse Kinematics : 

Forward Kinematics versus Inverse Kinematics So, using inverse kinematics, you can drag the hand to the exact position you want, and all other parts in the system follow. Forward kinematics in Max involves simply transforming linked hierarchies. Any time you move, rotate, or scale a linked hierarchy, the children move with the parent, but the child object can also be transformed independent of its parent. <BMULT3609> <Character Animation>

Creating an Inverse Kinematics System : 

Creating an Inverse Kinematics System Before you can animate an inverse kinematics system, you need to build and link the system. define joints by positioning pivot points, and define any joint constraints you want. <BMULT3609> <Character Animation>

Building and linking a system : 

Building and linking a system The first step in creating an inverse kinematics system is to create and link several objects together. You can create links using the Link button on the main toolbar. With the linked system created, position the child object’s pivot point at the center of the joint between it and its parent. <BMULT3609> <Character Animation>

Building and linking a system : 

Building and linking a system For example, the joint between an upper and lower arm would be at the elbow, so this is where the pivot point for the lower arm should be located. After you create the linked system and correctly position your pivot points, open the Hierarchy panel and click the IK button. Several rollouts open that let you control the IK system, including the Object Parameters rollout. <BMULT3609> <Character Animation>

Building and linking a system : 

Building and linking a system The IK rollouts let you control the binding of an IK system. <BMULT3609> <Character Animation>

Selecting a terminator : 

Selecting a terminator Because child objects in an inverse kinematics system can cause their parents to move. moving a child could cause unwanted movements all the way up the system to the root object. For example, pulling on the little finger of a human model could actually move the head. <BMULT3609> <Character Animation>

Selecting a terminator : 

Selecting a terminator To prevent this, you can select an object in the system to be a terminator. A terminator is the last object in the IK system that is affected by the child’s movement. Making the upper arm a terminator would prevent the finger’s movement from affecting any objects above the arm. <BMULT3609> <Character Animation>

Selecting a terminator : 

Selecting a terminator To set a terminator, select an object and then enable the Terminator option in the Object Parameters rollout. For Interactive IK mode, you can also enable the Auto Termination option included in the Auto Termination rollout. The Number (#) of Links Up value sets the terminator a specified number of links above the current selection. <BMULT3609> <Character Animation>

Defining joint constraints : 

Defining joint constraints The next step is to define the joint constraints, which you specify in the Sliding Joints and Rotational Joints rollouts. By default, each joint has six degrees of freedom, meaning that the two objects that make up the joint can each move or rotate along the X-, Y-, or Z-axes. The axis settings for all other sliding and rotational joints are identical. <BMULT3609> <Character Animation>

Defining joint constraints : 

Defining joint constraints Defining joint constraints enables you to constrain these motions in order to prevent unnatural motions, such as an elbow bending backward. To constrain an axis, select the object that includes the pivot point for the joint, locate in the appropriate rollout the section for the axis that you want to restrict, and deselect the Active option. <BMULT3609> <Character Animation>

Defining joint constraints : 

Defining joint constraints If an axis’s Active option is deselected, the axis is constrained. You can also limit the motion of joints by selecting the Limited option. When the Limited option is selected, the object can move only within the bounds set by the From and To values. <BMULT3609> <Character Animation>

Defining joint constraints : 

Defining joint constraints The Ease option causes the motion of the object to slow as it approaches either limit. The Spring Back option lets you set a rest position for the object; the object returns to this position when pulled away. <BMULT3609> <Character Animation>

Defining joint constraints : 

Defining joint constraints The Spring Tension sets the amount of force that the object uses to resist being moved from its rest position. The Damping value sets the friction in the joint, which is the value with which the object resists any motion. As you enter values in the From and To fields, the object moves to that value to show visually the location specified. <BMULT3609> <Character Animation>

Defining joint constraints : 

Defining joint constraints You can also hold down the mouse on the From and To values to cause the object to move temporally to its limits. These settings are based on the current Reference Coordinate system. <BMULT3609> <Character Animation>

Defining joint constraints : 

Defining joint constraints Copying, pasting, and mirroring joints Defining joint constraints can be lots of work—work that you wouldn’t want to have to duplicate if you didn’t have to. The Copy and Paste buttons in the Object Parameters rollout enable you to copy Sliding Joints or Rotational Joints constraints from one IK joint to another. <BMULT3609> <Character Animation>

Defining joint constraints : 

Defining joint constraints To use these buttons, select an IK system and click the Copy button; then select each of the joints to be constrained in a similar manner, and click the Paste button. You also have an option to mirror the joints about an axis. It is useful for duplicating an IK system for opposite arms or legs of a human or animal model. <BMULT3609> <Character Animation>

Binding objects : 

Binding objects When using applied IK, you need to bind an object in the IK system to a follow object. The IK joint that is bound to the follow object then follows the follow object around the scene. The bind controls are located in the Hierarchy panel under the Object Parameters rollout. <BMULT3609> <Character Animation>

Binding objects : 

Binding objects To bind an object to a follow object, click the Bind button in the Object Parameters rollout and select the follow object. In addition to binding to a follow object, IK joints can also be bound to the world for each axis by position and orientation. This causes the object to be locked in its current position so it won’t move or rotate along the axis that is selected. <BMULT3609> <Character Animation>

Binding objects : 

Binding objects You can also assign a Weight value. When the IK computations determine that two objects need to move in opposite directions, the solution favors the object with the largest Weight value. The Unbind button eliminates the binding. <BMULT3609> <Character Animation>

Understanding precedence : 

Understanding precedence When Max computes an IK solution, the order in which the joints are solved determines the end result. The Precedence value (located in the Object Parameters rollout) lets you set the order in which joints are solved. To set the precedence for an object, select the object and enter a value in the Precedence value setting. <BMULT3609> <Character Animation>

Understanding precedence : 

Understanding precedence Max computes the object with a higher precedence value first. The default joint precedence for all objects is 0. This assumes that the objects farthest down the linkage move the most. <BMULT3609> <Character Animation>

Understanding precedence : 

Understanding precedence The Object Parameters rollout also includes two default precedence settings. The Child to Parent button sets the precedence value for the root object to 0 and increments the precedence of each level under the root by 10. The Parent to Child button sets the opposite precedence, with the root object having a value of 0 and the precedence value of each successive object decreasing by 10. <BMULT3609> <Character Animation>

Various Inverse Kinematics Methods : 

Various Inverse Kinematics Methods After you create a linked hierarchy chain, you need to apply an IK method to the chain before you can animate it. Max includes several different methods for animating using inverse kinematics. The traditional methods of Interactive and Applied IK are now joined with IK solvers. <BMULT3609> <Character Animation>

Various Inverse Kinematics Methods : 

Various Inverse Kinematics Methods The Interactive and Applied IK methods are applied using the Hierarchy panel; the IK solvers can be applied to a bones system, or you can use the Animation ➪ IK Solvers menu. An IK solver is a specialized controller that computes an inverse kinematics solution. This solution is used to automatically set all the required keys needed for the animation. <BMULT3609> <Character Animation>

Various Inverse Kinematics Methods : 

Various Inverse Kinematics Methods Max offers four different IK solvers: History Dependent (HD) IK, History Independent (HI) IK, IK Limb, and SplineIK solvers. <BMULT3609> <Character Animation>

Interactive IK : 

Interactive IK Interactive IK is the method that lets you position a linked hierarchy of objects at different frames. Max then interpolates all the keyframes between the various keys. This method isn’t as precise, but it uses a minimum number of keys and is useful for an animation sequence involving many frames. <BMULT3609> <Character Animation>

Interactive IK : 

Interactive IK Interactive IK interpolates positions between the two different keys, whereas Applied IK computes positions for every key. Because the motions are simple interpolations between two keys, the result may not be accurate, but the motion is smooth. After your IK system is established, animating using the Interactive IK method is simple. <BMULT3609> <Character Animation>

Interactive IK : 

Interactive IK First, you need to enable the Auto Key button and select the Interactive IK button in the Inverse Kinematics rollout of the Hierarchy panel. Enabling this button places you in Interactive IK mode, causing the system to move together as a hierarchy. Then reposition the system in a different frame; Max automatically interpolates between the two positions and creates the animation keys. <BMULT3609> <Character Animation>

Interactive IK : 

Interactive IK To exit Interactive IK mode, simply click the Interactive IK button again. The Inverse Kinematics rollout includes several options. The Apply Only to Keys option forces Max to solve IK positions for only those frames that currently have keys. The Update Viewports option shows the animation solutions in the viewports as it progresses, The Clear Keys option removes any existing keys as the solution is calculated. The Start and End values mark the frames to include in the solution. <BMULT3609> <Character Animation>

IK Preference settings : 

IK Preference settings The required accuracy of the IK solution can be set using the Inverse Kinematics panel in the Preference Settings dialog box. You can open this dialog box by choosing Customize ➪ Preferences. For the Interactive and Applied IK methods, you can set Position and Rotation Thresholds. <BMULT3609> <Character Animation>

IK Preference settings : 

IK Preference settings These Threshold values determine how close the moving object must be to the defined position for the solution to be valid. Because the Applied IK method is more accurate, you want to set its Threshold values lower than those of the Interactive IK method. You can also set an Iterations limit for both methods. <BMULT3609> <Character Animation>

IK Preference settings : 

IK Preference settings The Iterations value is the maximum number of times the calculations are performed. This value limits the time that Max spends looking for a valid solution. The Iterations settings control the speed and accuracy of each IK solution. <BMULT3609> <Character Animation>

IK Preference settings : 

IK Preference settings If the Iterations value is reached without a valid solution, Max uses the last calculated iteration. The Inverse Kinematics panel of the Preference Settings dialog box lets you set the global Threshold values. The Use Secondary Threshold option provides a backup method for determining whether Max should continue to look for a valid solution. <BMULT3609> <Character Animation>

IK Preference settings : 

IK Preference settings This method should be used if you want Max to bail out of a particularly difficult solution rather than to continue to try to find a solution. If you are working with very small thresholds, you want to enable this option. The Always Transform Children of the World option enables you to move the root object when it is selected by itself but constrains its movement when any of its children are moved. <BMULT3609> <Character Animation>

Applied IK : 

Applied IK Applied IK applies a solution over a range of frames, computing the keys for every frame. This task is accomplished by binding the IK system to an object that it follows. This method is more precise than the interactive IK method, but it creates lots of keys. Because keys are set for every object and every transform, this solution sets lots of keys, which increases the size and complexity of the scene. Each frame has its own set of keys, which could result in jerky and non-smooth results. <BMULT3609> <Character Animation>

Applied IK : 

Applied IK To animate using the Applied IK method, you need to bind one or more parts of the system to a follow object, which can be a dummy object or an object in the scene. You do so by clicking the Bind button in the Object Parameters rollout of the Hierarchy panel and selecting an object in one of the viewports. After the system has a bound follow object, select an object in the system. Open the Hierarchy panel; in the Inverse Kinematics rollout, click the Apply IK button. Max then computes the keys for every frame between the Start and End frames specified in the rollout. Click the Apply IK button to start the computation process that sets all the animation keys for the range of frames indicated. If you plan on using the Applied IK method, set the Threshold values in the Inverse Kinematics panel of the Preference Settings dialog box to small values in order to ensure accurate results. <BMULT3609> <Character Animation>

History Independent IK solver : 

History Independent IK solver The History Independent (HI) IK solver looks at each keyframe independently when making its solution. You can animate linked chains with this IK solver applied by positioning the goal object; the solver then keyframes the position of the pivot point of the last object in the chain to match the goal object. You can apply IK solvers to any hierarchy of objects. <BMULT3609> <Character Animation>

History Independent IK solver : 

History Independent IK solver IK solvers are applied automatically to a bones system when you create the system. You can also choose Animation ➪ IK Solvers to select an IK solver. When you choose Animation ➪ IK Solver, a dotted line appears from the selected object. You can drag this line within a viewport and click another object within the hierarchy to be the end joint. A white line is drawn between the beginning and ending joints. The pivot point of the end joint is the goal for the IK solver. <BMULT3609> <Character Animation>

History Independent IK solver : 

History Independent IK solver The goal of the IK solver is marked by a blue cross. Several rollouts within the Hierarchy panel also appear. These rollouts let you set the parameters for the IK solver. The first rollout is the IK Solver rollout. Using this rollout, you can select to switch between the HI IK solver and the IK Limb solver. The Enabled button lets you disable the solver. <BMULT3609> <Character Animation>

History Independent IK solver : 

History Independent IK solver By disabling the solver, you can use forward kinematics to move the objects. To return to the IK solution, simply click the Enabled button again. The IK for FK Pose option enables IK control even if the IK solver is disabled. This lets you manipulate the hierarchy of objects using forward kinematics while still working with the IK solution. If both the IK for FK Pose and the Enabled buttons are disabled, then the goal can move without affecting the hierarchy of objects. <BMULT3609> <Character Animation>

History Independent IK solver : 

History Independent IK solver The IK Solver rollout lets you enable or disable the IK solver. If the goal ever gets moved away from the end link, clicking the IK/FK Snap button automatically moves the goal to match the end links position. Auto Snap automatically keeps the goal and the end link together. The Set as Preferred Angle button remembers the angles for the IK system. <BMULT3609> <Character Animation>

History Independent IK solver : 

History Independent IK solver These angles can be recalled at any time using the Assume Preferred Angle button. When you choose Animation ➪ IK Solvers ➪ HI Solver, the start joint is the selected object, and the end joint is the object to which you drag the dotted line. If you want to change these objects, you can click the Pick Start Joint or Pick End Joint buttons. If you select a child as the start joint and an object above the child as the end joint, then moving the goal has no effect on the IK chain. <BMULT3609> <Character Animation>

Defining a swivel angle : 

Defining a swivel angle The IK Solver Properties rollout includes the Swivel Angle value. The swivel angle defines the plane that includes the joint objects and the line that connects the starting and ending joints. This plane is key because it defines the direction that the joint moves when bent. The Swivel Angle value can change during an animation. <BMULT3609> <Character Animation>

Defining a swivel angle : 

Defining a swivel angle Using the Pick Target button, you can also select a Target object to control the swivel angle. The Use button turns the target on and off. The Parent Space group defines whether the IK Goal’s parent object or the Start Joint’s parent object is used to define the plane. Having an option lets you select two different parent objects that control the swivel plane if two or more IK solvers are applied to a single IK chain. <BMULT3609> <Character Animation>

Defining a swivel angle : 

Defining a swivel angle You can also change the Swivel Angle value by using a manipulator. To view the manipulator, click the Select and Manipulate button on the main toolbar. This manipulator is a green line with a square on the end of it. Dragging this manipulator in the viewports causes the swivel angle to change. <BMULT3609> <Character Animation>

Defining a swivel angle : 

Defining a swivel angle The IK Solver Properties rollout also includes Threshold values. These values determine how close the end joint and the goal must be before the solution is pronounced valid. You can set thresholds for Position and Rotation. The Iterations value sets the number of times the solution is tried. Setting the Iterations value to a higher number produces smoother (less jerky) results, but it increases the time required to find a solution. <BMULT3609> <Character Animation>

Displaying IK controls : 

Displaying IK controls The IK Display Options rollouts can enable, disable, and set the size of the gizmos used when working with IK solvers. Using this rollout, you can Enable the End Effector, the Goal, the Swivel Angle Manipulator, and the IK solver. <BMULT3609> <Character Animation>

History Dependent IK solver : 

History Dependent IK solver The History Independent (HI) IK solver looks at each keyframe independently when making its solution. You can animate linked chains with this IK solver applied by positioning the goal object. the solver then keyframes the position of the pivot point of the last object in the chain to match the goal object. You can apply IK solvers to any hierarchy of objects. IK solvers are applied automatically to a bones system when you create the system. You can also choose Animation ➪ IK Solvers to select an IK solver. <BMULT3609> <Character Animation>

IK Limb solver : 

IK Limb solver The IK Limb solver was specifically created to work with limbs such as arms and legs. It is used on chains of three bones such as a hip, upper leg, and lower leg. Only two of the bones in the chain actually move. <BMULT3609> <Character Animation>

IK Limb solver : 

IK Limb solver The goal for these three joints is located at the pivot point for the third bone. The way this solver works is that it considers the first joint as being a spherical joint that can rotate along three different axes, like a hip or shoulder joint. The second joint can bend only in one direction, such as an elbow or knee joint. <BMULT3609> <Character Animation>

Spline IK solver : 

Spline IK solver The Limb IK solver works well for arms and legs that have a joint in their middle, but it doesn’t work well for tails. Tails are unique because they start out large and gradually are reduced in size to a point. For tails, the Spline IK solver works well. To use the Spline IK solver, you need to create a chain of bones and a spline path. <BMULT3609> <Character Animation>

Spline IK solver : 

Spline IK solver By selecting the first and last bone and then selecting the spline, the bone chain moves to the spline. Each control point on the spline has a dummy object associated with it. By moving these dummy objects, you can control the position of the bones. At either end of the spline are manipulators that you can use to twist and rotate the bones. <BMULT3609> <Character Animation>