Introduction


Last installment we concentrated on modelling the Sentinel. This involved using NURBS and polygons in Maya together to create the main part of the character, but not all of it. The reason for this is that we will be duplicating the parts not yet modeled, but only after we have rigged them for animation; there's no point duplicating the geometry un-rigged because we'd have to rig all the duplicates one by one which is a waste of time.
Rigging is the process of setting up a model so that it can be animated. Although you can animate the position and orientation of a model directly, for more complex movements such as jointed limbs and wavy tentacles there is a better way. This involves using Joints (also called Bones in some apps). Joints are non-rendering, helper objects that can be placed inside the model and subsequently used to animate it. Once correctly placed inside the geometry you want to animate, the model is 'bound' to the joints in a process called Skinning. The model's geometry is then called the Skin, and the joints the Skeleton.
When the skeleton's joints are rotated the skin moves with them because it is bound to the skeleton. This is however a fairly complex process, and it involves some careful planning which is why character rigging and animation is one of the more difficult and demanding tasks in 3D graphics. However our tutorial is made slightly easier because the character does not walk on the ground, so the accuracy of the animation is not as critical as if we were animating a human biped.
Having said that we've made it at simple as possible to follow along, download the scene files if you get stuck or ask me for help using the contact form at the end. If you don't have Maya yet you can download the free version, Maya PLE from Autodesk's website. Click here to go to the download page.

back  next

Step 1


Open the file Start2.mb*** from the Scenes directory which, the archive or which you can download using the link at the start of this page (just click the 'index' link below to go back). This is the Sentinel in more or less the state we left it in the Part 1 tutorial. To begin we'll concentrate on the leg so in the Layers section below the Channel Box on the right of Maya's interface (click the button in the very top right corner if the Channel Box is not visible) click on the V icon in the SentinelBody layer to turn it off.

index  back  next

Step 2


When animating it's best to get rid of any History (the modelling process Maya stores for an object) so in the Outliner (click the Outliner/Perspective button at the left side of the interface) locate Leg1 group, select it and choose Edit>Delete By type>History. The Model is now clean and ready to be rigged.

index  back  next

Step 3


Switch to Four view and press the f key (with your mouse over each view in turn) to fit the Leg in the center of the view, zoom in if necessary, then tap the space bar over the Side view. Click the Animation tab of Maya's 'Shelf' and click on the Joint tool (7th from the left). In the Side view click at the top of the leg on the first joint then click each joint in turn to place the skeleton. There are four joints (the round parts) connected by three 'bones'.

index  back  next

Step 4


Press the w key to select the Move tool and tap the space bar to expand back to Four view. You'll notice the Joints do not lie in the Leg, so using the Move(w), Rotate(e) and Scale(r) tools reposition the Joints so that they match the leg as closely as possible. Use each view and the Red X scale handle to lengthen each bone. Start with the topmost bone then work your way down. This scene is Leg2Joints.mb***.

index  back  next

Step 5


Next, select the topmost joint (which selects all the joints) and then shift-select the Leg1 group in the Outliner (the Joints should turn white indicating they are selected still). Make sure the animation menu set is active (F2) then choose Skin>Bind Skin>Rigid Bind. The Leg will turn purple.

index  back  next

Step 6


Click the IK Handle tool on the Animation Shelf (8th tool, next to the Joint tool) then click on the topmost joint (the green sphere, not the bone) and then the very last joint. An IK handle will be created with a line connecting the two joints. Click to select the IK handle and move it in the view (press w for the Move tool). The Leg should move with the joints as the rotate. Check the scene Leg2Bound.mb***.

index  back  next

Step 7


Now, we need to make some adjustments so first select all the joints and choose Skin>Got To Bind Pose to reset the rotations. In the Outliner click to select the CLAW group inside the Leg1 group. It is no longer bound to the skeleton (move it and press command-z to undo). In the Outliner middle-drag the CLAW group and drop it onto the ikHandle1 object. Now if you move the IK handle the CLAW moves too, but you can also rotate the CLAW group because it is not bound.

index  back  next

Step 8


To duplicate the leg and it's rigging you must do the following, which is not intuitive so pay attention. In the Outliner select the Joint1 AND ikHandle1 (this will select all the joints), but not any of the leg geometry. Choose Edit>Duplicate [option box] and in the panel select Group Under World and Duplicate Input Graph. The latter is most important. Set the number of copies to 1 then click the Duplicate button.

index  back  next

Step 9


In the Outliner you'll see a new Joint5 group and ikHandle2 object. Select them both and move them forwards in the 3D view, the leg geometry has been copied too and moves right along with the joints. You may get an error with the shading as we have here. To fix this select the offending geometry and choose (Rendering menu set [F5]), Lighting/Shading>Assign Existing material>Lambert1.

