'3D for Beginners': Creating the Hitme Character

In the latest excerpt from 3D for Beginners, authors Carol MacGillivray and Anthony Head delve in creating the Hitme character.

All images from 3D for the Web by Carol MacGillivray and Anthony Head. Reprinted with permission.

All images from 3D for the Web by Carol MacGillivray and Anthony Head. Reprinted with permission.

Creating a Quirky Character for Flash

A single character can be fun on the Web. You can make a visitor interact by running looped films in Flash. The visitor can often be fooled into thinking they are interacting far more than they actually are, and you can manage to keep wonderful lighting and high polygon counts in your rendered films. The Whos We and Neostream sites are great examples of this.

In this next exercise, I built the Hitme character specifically for this purpose. He is animated using hierarchical links with bones for deformation, and sports the same eyes that we have just made. I started by making a sketch of the Hitme character (Figure 1).

The idea behind the Hitme character, as the name suggests, is that the Web visitor can amuse themselves by tormenting him. When designing the character, I knew that I wanted something that would be fun to animate in extremes. Because I had no restrictions on materials, lighting or polygons, I have used Raytrace materials and a lot of Mesh Smooths giving a high poly count.

[Figure 1] The original sketch for the Hitme character, and the finished article.

[Figure 1] The original sketch for the Hitme character, and the finished article.

I have given the character a spherical body for bounce and expressive hands for waving around; the white gloves will make his hand movements register more (A trick Disney used for Mickey Mouse). I decided against the writing on his stomach, as I want him to appeal globally, instead I have given him glossy stripes that emphasize his roundness, and are reminiscent of Uderzos Obelix or Tenniels version of Tweedledum and Tweedledee. The feet are large, as he needs a stable base and will not be walking around. Having built the character in 3D, I thought his throat looked kind of vulnerable and needed breaking up, so I also gave him a red bowtie. Also, I must confess that red bowties have the same effect on me as red rags to a bull; I invariably feel like hitting anyone who wears them. Perhaps my audience feels the same, and if not, hey, I can indulge myself it is my character!

[Figures 2 & 3] Making the head from a polygonal box (left), before adding a Mesh Smooth modifier. Moving the pivot point (right).

[Figures 2 & 3] Making the head from a polygonal box (left), before adding a Mesh Smooth modifier. Moving the pivot point (right).

Creating the Hitme Character

Most of the character is made from simple spheres and cylinders. The feet, hands and head are made with polygonal modeling from boxes, and then adding a Mesh Smooth modifier (Figure 2).

Before linking and fitting bones to the character, I moved the pivot points on some objects so that the centers of rotation would be in the right place for animation. As shown when you aligned the eyes, the pivot point can be moved to anywhere you want, which is a helpful tool particularly for animating rotations. To move a pivot point, select the object, go to Hierarchy and click on Affect Pivot Only (Figure 3). Now you can move the pivot point to any new desired position in a viewport. Click off Affect Pivot Only.

Note It is essential that any adjustments to pivot points are made before animating, as it is not a parameter that is animatable.

I dropped the pivot point for the characters body to the bottom of the sphere, and moved the pivot points on his feet to where his ankles would be. The arms pivot from the joints and the lower mandible from the hinge through his jaw (Figure 4).

Before we add some bones for mesh deformation and link it all up, let me explain how linked hierarchies animate in 3D.

[Figure 4] Positioning the new pivot points.

[Figure 4] Positioning the new pivot points.

Forward and Inverse Kinematics

When you create a linked hierarchy, you are in effect making a series of parent-child links, where the parent drives the child. If you imagine this series of links as tree branches spreading from a single trunk: the trunk is parent to the boughs, the boughs are parents to the branches and the branches are parents to the twigs. In Forward Kinematics the last link in the chain, the twig, will inherit any rotations you make to any of the parents. Similarly moving the last link, the twig, will not affect any other part of the tree.

In Inverse Kinematics, as the name indicates, the situation is reversed and the child drives the parents. This makes it a wonderful tool for animating walks and allowing characters to interact with objects. For instance, it would be difficult for a character to point to a place on a map if you started by rotating the shoulder joint, then worked your way down the hierarchy to the finger. Inverse Kinematics allows you to move the finger to the correct position and it solves how the other joints or parents move. I will talk more about this in Chapter 6. We will be animating the Hitme character using Forward Kinematics, because he does not need to walk or interact with any object.

