Animating the Run Cycle
Want to animate a character's run cycle? Need real-world tips and tricks for Lightwave or 3D Studio MAX? Look no further. Jason Zirpolo takes you through the steps of creating a game character and modeling realistic running movements for it. This article is based on a lecture that he gave at the Game Developers Conference on the subject.
Recently I gave a lecture at the GDC in San Jose and had several people tell me that it was very helpful for them. So I refined the notes I created for that particular lecture to share this information with the rest of the gaming community who may want to know more about the animation end of things.
Now, I don't claim to know it all, but I can tell you what I have learned over the years. Hopefully, some of my tricks and techniques will help to keep your producers loving your work and keep your projects on schedule.
Part 1 – Know Your Limits
There are many things to consider when you begin to take on the task of animating for a real-time 3D video game. The most important is to know your limitations defined by the game engine.
By limitations, I mean how many polygons can the character be, and how many frames can the animation be as well as other issues defined by the engine. Before beginning the animation you should sit down with the lead programmer and discuss what limitations you will have to deal with. This will help you plan your animation and what tools you will be using, give you some insight as to what you can and cannot do when animating, and it will save you time and energy if both you and the programmer are in sync.
Early on in the project it is important to determine what software you will be using as well as what tools can be utilized.
An example of some questions that should be addressed:
Are feet sliding an issue or will the feet slide as in "Quake"?
Can you make use of IK or bones and will the engine read this data?
Will the characters be segmented or single-skin?
How many frames do I have to animate this character?
What is the final format that the game engine will read in?
Are we going to make use of MOCAP?
Once you know your limitations and tools you can begin to animate the run given the parameters you have to work with.
Part 2 - Setup
Once you have some guidelines it is time to begin. The first thing you must do is setup your character to animate.
This may be as simple as linking all the sections together in a hierarchy or as complex as creating a bone structure and assigning weighted vertex clusters to the bones. Again, the level of setup required will be determined on the game engine and your discussions with the lead programmer and your style of animating.
When setting up a character to animate I try to build an IK structure that will allow me to have a lot of freedom when animating. Some of the more important issues I try to build into my skeletons are the ability to rotate the elbow and the knee once the hand and foot is positioned. (see figure 1) A good IK structure will allow you to do this without interfering with the position of the hand or foot once it is placed.
If you are using Character Studio with 3d Studio MAX then this particular ability is built right into the biped. Image A represents the posed figure after I have positioned the arms and feet where I want them to be. In image B, I have simply selected the lower leg and rotated it about the x axis, thereby altering the position of the knee. Notice though, that the feet have not moved an iota. This is very nice to be able to do and a good setup should allow you to work this quickly. By allowing yourself the ability to pose the elbow where you want it without having to then go back and reposition the hands or feet you will be saving yourself countless hours.
NOTE: Other limitations present themselves when you use biped. So don't expect this to be an end all be all or a way for you not to have to learn IK setups.
It is also a good idea to have a few nodes in your structure set aside to just move the body. I use one to move the upper body (including the hands and elbows) up and down, and another to move the entire body.
Depending upon how you feel comfortable animating you may even split your nodes up to just animate the up and down and another to animate the forward movement. The amount of control you desire is up to you and after several tries at setups you will find a setup that becomes comfortable.
I recommend you experiment early on in the design phase of the game so you can settle on a setup style that works well. Then you can begin to save out a general "rest pose" with the character already set up so you can begin each animation quickly and not have to worry about the set up process ever again. This will speed up your production time immensely. It also makes it easy to go from one animation to the next seamlessly. Constantly having to rebuild the setup structure is not fun. Make one well, and use it over and over.
Spend a good deal of time fleshing out a structure that is fluid. A strong foundation is KEY to creating solid animation, and I cannot stress enough how important a good skeleton can be. If you are constantly having to fight your setup to get the character in a pose you want then your setup is flawed and should be rethought. However, once you have found a style that works you will never have to worry about it again. A good setup can be used over and over for a variety of different animations.
Part 3 - Begin
Now that you are happy with your setup it is time to begin the run.
I am going to assume a 20 to 30 frame cycle is what you have to animate with. Should you have less frames to work with you can adjust the timing to suit your needs.
First thing I do is create a dynamic run pose on the first frame. This pose is usually, the just-about-to-land on the right or left foot pose. (see figure 2)
Once I have a good first frame that I feel looks dynamic, I copy that frame to the end of my animation range. This will ensure that the loop is seamless. The only important thing to remember is to render or export the range from the first pose to the frame right before you just copied that pose to. So in a 30 frame example frames 1-29 would get exported.
Hips
The most important thing to animate first is the hips. I begin by fleshing out the timing by moving the hips. I animate the forward motion and the up and down motion first. Once those are solidly in place, you can begin to further refine the hip's movement by adding the rotations. The hips rotate up and down and forward and back for each stride. As one leg rotates forward the hip also rotates with that leg. As the leg compresses on the hit the hip rotates down on the hit side and up to compensate for the lifting leg on the other. (see figure 3) Note the Opposite angles of the shoulders and the hips. Also note the line of action should be strong and dynamic.
Study live action or other animation to see the subtle moments that take place in the hips.
Legs
Once the hips are animated, it is time to animate the legs. Usually, it can be enough to animate one leg cycle and then copy the animation to the other leg and offset its animation. When animating the legs and feet try to put some personality into the stride. Does the character swing his foot wide when he comes off the ground? Does the character have bow legs? Little things like curving the foot as the character takes a stride can add some looseness to the look. A classic example of curved feet is the way goofy runs. His feet almost flop around. Extremely loose feet.
Also, remember to use squash and stretch in the legs to show the weight of the character. While animating the legs you may need to go back and make readjustments to the hips. Just remember that if you alter the first frame you will need to go back and recopy that first frame pose to the last frame.
NOTE: Also when animating, I like to try and keep it simple and block out the entire range with a few set keys. This helps me to quickly see the motion and timing and weather or not the animation works as a whole. Then I go back and refine on a per frame basis, making small adjustments and whatnot to ensure consistency and tightness. Things like making sure the feet are planted perfectly and follow a perfect path are some of the last steps I take. Also things like subtle foot rotation would fall into the refining stage of development.
Spine
Once you have the hips and legs working, more or less, it is time to add the spine rotations. Remember that the spine always, for the most part, works opposite to the hips. So for example, if the character is posed with his right leg extended and his hip is rotated to further extend the leg, then the spine will be rotated in such a way making the left shoulder come forward and the right shoulder will come back. For the most part, the upper shoulder line works opposite to the lower pelvic line. This is standard knowledge when drawing the human figure and should also be applied when animating it.
Again try to set only the extreme positions and work rough.
Head
The head also can help define the personality of the run. On each hit it will bounce a little and you try to emphasize the weight of the character by adding some bob into the head. The head bob usually happens a few frames behind the initial impact of the foot on the ground. Do plenty of test renders and watch the head to make sure you get your timing right.
A head that it pointed up at the sky could be used to show fear or panic, or one pointed down may show ignorance or determination. (see figure 4)
Most runs usually have the head looking where the character is running. And for the most part it tends to remain upright regardless of the rotation of the lower body.
Arms
The arm swing is one of the most important things you can animate in a run. It adds so much personality to the character that I can't stress it enough. As a rule of thumb the arms will swing in a pattern that is opposite to the legs. So for example as the right leg is forward the right arm will be on the back swing.
However, the arms will change according to the type of run you are animating. If the character is running for his life and scared you may want to animate the arms up in air flailing around. If the character is running while holding heavy objects you may want to animate the arms out in front of him, with little amount of swing.
Regardless, the arms give life to the run and you should have some idea of what they are going to do based on what your character is thinking. I suggest experimenting to see what results you achieve, and how dramatic a run can change just be the way the arms are animated.
Part 4 – Refine
After the entire run has been fleshed out, it is time to go back and add subtlety. Work on the hands and fingers if you have them in your character. Work on the feet and knee positions. Add side to side movement to the hips.
Continue to refine your animation until it is polished and feels good. With a solid foundation and few keys to capture the essence, it should be easy to go back in and clean it up and add some detail and personality.
NOTE: Also don't be afraid to delete keys.
Often times I would be trying to refine a particular part of an animation, and found I just had too many keys on too many different objects all working to hide what I wanted to correct or refine. So when this happens, just delete all the movement in the area on all objects and start fresh. Sometimes by deleting keys one by one from one object to the next you can begin to see where you need to focus your attention on. You may think that the moment you are trying to refine is in the hand but when really the movement is being generated by a combination of hip rotation and spine rotation. Refining one of those areas may allow you to smooth out the hand motion your were trying to.
Part 5 – General Tips and Information
"The basis of all action is posture, the broadest stroke of establishing mood. A change in posture, with all else remaining the same, can completely change the effect of a scene."
-Character Animation, by Doug Kelly
Use strong, dynamic poses
Timing is everything!
"KISS – Keep It Simple Stupid" – Walt Disney
Look at your animations in silhouette if possible
On the use of Plugins:
They can create SOME animation with less effort but often they tend to make animation too synthetic.
Sometimes the amount of control you lose by using the plugin is not worth the time you save.
Use wisely and be comfortable enough animating that you don't need the plugin or rely on it too heavily.
Don't lose your style to the plugin or tool… use the tool to enhance your style and push it even further.
No plugin can take the place of a good animator. Hand animating something is just part of what a good animator does. It may sometimes take a bit of extra work but the results are well worth the effort. Even the most clever of plugins just can't capture the "life" you can achieve by hand animating something.
Avoid the use of "twins"
Twins are when both sides of the body match and the motions are identical. (very boring)
LOOK!
Everywhere you go, take the time to watch people. Notice the subtle ways the move and express emotion. Look at the hand gestures they make when they talk. Body posture. All these traits and movement help to define the personality of a character and give him or her life.
In the case of a run: Look at the way a child runs on the playground and then go look at a football player running at a high school. Go to the mall and see 3 teenagers running to the car. All very different runs, all with their own style and personality. Try to capture some of that in the animation you create.
FILM!
Either use video you taped or rent some movies with the action you are trying to recreate but I cant stress enough that video reference helps. Don't copy it exactly or you will kill the life (ROTO) but notice what movements stand out and give personality to the character. Notice how weight shifts and moves. Study the video for timing. Then take what you learn and apply it to your own animations.
If you can, use video to act out what you want to animate, and then go back and look at yourself acting it out. What subtle motions do you see in the film that came out in you?
OTHER ANIMATION!
Watch other animation.
How do other animators accomplish what you are trying to do?
Study the techniques and timing tricks they use. Study how they exaggerated or simplified certain actions and how they solved the issues you are trying to solve.
Different animators have different styles. What do you like? Why? Try to incorporate what you like into your own style.
PRACTICE!
Nothing can take the place of practicing. You must take the time to build your skills and only by working hard and constant work can you expect to become better. Animation is like any muscle and only by constant workout can one become strong at it.
BE HAPPY!
Clear you mind when you sit down at the computer and focus.
Animation is an art form and takes an extreme amount of focus and patience. If you have 20 other things on you mind when you sit down to animate, how do you expect to create masterful work? Get yourself in a good frame of mind and the creativity will flow much more easily and your work will be much more productive. You will find you make far less mistakes and the ones you do make will be easily corrected. If you are frustrated, then take a break. Calm you mind and the answers to your problems will present themselves in time.
Specific Tips and Tricks
Lightwave
Lightwave is a great character animation tool despite what most people think. And for the price, it offers much to the gaming community. I have to recommend it highly if you are new to 3D and also if you may be working on a tight budget. The modeling package is one of the best I have seen for dealing with low poly objects.
When modeling your character, try to have him posed in a way that makes the limbs either horizontal or vertical. LW works off a world coordinate system, and this will make joint rotations much smoother of a process when you bring your character into the layout package, if everything is aligned to x,y, or z.. I usually position the arms straight out from the body, and the legs straight down. (See figure 5)
Holding down the ALT key in layout, makes the mouse and left button perform either pan, zoom or rotate, depending on which one you last clicked on. (Very useful) I hardly ever have to go out of perspective mode simply because it is so easy to just hold ALT, click, and rotate a bit around the character to get my bearings.
Clicking on center twice will center the view on an object and give you back control of the screen. I use this double click a lot when I want to look at a particular object and use the ALT-click-rotate to get a different perspective, quickly.
Puppet master is very nice if you are working with single-skin low-poly meshes. Combined with LW's IK, this combination can be very can be a very powerful production tool. It will also give you a good idea of how your model is going to deform in most game engines.
If you are using Lightwave's IK, then I suggest using a null at the wrist and another at the elbow. The ones at the elbows, I would parent to the chest. This method I have found lends itself nicely to producing fluid arm movement. The same can be applied to the legs. One at the knee and one at the ankle, with the one at the knee parented to the root.
When modeling use the W key in poly mode to isolate 2 point and 1 point polygons for clean up.
If you don't have one already, get yourself a 3-button mouse. The middle mouse button is useful for selecting and deselecting objects in the scene. (Also used a lot in 3D Studio MAX.)
If you terminate the shoulder and hips and make use of the 2 IK handles per joint, 9 times out of ten there will be no need to set limits. And if you should decide to set limits then use the Shift-[ and Shift-] to speed up the process of setting them. Shift-[ sets your minimum and Shift-] sets the maximum.
Another nice thing to do early on in the setup process is to turn off all the movement channels for the joints that only rotate. LW will remember the channels turned on and off when you save and exit. This will prevent a lot of hassle later down the road as you get into a groove.
I would also suggest starting the scene empty and creating all your IK nodes first. Then once they are all in. Start to bring in the pieces that make up your character in the order that they will be linked in the hierarchy. So for example I would create 1 null clone it 11 times for my IK handles and then bring in the root piece of the character. Then I would go out from there starting with the upper leg piece then the lower leg to the foot and toe. Once the legs were in I would bring in the sections that made up the torso… then the upper arm… lower arm… etc. etc.
This will add simplicity to your IK calculations and will also make for a clean setup when you need to scan the list of objects.
Shift-Cntrl-Alt-F1 turns on experimental features.
Once on, you can then use Shift-Cntrl-Alt-F3 to tweak your IK values. I use this function mainly when dealing with complex characters and complex multi-chain IK. You can turn the max number of IK iterations down to speed up workflow. Once your nulls are set and move the way you want them to, you can crank up the IK iterations much higher and then preview your work. Once satisfied you can set the IK high and render. But when working rough to get down your timing, keep it set low so you can work fast and get good performance screen redraws. The joint may not look perfect but once cranked up they behave the way they should. After a while you'll get a good feel and just be more concerned with the placement of your nulls.
Play with your goal strength values on objects that use IK. Usually, I set the feet objects at 50 and the knees at 2 or 5. This almost guarantees my feet won't slide.
3D Studio MAX
First off, I have to recommend this piece of software highly as a very well thought out and powerful game development tool. The staff at Kinetix has always bent over backwards trying to support any project or questions I have ever had. I am fully convinced it is the best cost effective tool to create quality game art. The internal scripting is extremely powerful and the SDK is easy enough for any programmer to learn and write tools for should they so desire. There are a ton of plugin developers who are writing free useful tools to speed up your work everyday. Should your budget permit, I would have to recommend MAX very highly.
The model pose in max should be as spread as possible. Make your fingers spread, your legs spread, and and arms straight out. The best way to describe it is the "Davinci Pose". This will make linking vertices to bones or a biped much much easier. Unlike LW, the pivot points have their own local axis, and each object or section can have its own local axis value. So spread the joints, it will save you time later. (See figure 6)
I can't stress this enough, but set up hot keys in the preference menu for as much as you can. The most important are pan view, rotate view, zoom view, x, y, z, and move, scale, and rotate. Getting fast with hot keys is the best way to gain speed in a production environment.
Turn off the annoying Non-uniform Scale warning in the preferences menu.
Turn on Zoom about mouse point.
Again, get a 3-button mouse.
The IK iteration technique discussed in the LW section can be applied to MAX's IK as well.
If you can, get Character Studio. It is one of the best plugins you can buy if you are going to be animating a lot of 2 leg characters. It works beautifully with mocap and makes mocap, I dare say, a pleasure to work with. The tools built into CS for animating bipedal characters are some of the most intuitive and useful I have ever worked with. The time you will save is well worth the investment for this plugin.
Build up a library of animations that you can draw from. Once a walk or run is created, try to store the animation in a way that allows you to call upon it again as a starting point for other characters who may need to walk or run. With CS its as simple as saving the .bip file once you are done. Then you can load it onto any other character regardless of size or shape. This alone can save you hours or days.
The default ambient level in MAX is usually set way too high and can make your scene look a bit washed out. When making textures, the first thing I do is set the ambient value to black.
Check out www.max3d.com for a wide variety of free plugins.
By switching from camera view to perspective view you can get your perspective view to match the camera view settings exactly.
With the camera selected you can go to views/match camera to view to get your perspective view to be a camera.
When animating with CS and using a Biped a good way to get the hips to swing and move is to animate the Bip01 root object and NOT the pelvis. Also when linking physique to a biped always link the physique to the pelvis and NOT the Bip01 root.
In CS using biped and in freeform mode, you can lock the feet and hands by setting a key and going into key info on the motion panel. There you find a kinematics section at the bottom of the panel. By clicking on object and setting the IK blend to 1.0 it will lock the object in place. Great for locking down hands and feet, and this is fully animatable.
Books I Seriously Recommend
The Animation Book, by Kit Laybourne
The Illusion of Life, by Frank Thomas and Ollie Johnston
How to Draw Animated Cartoons, by Preston Blair
Character Animation, by Doug Kelly
You can find a lot of reference material in the book store, and more and more books specifically geared toward computer animation are being written every day.
Fin
I wish you all luck in all your animations, and remember to have fun with this stuff. =)
When not animating for Westwood Studio's newest title NOX, Jason can be found enjoying the California rave scene and working on his own short stories. His past work has been shown in SIGGRAPH's Electronic Theater and other various film festivals. He has been playing video games since their dawn and loves making them. Jason can be reached at [email protected].
Read more about:
FeaturesAbout the Author
You May Also Like