An­i­ma­tion Get mov­ing, lit­er­ally........

Mats Tage Ax­els­son helps you pick up the ba­sics of an­i­ma­tion tech­niques, start­ing with the fun­da­men­tals: the ball bounce and walk cy­cle.

Linux Format - - CONTENTS - Mats Tage Ax­els­son Mats Tage Ax­els­son has spent decades mak­ing his com­put­ers run Linux. In the last issue, he showed you what an­i­ma­tion soft­ware to use. Now, learn to an­i­mate.

Mats Tage Ax­els­son helps you pick up the ba­sics, start­ing with the clas­sics: the ball bounce and walk cy­cle.

By the end of this ar­ti­cle you’ll have learnt how to an­i­mate a boy walk­ing up to a bas­ket­ball hoop, be­fore shoot­ing and scor­ing. This may not sound like much, but as you’ll soon dis­cover, there are many de­tails to con­sider be­cause we have to cre­ate and con­trol ev­ery­thing that the viewer sees on the screen.

The scene is built up from a back­ground and con­tains peo­ple and ob­jects: a play­ing field, a ball, a bas­ket­ball hoop and the boy. Each el­e­ment is rel­a­tively sim­ple to draw – the ball is just a sphere, af­ter all – but to make it ex­cit­ing we need to think how much it de­forms when it’s bounc­ing on the ground, and how it flies through the air.

There’ll be lit­tle in­ter­est from the viewer if the boy sim­ply starts to walk up to the hoop. An­tic­i­pa­tion is needed to bring an an­i­ma­tion to life. Imag­ine you’re about to shoot for a hoop: first you’ll bend your knees and then move your head be­tween the ball and the tar­get. All this be­comes im­por­tant when you need to make sure it all looks correct in every frame. Re­mem­ber that you’ll have to deal with 24 frames per sec­ond, al­though we can play a lit­tle with that.

Mak­ing an an­i­mated ball squeeze and stretch as it bounces on sur­faces is a way to liven up the ac­tion. In real life, you won’t no­tice this amount of change in form, but it’ll help to make the ball much more in­ter­est­ing when an­i­mat­ing. The best way to il­lus­trate an­i­ma­tion is to use ei­ther cube or stick fig­ures. Yes, even a cube can look happy or sad at the hands of skilled an­i­ma­tors!

You’ve prob­a­bly seen an an­i­ma­tion ex­am­ple 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 re­ally good, you need to draw the bot­tom of the cube a lit­tle fur­ther than the top and al­low the sides to bend. This way the en­tire cube will seem to bend, mak­ing the cube elas­tic and life­like. Adding a few thin lines be­hind the cube con­veys the feel­ing of speed.

Keyframes save a day

When draw­ing many frames, you do need at least ten frames per sec­ond to gen­er­ate a clean and smooth mo­tion. How­ever, draw­ing every frame soon be­comes te­dious. Keyframes help to al­le­vi­ate the work­load when an­i­mat­ing with com­put­ers, as we learned in the an­i­ma­tion Roundup from issue LXF225.

Keyframes are the po­si­tions that are most ob­vi­ous to your an­i­ma­tion. For ex­am­ple, when you turn a head from one side to another, the keyframes will be the start po­si­tion, one po­si­tion in the mid­dle and one at the end. The num­ber of keyframes will de­pend on your bal­ance be­tween how much work you want to do and how much con­trol you want over your char­ac­ter. Fewer keyframes can re­sult in ei­ther jerky or a less-re­al­is­tic mo­tion. Going back to the head-turn, if you make only three keyframes then you may end up with the head turn­ing with­out any ini­tial nod or fi­nal dou­ble stop.

You may be won­der­ing why this is im­por­tant. It’s be­cause any move­ment we make is ini­ti­ated by prepa­ra­tion. So, be­fore you turn your head, you’ll nod or go the other way a tiny bit.

Film your­self or some­one you know, prefer­ably in slow mo­tion, and you’ll see this phe­nom­e­non in ac­tion. This is called an­tic­i­pa­tion and is es­sen­tial to make move­ments look re­al­is­tic, and also to de­velop the story.

One ex­am­ple could be to have your char­ac­ter look out of the frame to lead the story on to the next scene. Another way to show this is to make a stick fig­ure walk. To make it look re­ally ac­tive the char­ac­ter needs to start from a stand­ing still po­si­tion, and as the fig­ure starts walk­ing there’s an ini­tial small bend of the knees. This causes the head to dip slightly. This dip is also use­ful to show off dur­ing walk­ing, and when run­ning it cre­ates an even more life-like ef­fect.

Stick to walk­ing

For a stick fig­ure to walk you should start by fig­ur­ing out the walk cy­cle. When you walk, you bend the foot, knee and hip to dif­fer­ent de­grees. This seems ob­vi­ous but the de­tails are quite sub­tle and there­fore tricky to get right. The best way to han­dle this is to study video of some­one walk­ing. You can even stand up [what?!–Ed] your­self to see what it looks like.

In Syn­fig you need to cre­ate all your el­e­ments. Then give each one a ro­tat­ing point and in the case of the legs, group ev­ery­thing with the thigh on top. When the thigh ro­tates it takes the rest of the group with it, mak­ing the whole leg move. Copy the leg and make it ro­tate op­po­site of the other leg by shift­ing the keyframes over by half the step length.

Re­peat the process for the arms and you have a walk­ing stick fig­ure. Sounds easy enough… un­til you try it for the first time! But af­ter some prac­tice you should be able to put to­gether more com­plex an­i­ma­tion ac­tions.

For a full char­ac­ter an­i­ma­tion, you may want to show the se­condary mo­tion of other parts of the char­ac­ter. The sim­plest demon­stra­tion of this is to draw a cube and have it bend like jelly at the start and stop points. Imag­ine the boy pre­par­ing to shoot: he bends his knees and his hair moves a frac­tion, just enough to show that this is a com­plete char­ac­ter.

To make en­vi­ron­ments you may also want to make use of Bézier curves. Al­though they form the ba­sis of a math­e­mat­i­cal model, many ob­jects in na­ture act ac­cord­ing to th­ese curves. By us­ing Bézier curves and other cal­cu­la­tions you can achieve a high de­gree of re­al­ism with less work.

This works the same way for tra­jec­to­ries as well as for the shape of plants such as grass. If you need a big field you can choose to make an over­all pic­ture or paint one blade at a time. How­ever, if you use a Bézier curve to de­scribe each straw then you can cre­ate just a few straws, make them slightly dif­fer­ent and add some va­ri­ety with the help of ran­dom gen­er­a­tors. You soon pro­duce a field of grass that ap­pears to fea­ture in­di­vid­u­ally drawn grass blades, when in fact there are only a few dif­fer­ent ones.

The flight of a ball, or any­thing that’s thrown, has the tra­jec­tory of a par­a­bola un­til it hits an ob­ject like a wall. The only ex­cep­tion is when tak­ing the wind into ac­count – and even then it will be sim­i­lar. The eas­i­est way to draw this in soft­ware is to use Bézier curves.

Lovely bones

For char­ac­ters drawn out­side of Syn­fig, you need to take your char­ac­ter apart and add “bones” to them. The same goes for Blender. The process was de­scribed briefly in last month’s an­i­ma­tion Roundup.

This is only to make Syn­fig know where to bend the draw­ing and to what ex­tent. An ex­am­ple of what ef­fect it has is if you’ve drawn trousers that are a lit­tle wrin­kled at the knee, then the pro­gram can change the wrin­kles ac­cord­ing to the bend. We’ve made a sim­pler ex­am­ple for this ar­ti­cle that’s only a stick fig­ure, and this en­ables us to move and ro­tate the dif­fer­ent parts of the char­ac­ter.