[Figure 5] Creating bones.

[Figure 5] Creating bones.

Select the mesh for the hands and the head and lower mandible and freeze it by R-clicking in a viewport and choosing Freeze Selection. The mesh will turn a uniform gray. Freezing the mesh stops us selecting it while we create and adjust the bones. Bones are found under the Create Panel > Systems (Figure 5).

Note Bones are a jointed, hierarchical system that can be used to deform mesh objects with the addition of a Skin or Physique modifier. They offer a quicker solution to animating using Forward or Inverse Kinematics as you can apply ready solvers in the program.

Click on Bones and, in a side viewport, create a row of three bones traveling from the bottom of the head to the jaw-bolt by Click-dragging. Continue following the line of the head and upper jaw with a further six bones. (R-click to stop creating bones.) Now click back on the head of the third bone, and you will be able to create another chain of bones for the lower mandible, emanating from the same jaw-bolt pivot.

Note The first click in a viewport defines the start of a bone, and the second click defines the start of the second bone. Visually it will look like you have created only one bone, as the bones drawn are merely visual aids defining a linked hierarchy between pivot points. Each new bone created is a child of the previous bone.

[Figure 6] Positioning the bones.

[Figure 6] Positioning the bones.

Top Tip

Position hands, or any object that is to be boned, so that the mesh runs parallel to a viewport. Then create all of the bones in that viewport.

Make sure that you check the position of the bones from the other viewports too, the better they fit now, the easier it will be to fit and manipulate the mesh.

Top Tip

The first bone (in this case at the bones in the wrists and neck) are Parents. Each subsequent bone is in a Parent > Child chain. When creating chains of bones, try and connect them in natural chains so the program will label them in sequence and they will be easier to identify later.

[Figure 7] The Hitme head hierarchy.

[Figure 7] The Hitme head hierarchy.

Now let us link the whole character together. Typically all characters are linked to a parent that starts at the hip. In the Hitmes character that means linking the feet to the body and linking the neck sphere to the body. Everything else is linked in sequence to the Neck sphere. The bones already have a linked hierarchy, and you only need to link the three parent bones at the wrists and the neck to the next bone in the hierarchy. Thus each wrist bone is linked to the lower arms, then the lower arms to the elbows, the elbows to the upper arms and the upper arms to the neck. Link the hair and the eye Master Dummy to the nearest bone so they do not get left behind (Figure 7).

Note that we do not link the mesh for the hands and the head, as they will be bonded automatically to the bones when we have added the Skin or Physique modifier.

Applying the Skin Modifier

There are two ways of fitting a mesh to bones in 3ds Max: Skin and Physique.

Note Physique is a modifier that comes with Maxs Character Studio and I describe fitting a Mesh with that in the following chapter. I find the Physique interface more adaptable and faster to use, it can be used for bones or biped and exports more easily to Shockwave. However, here we will use the Skin modifier, as we do not need to worry about exporting to Shockwave.

[Figure 8] Adding the Skin modifier to the left hand.

[Figure 8] Adding the Skin modifier to the left hand.

Unfreeze the mesh and add a Skin modifier to the left hand mesh. Click on Parameters > Add, and select the relevant bones from the Selection List. In this case the bones required are Bones 35-52 (Figure 8).

Now click on Edit Envelopes, which will highlight in yellow. Click some of your selected bones, one at a time and observe what happens in your viewports. Each bone comes equipped with two default envelopes, an inner, bright red one and an outer dark red one. All vertices that fall inside the inner envelope will be 100% influenced by that particular bone, with a falloff in the outer envelope. If you click on the Weight Table you will see that each vertex has been assigned a weight by the Skin modifier and that Weight corresponds to particular bones. For a vertex to be influenced 100% by a bone, it will be given a value of one. A value of zero means there is no influence.

