Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section A.5. Chapter 5: Animation

A.5. Chapter 5: Animation


Create a simple rig with joints and constraints

Joints are a deformer commonly used in character animation. The hierarchical relationship makes them useful for rigging many types of characters. When creating robots and mechanical devices, you can build a skeleton using joints and then parent the parts of the robot to the joints.

Constraints are used to constrain the channels of one object to the world space coordinates of another object. Constraints are useful as rigging tools for snapping the pivot point of one object to another.


Master it

Create a simple joint chain for a robot's arm. Use the joint chain to animate an arm made from simple polygon surfaces.


Solution

Create a joint chain using three joints—one for the upper arm, one for the forearm, and one for the wrist. Create two cylinders and a sphere. Parent each cylinder to the upper arm and forearm joints; parent the sphere to the wrist joint.


Use Inverse Kinematics

Inverse Kinematics creates a goal object, known as an End Effector, for joints in a chain. The joints in the chain orient themselves based on the translation of the goal. The IK Handle tool is used to position the End Effector.


Master it

Create an Inverse Kinematic control for a simple arm.


Solution

Create a simple arm using three joints—one for the upper arm, one for the forearm, and one for the wrist. Rotate the forearm slightly so the Inverse Kinematic solver understands which direction the joint should rotate. Freeze transformations on the joints. Activate the IK Handle tool, click on the first joint (known as the root), and then click on the wrist joint. Move around the IK Handle to bend the joint.


Animate with keyframes

A keyframe marks the state of a particular attribute at a point in time on the timeline. When a second keyframe is added to the attribute at a different point in time, Maya interpolates the values between the two keyframes, creating animation. There are a number of ways to edit keyframes using the timeline and the Channel Box.


Master it

Create a number of keyframes for the Translate channels of a simple object. Copy the keyframes to a different point in time for the object. Try copying the keyframes to the Scale channels. Try copying the keys to the Translate channels of another object.


Solution

After creating keys for the object, Shift-drag a selection on the timeline. Use the arrows in the selection box to move or scale the keys. Right-click on the keys and choose Copy. Move to a different point in time on the timeline and paste the keys. Copying, pasting, and duplicating keys to another object can be accomplished by selecting the channels in the Channel Box and using the options that appear when you right-click on the channels.


Use the Graph Editor

More sophisticated animation editing is available using the animation curve editing tools on the Graph Editor.


Master it

Create a looping animation for the mechanical bug model using as few keys as possible. The bug should leap up repeatedly and move forward with each leap.


Solution

Create keyframes on the bug's Translate Y and Translate Z channels. Set four keys on the Translate Y channel so the bug is stationary, then moves up along the Y axis, moves back down to zero, and then holds for a number of frames. In the Graph Editor, set the Post-Infinity option for the Translate Y channel to Cycle. Create a similar set of keyframes for the Translate Z channel on the same frames. Set the Post-Infinity option for Translate Z to Cycle With Offset.


Preview animations with Playblast

Playblast is a tool for viewing the animation as a flipbook without having to actually render the animation. F Check is a utility program that is included with Maya. Playblasts can be viewed in F Check.


Master it

Create a playblast of the mechBugLayers_v04.ma scene.


Solution

Open the mechBugLayers_v04.ma scene from the chapter5\scenes directory on the DVD. Rewind the animation and create a playblast by choosing WindowsPlayblast. Watch the playblast in FCheck.


Use driven keys

A driven key is a keyframe that uses the attributes of one object as an input instead of time. Using driven keys you can automate many parts of an animation that might otherwise be tedious.


Master it

Create an alternate automated walk cycle for the mechanical bug so that when it walks sideways (along its Translate X), the legs automatically move in a crablike fashion.


Solution

Use the same techniques used to create the walk cycle described earlier in the chapter. Use the Translate X channel of the bodyCtrl curve to drive the Translate X and Translate Y channels of one of the legs. Use the Pre- and Post-Infinity options to cycle the leg animation. Copy the animation to the other legs, and then use the Graph Editor to offset the animation for each leg.


Animate with expressions

Expressions are a powerful way to automate the movement of an object. Using conditional statements you can create an expression that causes the animation to react to changes in the scene automatically.


Master it

Create an expression to randomly rotate the bug's eyes up and down. Make the rotation faster based on the height of the bodyCtrl curve.


Solution

Create an expression on the Translate Y channel of the eyeAimLoc locator in the mechanicalBug rig. The expression should read as follows:

eyeAimLoc.translateY = (bodyCtrl.translateY*noise(time));


Animate with motion paths

Motion paths allow you to attach an object to a curve. Over the course of the animation the object slides along the curve based on the keyframes set on the motion path's U Value.


Master it

Make the bug walk along a motion path. See if you can automate a walk cycle based on the position along the path.


Solution

Draw a curve in a scene with the fully rigged mechanical bug. Attach the bodyCtrl curve to the curve using Animate Attach To Motion Path. Create set driven keys for the leg animation, but instead of using the Translate Z of the bodyCtrl curve, use the U Value of the motion path node.


Use animation layers

Animation layers are a new feature in Maya 2009. Using animation layers you can add new motion that can override existing animation or be combined with it.


Master it

Create animation layers for the flying bug in the mechBug_v08.ma scene in the chapter5\scenes directory on the DVD. Create two layers: one for the bodyCtrl curve and one for the legsCtrl curve. Use layers to make the animation of the wings start with small movements and then flap at full strength.


Solution

Open the mechBug_v08.ma scene. Select the bodyCtrl curve. In the animation layers create an empty layer. Select the BaseAnimation layer, select the bodyCtrl curve, and choose Layers Extract Selected. Do the same for the legsCtrl curve and the wing motors. Set keyframes on the weight of the layer that contains the wing motors. Keyframe the weight from a value of 0 to a value of 1 over 20 frames.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial