Tutorial “natural accelerations”

by Codo

This is a sequel to the tutorial of day 2:
“How to create natural animations for human characters”

Acceleration

One of the most common reasons for weird animations are mistakes in accelerations and wrong reactions to outer accelerations.

Often, animations are made like this: You give the start and end point of the movement, and the program calculates the movement between those points. This may lead to an even distribution of the movement to the frames or keys (anchors of the animation).

Example: A body should move along a straight line. If you let a program calculate the movement, you may get a distribution like this. The arrow points into a room direction, for example the x-axes, the numbers stand for the frames.

This looks evenly. But this is often bad. Today we want to find out how it could be done better. We have to do a little theory, but this is done quickly.

Acceleration — Theory

First we have to clear the definition. What is an acceleration? It is a change of movement. But when does a movement change? The answer can be divided into two parts:

Change of Velocity

If you drive onto the highway, you increase the speed. Thus you feel how your body gets pressed against the seat. If the car is going with a constant speed, you don't feel any pressure any longer, even if you are driving with 180 mph on a German highway.

A slowdown is also a change of speed. In common usage it isn't called acceleration, but physically braking is an acceleration, too.

Change of direction

This is an acceleration, too. You feel it inside a car if you drive through a turn. A body that is moving with constant speed in a circle gets constantly accelerated.

Remember: A body that is moving on a straight line and with constant speed does not get accelerated.

Inertia

We know about accelerations, and we can derive inertia directly from it. Everything with a mass does not want to get accelerated. A still body just wants to stay still.

Remember: The heavier a body is, the more force is needed to move it.

But it does not want to get stopped, if it is already moving. And it wants to stay moving on a straight line.

Remember: A moving body wants to keep moving in a (straight) path. You need force to decelerate it or to change its direction.

Acceleration in Animations

We are done with the theory. Now let's try what we can do with this knowledge.
A whole human body has inertia. Thus you have to use force to move it or to change movement. But single body parts as arms or legs have inertia.

And how to we use acceleration and inertia in practice? Essentially, it is quite easy. Just avoid movements that accelerate from 0 to 100 (or backwards) in 0 seconds. This is the case in the diagram above, if you assume that the cube is laying still at the beginning and at the end.

Remember: An accelerated movement starts slow and gets faster and faster.

In a diagram it looks like this.

In the first frames the body does not cover much distance, but the distances get bigger and bigger. If you want to know it accurately: The covered distance gets bigger with the square of the time (multiplied with a factor that determines the amount of acceleration).

Example:

Deceleration is this process backwards.

Stop, would that not mean that the body moves with unlimited speed after a while? Yes. But in reality the friction causes the body to move with a constant speed after a while.

For comparison: This is a movement without acceleration.

The covered distance gets bigger with a constant value after each frame.

Of course, not all bodies accelerate with the same rate. The more force is used and / or the lighter the body is, the bigger is the acceleration. You don't have to calculate, but you should get an intuitiv knowledge how accelerated movements look like.

Remember: All movements have a phase of acceleration and deceleration. All of them!

Sometimes those phases are very short, but they are still there. This is true not only for the whole body but also for single body parts. The bigger and heavier they are, the more distinct the inertia should be.

How a human body initiates movements

Now we want to look how we can use the theory to improve the animations of human characters.

Possibility 1) Movement of muscles

Muscles are the base of every movement, but here only movements are meant that start only by contraction of muscles. An example is a jump out of a crouch.

Possibility 2) Gravity

You can use gravity to start or support a movement. An extreme example is the start of a sprinter. I found this stamp on Wikipedia:

Nobody could possibly stand in this position (see first tutorial). But why this extreme tilt of the body? Leaning forward in the acceleration phase prevents falling back. Imagine somebody standing up straight. If his legs suddenly started running, the upper body would stand still due to inertia, and the legs would run away beneath him. Thus, the sprinter has to lean forward that gravity compensates this effect. The closer he gets to his final speed (the smaller the acceleration gets), the more erect is his sprint. This is not an option but a necessity.

Possibility 3) Preparation

Preparations are movements that go into the seemingly wrong direction to initiate the actual movement. This can have different reasons.

Here an example for a typical preparation movement. Before the jump, Lara puts her arms behind her back and throws them upwards during the jump phase. The arms create an acceleration into the direction of the jump so the movement gets supported.

Deceleration

The human body is quite complex, thus deceleration is not the same as acceleration. Of course, there are still the same rules working, but you can find some simplified, typical types of movements, too.

Possibility 1) Muscle tension

Our muscles can not only initiate a movement but also stop it. If you animate it to abrupt, it looks not authentic.

A nice example is the forward roll from sprinting into crouching.

Lara is already in the end position in phase 2, but her body still wants to move on due to inertia. You can see her upper body tilt in phase 3 forward, what she then compensates by muscle tension. This subtle movement makes the animation much more authentic as if Lara just “freezes” into the crouching position after such a fast prior movement.

Possibility 2) Gravity

You can use gravity to support a deceleration movement. This is also an example for a movement after sprinting. Lara tilts slightly backwards. If she would not move that fast, this position would be very instable.

Squeeeeaaak.

The force that would let Lara tilt backwards gets overlaid with the forward movement. So a part of the forward movement gets compensated and deceleration is made easier. Furthermore, letting a foot scratch over the floor creates a lot of friction, so movement energy gets even smaller.

Possibility 3) Preparation movement

This is true for deceleration, too. Look at Lara's arms when she reaches a floor after she was going down a slippery slope backwards.

Nothing works anymore?

Here are some tips on how to proceed when animations look strange, but you do not really progress. Sometimes you just can not see the forest for the trees when you have working around too long at something.

Let the animation run backwards.

Just as it can help with a drawing, turn it upside down or to look at with the aid of transmitted light from the back, a change of perspective can help to judge the animation objectively.

Let the animation run slow or fast.

A change in the temporal perspective can be useful, too. Especially the slow-running animation shows often errors in acceleration performance.

View single points

Depending on which program you are working, you have the option to look at so-called trajectories of the individual meshes. Here you can easily see if there are any phases in the movement that “tear off”. This have not to be mistakes but it's worth it to check such points.

Generally you can say that trajectories should rather describe circles, ellipses and loops. Even tight loops that are narrowed to turning points are usually all right. You should avoid squares or other polygons. Although the trajectory looks like the track of a drunken ant crawling should again look closer.

Do something else

Seriously. After a night or a walk later you are a better, own critic than after five hours of work marathon.


If you want to publish this text or parts of it elsewere, please ask Codo for permission previously!


As every year there is also the TRForge advent calendar contest. Achieve the matching challenge to every calendar door and collect points, to get the chance to win a great prize in the end! You can find more infos here: contest, or you can click on Lara at the calendar page.

daily challenge