Tip - Rigging
Always create a rig in any orthographic view. (Never user perspective view).*Joint tool.
Parenting
1. Select Child Object.2. Shift select Parent Object.
3. Press p to parent.
Unparent
1. Select Child Object.2. Edit > Unparent.
Kinemetics
Forward Kinemetics (FK)
Inverse Kinemetics (IK)
FK Handle - Parent affects the Child Object.
IK Handle - Child Object affects the Parent Object instead.
*Select the right panels to help you with the outline of your animation.
Set some keyframes with IK Handle and it will show the animation moving.
To view hierarchies using the Hypergraph.
- From the perspective view’s panel menu, select Panels > Layouts > Two Panes Stacked. The workspace displays two panels stacked on top of each other with an identical perspective view of the scene.
- In the lower panel, select Panels > Hypergraph Panel > Hypergraph. The lower panel displays the Hypergraph.
- In the Hypergraph menu, select Graph > Scene Hierarchy. If the menu item appears dimmed, it indicates that the Hypergraph is already displaying the scene hierarchy
The Hypergraph displays with a black background by default. In order to see the relationships between the items, the background has been modified for the images in this lesson.
- In the Hypergraph menu, select View > Frame All to see all the components of your scene.
Creating a skeleton hierarchy
To link the various components of the mechanical arm into a hierarchy that can be posed, you need to create a skeleton. A skeleton is a hierarchy of joints that are connected together with bones.
In the scene, a joint represents a special type of node that gets created in a skeleton hierarchy. A joint acts as the parent node for any other joints that occur in the hierarchy below it. Each joint has a rotational pivot point associated with it. A bone is the visual representation used in the scene view to connect the joints and help visualize the joint chain.
A skeleton is similar to a skeleton in the real world in that it acts as the underlying structure for the surfaces to be attached. While you can view the skeleton with its bones and joints in the scene view, it does not appear in your rendered images. Its purpose is to assist you in setting up and posing your models and characters and to visualize the motion you want to achieve.
Skeletons are integral to the animation of any character or hierarchical model. Examples of characters that use skeletons are two and four legged animals. Skeletons are also useful for animating other organic components such as the tail of an animal, a tentacle of an octopus, or a snake.
In the following steps, you create a simple skeleton consisting of four joints that you combine with the mechanical arm model into a skeleton hierarchy, allowing you to pose and animate the model.
- In the perspective view menu, select Panels > Orthographic > side. The view updates to display the side view.
You need to view the components of the mechanical arm fully in the side view so you can draw the joints for the skeleton.
- Resize the side view to a larger size by dragging the border between the side and Hypergraph panel views downwards.
- In the side view menu, select Shading > Wireframe (Hotkey 4).
- From the main menu, select Skeleton > Joint Tool > . The Tool Settings window for the Joint Tool appears. The Joint Tool is used to create the joints and bones for a skeleton.
- In the Joint Tool settings window, do the following:
- In the side view, starting from the base of the mechanical arm, do the following:
- Click in the center of each pivot pin on the mechanical arm to place four joints as shown in the image below.
- In the Hypergraph, dolly the view to see the skeleton node hierarchy you just created. (It appears at the right side of the view.)
- In the Hypergraph, select the joint1 node. The entire skeleton becomes selected. Any rotations on this node also affect anything lower down the hierarchy.
- Select joint2 (You can also press the down arrow on your keyboard to select further down the hierarchy).
The skeleton is selected from joint2 downwards in the hierarchy. Any rotations that you make on this node affect only joint2 and nodes below joint2.
Example:
Note: When you select the object first, that would be the child object. And when you shift select to another object, that object will be the parent after using the tool Parenting.
To create an IK handle for the mechanical arm
- From the main menu, select Skeleton > IK Handle Tool > . The IK Handle Tool Settings window for the Joint Tool appears. When the mouse pointer is in the orthographic view its appearance changes to the tool's cross hair cursor.
- In the IK Handle Tool Settings window, do the following:
- Click Reset Tool to set the tool to its default settings.
- Set the IK Handle Settings: Current Solver - ikSCsolver.
- Working in the side view, starting from the base of the mechanical arm, do the following:
- Click on the skeleton joint at the base of the mechanical arm.
- Click on the skeleton joint at the tip of the mechanical arm. (The IK Tool is designed to attach to the joints closest to your selection point.)
- In the Hypergraph menu, select View > Frame All. In the Hypergraph, two new nodes appear in the hierarchy that represent the IK chain: an IK Handle node and an end effector node.
- In the Hypergraph, select the node named ikHandle1. The IK Handle (in combination with the end effector) is used by the IK solver to calculate the rotation of the joints in the IK chain. By default, the IK Handle is located at the last joint of the IK chain in the scene view.
- Select the Move Tool from the Toolbox, and drag the Move Tool’s Z axis manipulator (blue arrow) to reposition the mechanical arm. When you drag the manipulator, the skeleton and mechanical arm model are repositioned.
- Reset the mechanical arm to its previous position by selecting Edit > Undo, Redo, Repeat until the mechanical arm is positioned into its previous orientation.
Creating a control object for an IK system
Using the IK Handle to pose an IK chain is generally not a good practice. The IK Handle can be challenging to select in the scene view, especially when it’s grouped into a hierarchy that includes a skeleton and other surface components. A better practice is to create a control object. You create a control object to select and manipulate an IK system instead of directly using the IK Handle. You can create a control object with a curve or a locator, which are often used because they don’t appear in the rendered image.
The control object controls the movement of the IK Handle using a constraint. You can constrain the position, orientation, or scale of an object to other objects using constraints.
To create a control object:
- Create and position the control object in the scene view.
- Name the node for the control object in the Hypergraph.
- Freeze transformations for the control object.
- Label the control object in the scene view.
- Constrain the IK Handle to the control object.
- From the main menu, select Create > Locator. A three-dimensional cross is created at the origin in the scene view.
- Select the Move Tool from the Toolbox.
- In the side view, reposition the locator slightly above and in front of the end of the mechanical arm as shown in the image below.
- In the Hypergraph, right-click the node named locator1. Choose Rename from the pop-up menu that appears. The locator1 name is highlighted on the node.
- Type the name ArmControl and press Enter to save the name for the locator.
- In the Hypergraph, select the node named ArmControl. The control object is selected in the scene view.
- In the main menu, select Modify > Freeze Transformations > .
- In the Freeze Transformation Options window do the following: The transformations for ArmControl are set to zero. From this point onwards, you can reset its position to this location by zeroing its translations in the Channel Box.
- In the Hypergraph, select the ArmControl node.
- In the main menu, select Create > Annotation. A input window appears.
- Type ArmControl and click OK. In the scene view, the word ArmControl appears near the locator/control object. In the Hypergraph, two new nodes appear in a hierarchy beneath ArmControl.
- With the annotation still selected, select the Move Tool.
- In the side view, drag only the annotation so it appears slightly offset from the locator object as shown below. The annotation displays in any scene view so you can easily identify the control object for selection.
- In the Hypergraph, right-click the ArmControl node. Choose Collapse from the pop-up menu. (You can also double-click a node to collapse or expand the hierarchy below it.) The ArmControl node appears as a single node instead of the previous three node hierarchy. The small arrowhead on the lower left-hand corner of the node indicates that the node is collapsed.
Constraining an IK system
You can constrain the IK Handle to the control object (ArmControl) using a point constraint. A point constraint allows the transformation attributes of one object to be controlled by the transformations of another object. For example, you select and position ArmControl without having to touch the IK Handle. You also set the constraint so ArmControl maintains the current distance (offset) from the IK Handle. The offset ensures that the constrained IK handle doesn’t move to the same position as the control object. - In the Hypergraph, select the ArmControl node and then Shift-select the ikHandle1 node. The order of selection when applying a constraint is important: you must select the constraining object first, and the item to be constrained second.
- In the main menu, select Constrain > Point > . The Point Constraint Options window appears.
- In the Point Constraint Options window, do the following:
- Select Edit > Reset Settings to set the tool to its default settings.
- Turn on the Maintain Offset setting.
- Click the Add button.
- In the Hypergraph, select only the ArmControl node.
- In the Toolbox, select the Move Tool.
- In the side view, drag the manipulator to reposition the control object. (Experiment with a few different positions in the side view only.) When you drag the manipulator, the control object moves, which in turn moves the IKHandle. Because the IK handle controls the skeleton and the mechanical arm model, they also move. The offset between the control object and the IK Handle is maintained.
The mechanical arm will be easier to pose if you set Cargo Magnet to be oriented downwards towards the floor of the scene regardless of the orientation of the other components of the arm.
You make CargoMagnet point downwards using an orient constraint. An orient constraint constrains the orientation (rotation) of the X, Y, and Z axes of one object to match those of the constraining (target) object.
In the next steps, you reset the position of the mechanical arm to its default position, and then apply an orient constraint to the last joint in the IK system so that its orientation matches the control object. The effect is that CargoMagnet points downwards regardless of any other movement in the scene.
- In the Hypergraph, select the ArmControl node.
- Open the Channel Box by clicking the Show/Hide Channel Box icon .
- In the Channel Box, set the X, Y, and Z transformations for ArmControl to 0. Zeroing the transformations on ArmControl resets the mechanical arm to its home position because of the freeze transformations step you performed in the previous section.
- Close the Channel Box by clicking the Show/Hide Channel Box icon.
- In the Hypergraph menu, select View > Frame All. The Hypergraph displays all the nodes in the scene.
- In the Hypergraph, select ArmControl and then Shift-select the node named joint4. (You may need to dolly and track the Hypergraph view to view these nodes.)
- In the Main Menu bar, select Constrain > Orient > .
- In the Orient Constraint Options window, do the following: Joint4 is constrained to have the same orientation as the control object. In the Hypergraph, the constraint node is created below the joint4 node in the hierarchy.
- With only the ArmControl node selected, use the Move Tool to reposition ArmControl in the side view.CargoMagnet maintains an orientation facing the floor of the scene regardless of how the mechanical arm is positioned in the side view.
Constraint
Point Constraint
Making the target object follow the master object.
In this scenario, the ArmControl is the master, and the IK handle is the slave.
Orient Constraint
Maintains the position of one particular object.
In this scenario, the magnet is under orient constraint, which makes it into a fixed position to the box.
Information taken from: Autodesk Maya 2011 - http://download.autodesk.com/us/maya/2011help/index.html?url=./files/Inverse_kinematics.htm,topicNumber=d0e17823
No comments:
Post a Comment