The reason the Skin modifier deforms a mesh is typically because the envelopes of adjoining bones overlap causing the vertices in the mesh to be influenced by more than one bone. You can change the weights by typing in different values in the table (but that is rather too labor intensive for our uses). There are several other ways of fitting these envelopes and adjusting weights. Select vertices and the middle bone of the middle finger (Figure 9).

[Figure 9] Bone 41 with Select > Vertices on.

[Figure 9] Bone 41 with Select > Vertices on.

You should be able to see that while the inner envelope is only affecting the relevant vertices in the finger, the falloff in the outer envelope also means that the bone is influencing vertices in the adjacent fingers. We could bring the outer envelope in by selecting its cross-sections and scaling them inwards with the Scale tool or changing the radius, but fitting hands to bones is about as fiddly as it gets when using the Skin modifier, and frankly it is easier to change these settings at vertex level, bone by bone.

Marquee-select all the vertices in the adjoining fingers (it does not matter if you pick up more than were being influenced) and click on the button marked Exclude Verts. They will lose their color and turn into black outlined squares, this means they are now excluded from the bones influence.

Top Tip

Lining up your hand with the grid in the viewport will make it much easier to marquee-select vertices when fitting the Skin modifier.

Select each bone in turn and eliminate any unwanted influences from nearby bones inside the mesh, so the mesh for each finger is only influenced by the bones running through it. The hand bones can stay as they are, as you want them to assist the finger bones. If you make a mistake, you can select any vertex and assign it to a bone with the Include Verts button.

Check the bones are deforming the mesh well by selecting some bones and rotating them. Now go through the same process with the other hand. (It is not possible to copy or mirror a mesh with bones attached in Studio Max 5.)

You can use the same method for fitting the bones in the head of the character, or adjust the envelope size as suggested earlier. The bones should fit a lot more effectively anyway and there is no problem of unwanted overlapping influence as the jaw mesh has its own set of separate bones. The most likely problem, if any, is that some vertices escape having any bone influencing them at all.

To correct this, it is necessary to adjust the size of the envelope. To do this, again select Edit Envelopes, select the bone and this time click in one of the red squares of a cross-section in the viewport. The cross-section will highlight in pink and the Envelope Properties > Radius spinner is made operable. Crank the spinner up until you have captured any stray vertices that had escaped. This can be done interactively whilst you view the effect in the viewport.

Fit the jaw in the same way, and check everything is working properly.

To learn more about designing and making characters, check out 3D for the Web by Carol MacGillivray and Anthony Head; Burlington, Massachusetts: Focal Press, 2005; 328 pages with illustrations and CD-ROM. ISBN 0-240-51910-8 ($36.95). Check back with Animation World Magazine frequently to read new excerpts.

Carol MacGillivray was already a successful film editor before forming the pop video production company, Giblets with three friends who were animators and directors. Giblets specialized in combining media, mixing live action with 2D and 3D animation in an almost pre-digital era. Although they worked with many stars, Giblets, are most famous for bringing about the re-release of a trilogy of Jackie Wilson songs, starting with the clay animation video for Reet Petite that was a number 1 hit in 1987. Carol still has the gold disc hanging in her loo! After teaching at the Royal College of Art, Carol became interested in the new digital technology and was given an AHRB award to study an MA in Digital Moving Image at London Guildhall. She is now a senior lecturer in Digital Animation and Digital Arts at The London College of Music and Media, Thames Valley University.

Anthony Head worked in design and printing industry for seven years before pursuing his digital art full time, he has a First in BA Digital Art and a Distinction in MA Computer Art, awards include D&AD Student Award for E-Toy Design 2001, Peterborough Prize for Digital Art, joint prize with Jeremy Gardiner for Purbeck Light Years. A digital artist who combines creative intelligence with a strong design background, Anthony specializes in interactive 3D and immersive environments. He recently exhibited at SIGGRAPH 2004, Art Gallery Synaesthesia and has won many cans of Pepsi for a digital picture of The Haywain for Amiga Format Magazine! Anthony is course leader at Bath Spa University College Design for Digital Technologies, after being a fellow Lecturer in Digital Art at Thames Valley University.Both Anthony and Carol are passionate about their roles as teachers, keen to pass on their knowledge and share ideas and information. They are equally passionate in their role as learners; digital media moves so quickly and there is always something new just around the corner.