index  back  next

Step 10


Turn on the visibility of the Main Sentinel again in the Layers panel. Double click the Joint1 and rename it BackLeg, and do that same renaming the duplicate MidLeg. Select MidLeg and move it into position on the body. Next open the MidLeg hierarchy in the Outliner and command-click to select each joint, the Effector AND the CLAW geometry (but no other). Use the Scale tool to scale the leg down slightly.

index  back  next

Step 11


Repeat this whole procedure again to make a third leg (duplicate the original not the copy). Now, we can create the Right set of legs in a similar way. Select each joint chain and effector of each leg then run Duplicate once more. With everything still selected enter -1 in the Scale X attribute in the Channel Box. The legs will be mirrored across the ZY plane. Move them to the opposite side. See the file All_Legs.mb***.

index  back  next

Step 12


Next we'll set up the grasping claws. Choose Create>Locator and position it near to the left front side of the Sentinel. Select all of the Claws of the Left set of legs (not the claw groups but the actual claw geometry). In the animation menu set (F2) choose Animate>Set Driven Key>Set [options box]. The Set Driven Key panel opens.

index  back  next

Step 13


Notice that the claws are already loaded in the Driven section. Now, select just the Locator, and click the Driver button to load it. Select the Locator in the Panel and highlight the ScaleX attribute in the right column of the panel. The Select all six claw object in the Driven panel and highlight the RotateZ attribute. This now links the Locator's ScaleX to the Claw's RotateZ attributes.

index  back  next

Step 14


To make the Set Driven Key feature work you must keyframe the positions that you want to control. So click on the Locator in the main 3D view, press r key (Scale) and scale the Locator down. Reselect all the claws, switch to the Rotate tool and drag the blue Z rotate axis arc to close the claws fully, then click the Key button in the Set Driven Key panel.

index  back  next

Step 15


Now repeat, this time scaling the Locator up quite a bit and setting the widest you'd like the claws to open and setting a key. Now select the Locator and scale it up and down: the Claws will open and close. You can view the Set Driven Key animation curve in the Graph Editor view, and edit it if need be. repeat for the Right set of legs with a new Locator. See the file Grasping.mb***.

index  back  next

Step 16


You can test out the motion of the legs by selecting each opposing pair of IK Handles and moving them about. We noticed that the upper legs foul on the body too easily but this was easily rectified by editing the Polygon Smooth Proxy body object to give more clearance. This modification is also in the Grasping.mb*** file.

index  back  next

Step 17


Hide the body and the legs using the Layers palette (Select all the leg rigging, right-click on the Leg Layer and choose Add Selection to Layer) and show the tail if hidden. In the Outliner open the Tail group, select all the subgroups then choose Edit>Ungroup.

index  back  next

Step 18


Select the Tail group again and in the Animation menu set choose Deform>Non Linear>Wave. Using the Four view rotate and move the Wave deformer so it is aligned along the tail and the center is at the start of the tail. Click the wave1 item in the Channel Box, and enter 0.3 in the Amount field and 1 in the Dropoff and Dropoff Position Fields. The tail is deformed.

index  back  next

Step 19


To animate the wave you need to keyframe the offset attribute. Select the Wave deformer, make sure your are at frame 0 in the TimeSlider, click on 'Offset' to highlight it in the Channel Box and then right-click on it, choosing Key Selected from the pop up. Move the timeslider to frame 14 and right-click again on 'Offset' and set another key.

index  back  next

Step 20


Choose the Perspective/Graph layout from the views tool bar and click on the Offset attribute if its not selected. Type a to fit all in the graph. Select the keyframe at frame 14 then enter -1 in the Value box at the top of the graph editor view. Play the animation to see the wiggle.

index  back  next

Step 21


To make it wiggle continually select the last key on the anim curve and choose Curve>Post Infinity>Cycle with Offset. Too see what's going on, choose View>Infinity. You'll see a blue dotted line extending off past the last key. That's the extended value which will continue as long as the animation plays. Press Play to see the result (extend the range by typing 300 in the right side of the range slider bar).

index  back  next

Step 22


To add more swish to the tail animate the RotateX attribute of the Wave handle in the same manner above, 360 degrees over 30 frames enabling Cycle with offset. Select the Tail group, wave handle and the TailSockets group and group them using Edit>Group. Name it MainTail.

index  back  next

Step 23


