Animation Get moving, literally........
Mats Tage Axelsson helps you pick up the basics of animation techniques, starting with the fundamentals: the ball bounce and walk cycle.
Mats Tage Axelsson helps you pick up the basics, starting with the classics: the ball bounce and walk cycle.
By the end of this article you’ll have learnt how to animate a boy walking up to a basketball hoop, before shooting and scoring. This may not sound like much, but as you’ll soon discover, there are many details to consider because we have to create and control everything that the viewer sees on the screen.
The scene is built up from a background and contains people and objects: a playing field, a ball, a basketball hoop and the boy. Each element is relatively simple to draw – the ball is just a sphere, after all – but to make it exciting we need to think how much it deforms when it’s bouncing on the ground, and how it flies through the air.
There’ll be little interest from the viewer if the boy simply starts to walk up to the hoop. Anticipation is needed to bring an animation to life. Imagine you’re about to shoot for a hoop: first you’ll bend your knees and then move your head between the ball and the target. All this becomes important when you need to make sure it all looks correct in every frame. Remember that you’ll have to deal with 24 frames per second, although we can play a little with that.
Making an animated ball squeeze and stretch as it bounces on surfaces is a way to liven up the action. In real life, you won’t notice this amount of change in form, but it’ll help to make the ball much more interesting when animating. The best way to illustrate animation is to use either cube or stick figures. Yes, even a cube can look happy or sad at the hands of skilled animators!
You’ve probably seen an animation example where a cube has been drawn to the right side of a page and then a copy next to the first cube is drawn, only it’s skewed like jelly. If you want to make this look really good, you need to draw the bottom of the cube a little further than the top and allow the sides to bend. This way the entire cube will seem to bend, making the cube elastic and lifelike. Adding a few thin lines behind the cube conveys the feeling of speed.
Keyframes save a day
When drawing many frames, you do need at least ten frames per second to generate a clean and smooth motion. However, drawing every frame soon becomes tedious. Keyframes help to alleviate the workload when animating with computers, as we learned in the animation Roundup from issue LXF225.
Keyframes are the positions that are most obvious to your animation. For example, when you turn a head from one side to another, the keyframes will be the start position, one position in the middle and one at the end. The number of keyframes will depend on your balance between how much work you want to do and how much control you want over your character. Fewer keyframes can result in either jerky or a less-realistic motion. Going back to the head-turn, if you make only three keyframes then you may end up with the head turning without any initial nod or final double stop.
You may be wondering why this is important. It’s because any movement we make is initiated by preparation. So, before you turn your head, you’ll nod or go the other way a tiny bit.
Film yourself or someone you know, preferably in slow motion, and you’ll see this phenomenon in action. This is called anticipation and is essential to make movements look realistic, and also to develop the story.
One example could be to have your character look out of the frame to lead the story on to the next scene. Another way to show this is to make a stick figure walk. To make it look really active the character needs to start from a standing still position, and as the figure starts walking there’s an initial small bend of the knees. This causes the head to dip slightly. This dip is also useful to show off during walking, and when running it creates an even more life-like effect.
Stick to walking
For a stick figure to walk you should start by figuring out the walk cycle. When you walk, you bend the foot, knee and hip to different degrees. This seems obvious but the details are quite subtle and therefore tricky to get right. The best way to handle this is to study video of someone walking. You can even stand up [what?!–Ed] yourself to see what it looks like.
In Synfig you need to create all your elements. Then give each one a rotating point and in the case of the legs, group everything with the thigh on top. When the thigh rotates it takes the rest of the group with it, making the whole leg move. Copy the leg and make it rotate opposite of the other leg by shifting the keyframes over by half the step length.
Repeat the process for the arms and you have a walking stick figure. Sounds easy enough… until you try it for the first time! But after some practice you should be able to put together more complex animation actions.
For a full character animation, you may want to show the secondary motion of other parts of the character. The simplest demonstration of this is to draw a cube and have it bend like jelly at the start and stop points. Imagine the boy preparing to shoot: he bends his knees and his hair moves a fraction, just enough to show that this is a complete character.
To make environments you may also want to make use of Bézier curves. Although they form the basis of a mathematical model, many objects in nature act according to these curves. By using Bézier curves and other calculations you can achieve a high degree of realism with less work.
This works the same way for trajectories as well as for the shape of plants such as grass. If you need a big field you can choose to make an overall picture or paint one blade at a time. However, if you use a Bézier curve to describe each straw then you can create just a few straws, make them slightly different and add some variety with the help of random generators. You soon produce a field of grass that appears to feature individually drawn grass blades, when in fact there are only a few different ones.
The flight of a ball, or anything that’s thrown, has the trajectory of a parabola until it hits an object like a wall. The only exception is when taking the wind into account – and even then it will be similar. The easiest way to draw this in software is to use Bézier curves.
For characters drawn outside of Synfig, you need to take your character apart and add “bones” to them. The same goes for Blender. The process was described briefly in last month’s animation Roundup.
This is only to make Synfig know where to bend the drawing and to what extent. An example of what effect it has is if you’ve drawn trousers that are a little wrinkled at the knee, then the program can change the wrinkles according to the bend. We’ve made a simpler example for this article that’s only a stick figure, and this enables us to move and rotate the different parts of the character.
Once you’ve finalised the design and decided on the first pose, the initial keyframe is set. Now move on to setting the next keyframe. This can be several frames away because Synfig will fill in the blanks for you. Just don’t forget to add the little extra movements at the beginning and end of each action to make it more life-like. Your character will, in this case, bounce a ball, take a few steps, bend his knees and then aim to shoot at the hoop.
When preparing for the throw, the boy will bend down a little, just to add energy and balance to himself and the ball. For precision, the left hand will support the ball and the right hand will shoot. The boy is right-handed. The scene is also filmed from the player’s right-hand side. To draw this we first decide where to place the player, then where he’s going to move and finally the path of the ball in the air. The trickiest part of the path of the ball is to handle bounces, so for simplicity, our hero will score straight without bounces.
At the start of the scene the boy holds the ball and as he starts to aim he also leans slightly backwards to line up his sight between his hands and the basket. Bending the arms in a realistic motion requires a well-defined curve for the arms that stretches out towards the basket. The ball will move at an upwards angle and fly in a parabola across the scene to just above the ring, before sliding through the net beneath. After the point is scored , the boy will jump with joy and the ball will bounce and roll on to the field. Finally, the boy will run to the ball, pick it up and walk away from the camera.
We already bounced a ball sideways across another scene. Now we need to bounce it straight up and down, so that later the boy can catch the ball in preparation for the shot.
Continuing in Synfig, we create the ball as a separate object and add a transform layer and a rotation player to the ball. This layer will then be used to set the position of the ball throughout the scene. The hands will be synchronised with the ball manually, so remember to make the bounce look real.
To lift the ball, you need to synchronise the figure with the ball motion. To do this in Synfig, you need to move around the keyframes and change the scene one frame at a time to get it right. Fortunately, you only have to change a few of the keyframes to achieve a realistic result.
This action happens after the ball has bounced a few times, so you must set a new keyframe where the ball’s just returned to the boy. Even here, several things happen. First, the boy’s hands will grab the ball. Second, his knees will bend a little. Third, his head will turn up to face the hoop. Fourth, the arms will rise and fall. Fifth, the hands will turn to a forward motion and finally, the ball will fly across the scene. If you don’t take the time to plan out this detailed scene, the work to animate it quickly becomes complicated.
If a scene features several moving objects, you need to set up collision detection. In Synfig, however, putting the ball in the characters hand is entirely up to you. There’s nothing stopping you from having the ball go through the hands or vice versa. This means we need to set the position of the ball behind the hands and then launch it, along with the expected trajectory so that it hits the basket in a realistic manner.
Putting together a plan of all the objects moving in the scene is useful here, because this will enable you to create fresh keyframes for all the action elements in the scene. Adjusting a path that’s already been created can quickly get confusing, and may lead to less-than-ideal results.
The Physics tab in Blender enables you to handle all types of materials and what happens to them when they move. For a ball flying through the air, you start by putting it in the scene and assigning it an initial speed. You can also choose to exert a certain force on it, or even make it collide with an object.
Keep it simple sticky
Starting with a stick figure is convenient for several reasons. The simplified form will help you formulate its movements, and it’ll also place less of a demand on your hardware.
To make the movements look real you need to base the movement on how the character moves. The best way to see that is to draw the skeleton and then pay attention to how the joints work. Reading up on human anatomy is very useful for an animation artist, even if you’re working with an alien!
When you decide how the movement should proceed, you need to know where the limitations are so it looks lifelike. If you don’t then your audience will disengage from your story and you’ll have wasted your time with the project.
After the character’s movements are well balanced for your story, you can start modelling. This work is tedious and most of it will be done by drawing still pictures, before filling out the details afterwards. To make your character look realistic you need to add clothes, a face and skin.
Making everything take on a lifelike appearance will help your viewers relate to your characters. For a 2D picture, you need to draw the characters with gradients to convey the feeling of shape. There are always shades that change slightly across the surfaces, so these are best described by gradients.
Remember to shade them in the same direction over the entire scene. If you don’t then your viewers will think that your characters are slightly out of place. You should decide at a very early stage where the light sources are so you can shade your characters correctly. Remember to add ground shadows too, and then use those shadows as a reference for the gradients of all other elements in the scene.
It’s in 3D when the word ‘modelling’ truly comes into its own. 3D models start with primitives, such as cubes, spheres and cones. These are then edited in a number different modes so you can create every detail. When you want to make your characters head, you usually start with a sphere that’s divided by lines. These are your references. By following the lines and bending them, you’ll be able to make facial features such as a cheek. It may be useful to make the nose from a separate element, though. These shapes are all defined as meshes, which then enables you to calculate reflections.
All meshes start out with a number of faces, and the initial number needs to be as low as possible. This is because each face takes up memory and when you start with a high number, performance suffers. When you need finer details, add them during the process rather than at the start. Another solution is to use a plugin that contains human models, which you can fine-tune to match the look of your character, but modelling is a huge field of its own and we’ll save that for another day, happy animating!
Stick it to the man.
Here’s how to change the shape of a ball when it’s bouncing. Control the amount of exaggeration so that it suits the style of your current animation.
When making your characters walk, make sure that the motion begins naturally, such as bending slightly before lifting a leg to stride forwards.
To make characters come alive, add secondary movement in, for example, a hat. Note also that the character bounces slightly through each walk cycle.
Using Tupi, you can set a trajectory for an item, and Tupi will create the frames using a feature called a tweening ball.
Here you can see a grass field being created using the mid-point technique. In Blender, the method is called NURBS.