Basics of animation creation

Creating some cool poses

Finally we'll get to the point. Now that you've had an overview of the software, we will dive into what makes a great animation, specifically on Pepper.

We still need to have some basic notions in mind, then we will start to animate!

1. Basics of animation

Animation is very important for application development. People are firstly attracted by the way the robot moves.

To build a good animation, you have to follow a few steps to be sure everything will work fine in the end.

First of all, ask yourself about how your own body moves. What part of your body moves with a particular limb, what are the side movements? For example, if your raise your arm, making a huge outside circle, you'll notice that your shoulder makes your arm move at first, then at 90°, your shoulder gets stuck, and it is your clavicle that carries the rest of the movement, giving you the feeling that your shoulder gets closer to your ear.

Animators studied anatomy and the mechanics of the movement. They first feel a movement when reproducing it with an artefact.

Regarding to the virtual animation, this will be translated by putting some good readable poses on the robot, and having a good overall timing.

2. Mindset

a. Methodology, a first step

Creating a good animation is like cooking your favorite meal. Even if it is the 50th time you cook, you still follow ordered steps or the meal is wrecked.

In animation, with a specific vocabulary, we have those kind of steps and advice to be sure everything will be fine.

First of all, your mindset is important. You have to think "General" before you dive into details. This is what animators call "General to Specific". This means that you have to think and build your general structure, the main keys, before trying to animate perfectly the timing of a single finger. This "backbone" is the first step, and it is called breakdown.

After that, we'll set the general timing of the animation, and our first step, ou structure, will be complete and we'll be able to dive in a little bit with the second step of the methodology.

b. Breakdown

This is the first step of an animation build.

You want to do a new animation, and you just have the overall idea, so you start by putting the desired poses as keys (keyframes) on the timeline. I like to put a new pose every 25 frames (regarding the fact that 25 frames make a second, I'm sure the animation won't be too fast for the robot). Once every pose is clear and clean, I go for the next step.

Breakdown keys are the most important poses of your animation and usually are some whole body key. They give a good feeling to your animation. You rather put the overall meaning and expression on them.

c. Timing

Now that every pose is perfectly set, the animation is still very flat and have no real meaning, because there is the exact same time between each key.

In the dopesheet/timeline view, move each key by selecting them and drag them closer/further from the other one. You can obviously select groups of keys by holding the left click and square selecting them.

Timing is best done through trial and error. Remember that animation is not easy, and the best way to go is by trying different options and testing.

Once the timing feels right, you can add some freezes. Those are some "stops" in the animation, that looks a bit chewy at the moment. Simply copy/paste some important keys a few frames after, and you'll create a "plateau". This is an expression stolen from the geological vocabulary meaning you have created a flat portion in the curves, making the robot stay perfectly still for a few frames.

3. From General...

a. Setup

At last, let's start to play with the robot!

You should now be aware of the first step : the breakdown.

  • First on the top right of the screen, click on the standing robot and click on "Stand" to be sure that your robot is in a good starting pose.

Get the robot back to starting stand pose - step 1
Get the robot back to starting stand pose - step 1

Get the robot back to starting stand pose - step 2
Get the robot back to starting stand pose - step 2

  • Then click on the first frame of the timeline and hit F8 (or the first robot button of the top menu).

Set the starting key
Set the starting key

Congratulations! You just put your first key on the timeline!

  • Now go to the 50th frame, and hit F8 again.
    At this step you have a perfect starting and finishing animation, but it's not really moving.

Set the finishing key
Set the finishing key

b. First key

  • Let's put the main pose of the animation at the 25th frame (just in the middle). To do so click on it, and hit F8 again.
  • Then on the 3D view, select the head of the robot. In the newly appeared inspector, slide the HeadPitch to the minimum (-25.5°) on the far right.

Move the head down
Move the head down

Now the robot is looking at the tablet.

  • Select the right arm. Move the RShoulderRoll slider to about -38°
  • Move the RElbowRoll to 89.5° - which is the max value.

Move the right arm
Move the right arm

We are almost there!

  • Slide the RWristYaw to 80°, and the RHand to 0.85.

Fix the right hand
Fix the right hand

We have our key pose! You should have something that looks like this :

Complete first pose
Completed first pose

c. Symmetry and Asymmetry

a. Mirror the arm

Now that you have one arm fully animated, select the key on the timeline, and hit the "mirror" button (the one with the two gray and black circles), and select "Right to Left". Look at your robot being symmetrical now!

Mirror the two arms
Mirror the two arms

Create the symetry
Create the symetry

b. Creating asymmetry

Now that the two arms are in the same position, the robot looks a bit too… robotic!

To break this symmetry and create a more natural pose, we will slightly change the position of one arm and add some tilt to the leg.

Click on the first frame of the freeze (the one that should be around 23 in the timeline). Try and open a bit more one of the elbows using the ElbowRoll slider after selecting it.

Modify left elbow
Modify left elbow

Now select the leg. Slide the HipRoll to the right for a few degrees. The robot should be leaning on the right side of the view.

Modify hip roll
Modify hip roll

To finish, select the right arm, and raise it a bit using the RShoulderPitch slider. You can open it a bit less since this is the "top" arm of your pose, using the RShoulderRoll.

Modify the right arm
Modify the right arm

On the leg, you can also bend a bit the robot to the back, to present the tablet a bit more.

Modify the whole leg
Modify the whole leg

Be careful with this one to not create balancing problem. You can notice that the robot won't get stuck if you go to far with the slider, because it is a virtual robot, so it has no balance. On the real robot, the movement will be stopped because there is an auto-balance module installed on the robot to avoid getting out of balance. To go further, you have to compensate the HipPitch and the KneePitch with a 2:1 ratio, meaning that a value of 2 on the HipPitch has to be balanced by a value of 1 on the KneePitch.

Feel free to play a bit with every slider to customize your pose and add some asymmetry.

Example of the new pose
Example of the new pose

When everything looks fine for you, remember to copy/paste this whole key into the second pose of the freeze so that the robot has the exact same position on the two frames.

c. Focus on the essential

Click on the first frame to put the virtual robot back into Stand pose, and hit the Play button (on the top far right). It moves! But as we have previously seen, even if the breakdown is ok, the timing is very bad.

To change it, think about the animation you want to do. What is the point of the animation? We want the robot to show the tablet. So we'll add a freeze at this particular moment. Select the four keys on the 25th frame, and copy them. Go to the 30th frame, and paste them.

Set the freeze
Set the freeze

If you play the animation again, you will see a little "stop" in the important position. This is the freeze we wanted.

d. Timing (again)

We want to arms to raise a bit faster, and maybe go back in position faster too.

The first way is to select all the keys on the frame 25 and 30 (the freeze), and drag them one or two frames to the left.

Second method to change a timing : the click-drag
Second method to change a timing : the clik-drag

Second way it to click drag on the numbered ruler part of the timeline to make a blue bar appear, then to CTRL+click on the right red triangle and slide it to the left for about 5 frames. This will scale down the empty space selected in the range. Keep in mind that if there were some keys in that range, they would have been compressed to fit in the scaled space.

Second method to change a timing : the scale
Second method to change a timing : the scale

When the timing feels right, jump into the next section!