Select the Tail group, WaveHandle and TailSockets object within the group and Duplicate them using the same options as before (Duplicate Input Graph, New Group). Create three duplicates and move them into position at the back of the body. In each Wave deformer vary the wavelength, and the offset keyframe position (eg move them to frame 15, and 13 etc) to add some variation, but not too much. You can add as many tails as you like, but it will slow down the display, four is fine. Check the scene GraspingB.mb***.

index  back  next

Step 24


To give us a little more control over the tails we'll add a lattice deformer. Select each of the Tail groups (just the geometry group not the group containing the Wave deformer), and choose Deform>Lattice [options box]. Set the divisions to 2,2,5, disable Local Mode, Enable Center Around Selection and set Outside mode to Transform All Points. Click Create.

index  back  next

Step 25


A lattice is created around the tentacles. In the outliner you'll see 'ffd1Lattice' and ffd1Base', select both and then using the Rotate tool in Side view rotate the Lattice to roughly match the tails.

index  back  next

Step 26


If you select the ffd1lattice and press F8 to enter component edit mode you can select some points and move them. The tails will deform the more you move the points. command-z to undo the move.

index  back  next

Step 27


Because the lattice is just like geometry we can deform it using joints or Non Linear deformers. Select the ffd1Lattice and choose Deform>Non Linear>Bend. In the Channel Box select the Bend item and increase curvature to 2. Rotate the handle so the the bend direction is along the lattice, move the center to the body end and set Low Bound to 0.

index  back  next

Step 28


Finally we need to group everything correctly. Select all the body objects and group them (Edit>Group). Name it BODY. To prevent a double transform on the body itself, open the pCube1SmoothProxyGroup and middle-drag the polySurface1 out of the group you just made.

index  back  next

Step 29


Select all the objects except the polySurface1 and the ALL_LEGSgeom group and create another group called SENTINEL. This can be selected and moved to animate the entire Sentinel.

index  back  next

Step 30


The Sentinel is more or less setup ready for some animation, which we will do in the next installment. To see your wiggling tails in realtime, you can choose Window>PlayBlast and set the options there to quickly render an OpenGL movie. See the final file TailsB.mb***.

index  back  next

Notes

Creating IK Tails


Another way to animate the tails involves using IK chains. The best option is to use the Spline IK handle. In order to get a smooth deformation we need to have a joint for each section of the tail, like so.
The Spline IK handle is added like any other IK handle except when created it adds a Spline curve along the chain of joints. The tail is bound to the joint chain using Smooth Bind option as normal.
To animate the tail you don't move the IK handle, instead you select the points of the curve and move these. Because points can't be keyframed directly you create Clusters for each of the points (or groups of them) and animate the clusters.

index  back  next

Notes

Using a Wrap deformer


Because the geometry of the tail is quite dense the more you add the slow animation becomes. What you need is a stand in object that looks like a tail but is much lower in resolution, such as this low-res polygon cube. The cube is divided along it's length so it will deform nicely.
Instead of binding the tail to the joints you can bind the low-res proxy object using a Spline IK rig. As you move the points (using Clusters) on the Spline the low-res cage object is deformed as normal, but the tail which is not bound stays as it is.
All you need to do is select the tail then the proxy object and choose the Wrap Deformer. This makes the cube an 'envelope' for the tail which is deformed by it as the proxy is in turn deformed by the joint chain. You can now assign the tail to a layer and turn off it's visibility making the display much quicker. When rendering you simply turn off the proxy display and enable the tail.

index  back  next

Notes

Deformers


The deformer approach to animating the tails is dictated by the animation we want to create. Because we know the tails will not be interacting with objects or doing anything complicated we can get away without using IK chains.
Rigging a character is as much a creative process as modeling is. There is no right or wrong way to do it so what works best for a given character and animation is the right solution. This does make it a difficult skill to learn because it's difficult to offer hard and fast rules that can be applied by a novice animator. Like most things you have to learn by making mistakes, which can make this kind of animation frustrating at first. The good thing about Maya is that you can mix and match different kinds of controls be they deformers, joints or dynamics, to suit the job at hand.
Dynamics - Dynamics is a term used to describe motion that is controlled by rules of physics and not by hand-keyed animation. In Maya, to make dynamic animation you need to make an object either a soft (it will move and deform) or rigid body (it will move but not deform) and add a force field or some other influence such as a collision between it and another object.

index  back  next

Notes

All the scene files mentioned in this tutorial can be downloaded as a zip archive here.

index  back  next

Notes

The are no more notes for this tutorial.

index  back  next

Images


You can download a zip archive of the high-res images for this tutorial here.
Images are supplied for instructional purpose only and are not to be re-distributed without permission.
Please leave a comment if you found it useful by opening up a feedback form here.

index  back


Tutorial and images by Simon Danaher ©2006