Animate a Robot Character

In his previous tutorial, user @jctoon showed you his process for designing a robot character. Now he’s back to talk about his techniques for animating the same character. Be sure to check out his public file to view the animations in realtime and to check out the source.

1. Planning the Animation

Making a plan for the animation of our character is important. It helps us understand what assets we will need.

I start by making sketches of the various animations, to get a sense of the movement and to design any additional parts or effects that are necessary. In the case of the robot, I will work on three typical animations for a game: idle, jump and attack.

Idle: Position of inactivity of the character. Although the robot is not taking any action, the character needs some motion, to not appear too static.

Jump: In this case, the robot will use the thrusters on his feet to jump in place. Important parts:

  • Anticipation (action to prepare for the jump)
  • Action (the jump itself)
  • Recovery (return to the starting position)

Attack: The character pulls out a weapon from his arm and shoots. The shot makes the robot slide backward, so he then has to take a small jump forward to place himself back to the same starting position.

To make all these animations, I will need the following image assets:

  1. Body
  2. Legs
  3. Arms
  4. Hand
  5. Eyes (normal, closed, angry, etc.)
  6. Firing effect
  7. Booster effect for the feet

2. Preparing the Assets

Keep the following things in mind when preparing assets for your character:

Minimum number of pieces: Having as few parts as possible is important. We always want the final file to be as small as possible.

Ideal size: We can design our character at any resolution we want, but when it’s time to export, it is ideal to size your assets to the appropriate size for your game. It’s also important that all the assets have the same relative scale.

Names of the pieces: you should have a good naming system for your assets. For my system, I never use capital letters or spaces. I go from broad to specific with each word in the name (e.g. robot_head_eyes).

In the case of the robot, I have separated the assets needed for the animation. Body, head, legs, arms, gun, eyes, weapon effect, and leg effect (boosters). The most complicated part is the arm because of how it fires (it goes from being bent to straight).

To solve this, I have designed an in-between arm, which is easier to transition from one pose to another (using vertex deformations and bones).

3. Setting up the Rig of the Character

After importing the assets, I set up the character rig using bones that are necessary for the animation. This character has a simple rig, with IK in the feet and Nodes for the effects of the feet the weapon.

You can see in the screenshot above how the rig is set up. Then I activate Mesh (in the Selection Panel) and go into Edit Mesh for the specific assets that will need to be deformed by the bones. In this case they are the body, the arms, and the feet.

It is important to draw the mesh depending on the shape and movement of the piece. You can see above that I outlined the details of the arm (the lines) with forced edges, so that they will keep their detail when the arm deforms. With this finished part, I connect all the pieces to the corresponding bones (See the Connected Bones section of the image above) and start working on the weights of each piece. Here it is important to do several tests to get the proper deformation. As an important note, the arms have both Mesh and Vertex Deform enabled. This allows you to animate specific vertices individually. Together with the bones (which are bound to the mesh), this helps obtain a good deformation when the arm is stretched (again see the image above).

For the weights of the feet, as they have IK, I have only connected two bones of the leg (pink bone and blue bone).

4. Animation

Taking into account the planning we did at the start, the first thing I do is to setup my blocking poses. Here, I only work with the key positions, marking the time I think the animation needs. It is possible that in the final animation some things change, but this is our first reference.

Once the blocking is ok, it’s time to link the key poses to complete the animation. To do this work with the intermediate poses, marking new keys and smoothing the movement with the curves editor.

Here are the final animations. Click on each one to view it in full 60 FPS playback.
 
Idle:

Jump:

Attack:

Since @jctoon has generously shared his source, you can open up the project and look at how everything is set up. Download the Nima file and drag and drop it on an empty stage. If you have any questions, feel free to reach out to us or @jctoon!

Originally published at 2Dimensions.com on May 5, 2017.