Once you’ve fi­nalised the de­sign and de­cided on the first pose, the ini­tial keyframe is set. Now move on to set­ting the next keyframe. This can be sev­eral frames away be­cause Syn­fig will fill in the blanks for you. Just don’t for­get to add the lit­tle ex­tra move­ments at the be­gin­ning and end of each ac­tion to make it more life-like. Your char­ac­ter will, in this case, bounce a ball, take a few steps, bend his knees and then aim to shoot at the hoop.

When pre­par­ing for the throw, the boy will bend down a lit­tle, just to add en­ergy and bal­ance to him­self and the ball. For pre­ci­sion, the left hand will sup­port 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 de­cide where to place the player, then where he’s going to move and fi­nally the path of the ball in the air. The trick­i­est part of the path of the ball is to han­dle bounces, so for sim­plic­ity, our hero will score straight with­out bounces.

At the start of the scene the boy holds the ball and as he starts to aim he also leans slightly back­wards to line up his sight be­tween his hands and the bas­ket. Bend­ing the arms in a re­al­is­tic mo­tion re­quires a well-de­fined curve for the arms that stretches out to­wards the bas­ket. The ball will move at an up­wards angle and fly in a par­a­bola across the scene to just above the ring, be­fore slid­ing through the net be­neath. Af­ter the point is scored , the boy will jump with joy and the ball will bounce and roll on to the field. Fi­nally, the boy will run to the ball, pick it up and walk away from the cam­era.

Bounc­ing balls

We al­ready bounced a ball side­ways across another scene. Now we need to bounce it straight up and down, so that later the boy can catch the ball in prepa­ra­tion for the shot.

Con­tin­u­ing in Syn­fig, we cre­ate the ball as a sep­a­rate ob­ject and add a trans­form layer and a ro­ta­tion player to the ball. This layer will then be used to set the po­si­tion of the ball through­out the scene. The hands will be syn­chro­nised with the ball man­u­ally, so re­mem­ber to make the bounce look real.

To lift the ball, you need to syn­chro­nise the fig­ure with the ball mo­tion. To do this in Syn­fig, you need to move around the keyframes and change the scene one frame at a time to get it right. For­tu­nately, you only have to change a few of the keyframes to achieve a re­al­is­tic re­sult.

This ac­tion hap­pens af­ter the ball has bounced a few times, so you must set a new keyframe where the ball’s just re­turned to the boy. Even here, sev­eral things hap­pen. First, the boy’s hands will grab the ball. Sec­ond, his knees will bend a lit­tle. Third, his head will turn up to face the hoop. Fourth, the arms will rise and fall. Fifth, the hands will turn to a for­ward mo­tion and fi­nally, the ball will fly across the scene. If you don’t take the time to plan out this de­tailed scene, the work to an­i­mate it quickly be­comes com­pli­cated.

Col­li­sion de­tec­tion

If a scene fea­tures sev­eral mov­ing ob­jects, you need to set up col­li­sion de­tec­tion. In Syn­fig, how­ever, put­ting the ball in the char­ac­ters hand is en­tirely up to you. There’s noth­ing stop­ping you from hav­ing the ball go through the hands or vice versa. This means we need to set the po­si­tion of the ball be­hind the hands and then launch it, along with the ex­pected tra­jec­tory so that it hits the bas­ket in a re­al­is­tic man­ner.

Put­ting to­gether a plan of all the ob­jects mov­ing in the scene is use­ful here, be­cause this will en­able you to cre­ate fresh keyframes for all the ac­tion el­e­ments in the scene. Ad­just­ing a path that’s al­ready been cre­ated can quickly get con­fus­ing, and may lead to less-than-ideal re­sults.

The Physics tab in Blender en­ables you to han­dle all types of ma­te­ri­als and what hap­pens to them when they move. For a ball fly­ing through the air, you start by put­ting it in the scene and as­sign­ing it an ini­tial speed. You can also choose to ex­ert a cer­tain force on it, or even make it col­lide with an ob­ject.

