Featured1

Creating a Spell Casting Animation for Games

‌‌
Taking on a game animation is a challenging task. There are many things that need to be considered. In this article you will learn some of the most important steps involved with animating a body mechanics shot with an emphasis on game use. The shot in this article will cover steps for a character casting a spell, similar to what you would see in your favorite MMO. The animation needs to not only be entertaining but also practical. The frame budget we are going to be working with is 170 frames, which is a generous amount to what you would typically see for a game animation. When approaching some type of attack move for a game you need to be able to get back into that default attack stance as soon as possible. For example, if this character is going to be casting a spell during that time, then they will be vulnerable to the AI or other player, so you need to be able to get back into that attack stance from the spell cast so you can continue to fight. (Purchase this issue of 3D Artist Magazine which includes this tutorial and many others)

Step 1: Shooting Reference & Creating the Character

Step1 As with any animation one of the most important steps is to first shoot video reference. You don't need a high-tech camera for this. Something as simple as a cell phone will do just fine. When shooting video reference you want to act out the move as many times as possible, explore different ideas and play around. Don't be shy! Chances are no one will ever see your video reference, so break into the character of a wizard or mage. How would they act? Not many people get the chance to act like a wizard, so have fun with it! Get some inspiration from your favorite video game. If you really want to get into this character you can create a back story for him or her. How old are they? What type of spell caster are they? Are they evil or good? These types of questions can help you come up with some action choices for them.

Step 2: Thumbnail Sketches

Step2 For this blocking pass there are just sixteen main key poses that were created. That was all that was needed in order to be able to properly tell the story, while still staying simple enough to where the animation is manageable. The timing used for this was based solely on the timing in the video reference. Since this is a type of animation that would be used for a game there are two shot cams established in the scene, the first one being a perspective camera, and the other being a game camera, which is a view that would typically be scene in an MMO or RPG. Remember, that in a game your animation is probably going to be seen from all angles, so it needs to work well from any of them.

Step 3: Blocking in the Main Key Poses

Step3 The breakdowns are vital for not only explaining how the character is getting from one key pose to the other, but also the spacing for each action. A more generic placement of a breakdown is smack in the middle of two key poses, which is not really incorrect but to be able to have more control over your animation and not let the computer take over you need to think more logically with your breakdowns. Is the character going to slow into the next key pose, or slow out? Making those choices early on in your breakdown pass will give you much more control over how your animation looks.

Step 4: Adding the Breakdowns

Step4 The breakdowns are vital for not only explaining how the character is getting from one key pose to the other, but also the spacing for each action. A more generic placement of a breakdown is smack in the middle of two key poses, which is not really incorrect but to be able to have more control over your animation and not let the computer take over you need to think more logically with your breakdowns. Is the character going to slow into the next key pose, or slow out? Making those choices early on in your breakdown pass will give you much more control over how your animation looks.

Step 5: Quick Curve Cleanup Pass

Step5 Up until this point the animation has been in stepped mode. Since this animation is focused on body mechanics it is often easier to work in stepped mode all the way through the breakdown pass. Now that the breakdowns are in, you can convert your keys to an interpolated curve. In this case, we've used the Auto Tangent type. It can be scary when you hit that convert button, but if you put enough information into your breakdown pass you shouldn't run into any surprises. You can spend this time tweaking the curves; remember to start with the center of gravity control. If you run into gimbal lock you can fix it easily with the Euler Filter.

Step 6: Further Adjusting Timing

Step6 Now that the animation has been converted from stepped tangents you may start to see that your timing isn't working in certain areas. Up until this point the timing has been based off the video reference, while it may look great in your reference, it doesn't always mean the timing will work in the actual animation. In our case we've tweaked the timing to work better. The pose when her arms are raised has been held a few frames longer, and the timing for when she gets into the crouched position has been sped up quite a bit. Since there hasn't been any extra poses added it is still very easy to adjust the timing.

Step 7: Adjusting the Translate Y

Step7At this point, there is likely to be quite a few hiccups in the spacing for center of gravity control. Let's first focus on Translate Y the up and down. There are two major areas where the spacing for the up and down movement is critical, the first being the dip down. The spacing we want for this is somewhat similar to a bouncing ball, when she comes down the spacing needs to be spread out at the bottom of the arc, but the opposite needs to happen when she pushes herself up. The spacing needs to be tighter at toward the beginning of the arc, and spread out at the top, because she is pushing off with her leg, and needs to build up that force. The second area is during the slight jump back at the end, the spacing for this needs to be tighter at the top and spread out when her weight starts to fall, the same way you would animate a bouncing ball. This ensures that her weight is correct.

Step 8: Adjusting the Forward Movement

Step8 Another critical area that you need to adjust first is the Translate Z for the center of gravity control. This controls her movement forward. Generally this needs to be a very smooth curve. Play your animation frame by frame and take a close look at her hips, make sure that there are no places where the hips come to a stop during her forward movements. In our case when she lunges forward the hips came to a stop for several frames, causing a very jerky movement into that push forward. An easy way to fix this is just to make sure that the Translate Z curve is smooth and there are no inconsistent values.

Step 9: Tracking the Arcs for the Arms

Step9 A lot of the movement that is happing is in the arms, because of this you need to make sure that they are traveling in nice arcing motions. Since this is where the spell is being cast from there should be no jerking movements or inconsistent arcs, because they will stick out like a sore thumb. A great way to track the arcs for your arms is to use the grease pencil tool inside Maya. Or if you want to take a more do-it-yourself approach, depending on your monitor, you may even be able to use a dry erase marker to draw directly on your screen.

Step 10: Adding Drag, and Lead and Follow

Step10 At this point in the animation in may feel like things are all happening at once, like the body is moving as one unit, so you need to break up the movements a bit. Start incorporating lead and follow into the animation. For example, when the arm moves have the shoulder move one frame ahead. This will add that touch of believability to it. The same for the elbow have it start to move after the arm has moved. You can also start to add in some drag in various places. For example, have the head drag a few frames behind the rest of the body's movement.

Step 11: Final Character Polish 

Step11 The final step is to add the finishing touches, the final polish to help push this spell cast over the top. Now track all the arcs, not just for the arms, but the feet, head, etc. Adjust any spacing, and make sure your graph editor is cleaned up. At this point the animation is completely fleshed out, so don't be afraid to add in any extra keyframes. There has been quite a bit of polish done on the hands and fingers. Up until this point they've stayed in relatively the same pose throughout the animation.

Step 12: Adding a Simple Particle Effect to the Animation

Step12 What is a spell cast without a spell? To really sell the animation we are going to add a very simple particle effect. If this animation was to be used for a game, it would most likely be done in the game engine. But in this case let's create one in Maya. You can use a simple Polygon Sphere and apply a fire effect to it in your Dynamics menu. Using the default settings for the fire it will create a really cool looking fireball effect. Hide the Sphere and now you will have just the fireball, play around with the settings if you are trying to get a different result. Once you are happy with how the fireball looks you can now hand animate the fireball to follow between her hands.