Keep it sim­ple sticky

Start­ing with a stick fig­ure is con­ve­nient for sev­eral rea­sons. The sim­pli­fied form will help you for­mu­late its move­ments, and it’ll also place less of a de­mand on your hard­ware.

To make the move­ments look real you need to base the move­ment on how the char­ac­ter moves. The best way to see that is to draw the skele­ton and then pay at­ten­tion to how the joints work. Read­ing up on hu­man anatomy is very use­ful for an an­i­ma­tion artist, even if you’re work­ing with an alien!

When you de­cide how the move­ment should pro­ceed, you need to know where the lim­i­ta­tions are so it looks life­like. If you don’t then your au­di­ence will dis­en­gage from your story and you’ll have wasted your time with the project.

Af­ter the char­ac­ter’s move­ments are well bal­anced for your story, you can start mod­el­ling. This work is te­dious and most of it will be done by draw­ing still pic­tures, be­fore fill­ing out the de­tails af­ter­wards. To make your char­ac­ter look re­al­is­tic you need to add clothes, a face and skin.

Adding re­al­ism

Mak­ing ev­ery­thing take on a life­like ap­pear­ance will help your view­ers re­late to your char­ac­ters. For a 2D pic­ture, you need to draw the char­ac­ters with gra­di­ents to con­vey the feel­ing of shape. There are al­ways shades that change slightly across the sur­faces, so th­ese are best de­scribed by gra­di­ents.

Re­mem­ber to shade them in the same di­rec­tion over the en­tire scene. If you don’t then your view­ers will think that your char­ac­ters are slightly out of place. You should de­cide at a very early stage where the light sources are so you can shade your char­ac­ters cor­rectly. Re­mem­ber to add ground shad­ows too, and then use those shad­ows as a ref­er­ence for the gra­di­ents of all other el­e­ments in the scene.

It’s in 3D when the word ‘mod­el­ling’ truly comes into its own. 3D mod­els start with prim­i­tives, such as cubes, spheres and cones. Th­ese are then edited in a num­ber dif­fer­ent modes so you can cre­ate every de­tail. When you want to make your char­ac­ters head, you usu­ally start with a sphere that’s di­vided by lines. Th­ese are your ref­er­ences. By fol­low­ing the lines and bend­ing them, you’ll be able to make fa­cial fea­tures such as a cheek. It may be use­ful to make the nose from a sep­a­rate el­e­ment, though. Th­ese shapes are all de­fined as meshes, which then en­ables you to calculate re­flec­tions.

All meshes start out with a num­ber of faces, and the ini­tial num­ber needs to be as low as pos­si­ble. This is be­cause each face takes up mem­ory and when you start with a high num­ber, per­for­mance suf­fers. When you need finer de­tails, add them dur­ing the process rather than at the start. Another so­lu­tion is to use a plugin that con­tains hu­man mod­els, which you can fine-tune to match the look of your char­ac­ter, but mod­el­ling is a huge field of its own and we’ll save that for another day, happy an­i­mat­ing!

Stick it to the man.

Here’s how to change the shape of a ball when it’s bounc­ing. Con­trol the amount of ex­ag­ger­a­tion so that it suits the style of your cur­rent an­i­ma­tion.

When mak­ing your char­ac­ters walk, make sure that the mo­tion be­gins nat­u­rally, such as bend­ing slightly be­fore lift­ing a leg to stride for­wards.

To make char­ac­ters come alive, add se­condary move­ment in, for ex­am­ple, a hat. Note also that the char­ac­ter bounces slightly through each walk cy­cle.

Us­ing Tupi, you can set a tra­jec­tory for an item, and Tupi will cre­ate the frames us­ing a fea­ture called a tween­ing ball.

Here you can see a grass field be­ing cre­ated us­ing the mid-point tech­nique. In Blender, the method is called NURBS.

Newspapers in English

Newspapers from Australia

© PressReader. All rights reserved.