Making Devan walk on board the Herald

May 21st, 2015

Note:
The animations you will see here are still work in progress.

For
the animations in Herald, we use the Mecanim system in Unity. We had
several iterations of ways of walking until we arrived at the system
of walking we use now. In the demo we used a piece of script which
allowed Devan to move. Instead of placing his foot and moving, the
script would move Devan completely towards the player-selected destination
on the grid. However, this causes glaring issues like
“sliding feet” or getting stuck in his idle pose
while traversing the environment. We had to find a solution that would make Devan
move when he placed his foot on the ground. To do that, we used a different setup in the animator along with a new nav mesh system in Unity.

Note: The animation is sped up due to framerate difference.

All of Herald’s animations are created in Blender. And instead of animating the character
on one spot, we make him perform the actual movements. If he needs to walk forwards, we make him walk forwards within the work space. This method seems to work
the best for our system. Another thing that we use is keyframe-based
animation. This means everything is made by the hand of the animator
instead of motion captured. In order to capture the feel of the
character, we perform the action ourselves and film it. We use that
as reference for the animation.

In
Unity, we use the Mecanim locomotion starter kit as template for
required animations.  If you study this system you will end up with a
list of animations that I will explain in this post. We don’t
necessarily need the running animations in the game so we’ve left them
out of the list; there is always the possibility of adding them back to
the system.

As a foundation to start from you will need an Idle animation and a walking animation.
In order to make sure the animations are loopable you will have to
make sure you start in the passing position of the walk animations.

The
next animations which are needed are the ones to make your character turn towards the
destination when he’s idling. After the turn, he will start
walking.

You
need four turn animations. The first animation, which we shall call
Turn A, is where your character turns 45 Degrees, the second, which we
name Turn B, is where your character turns 90 Degrees, the third,
which we title Turn C, is where he turns 135 Degrees and the last one,
which is named Turn D, is where the character turns 180 Degrees.

The turns have to end in the exact same pose as the first frame. This makes blending between animations easier.

The
other animations that you need to have are a “WalkTurnShort”,
“WalkTurnMedium” and “WalkTurnWide”. These animations are required for
the character to adjust his course during walking.  You need an
animation for small, medium and a wide turns. An important thing to
note is that the poses have to be the same on the keys as in the
walking animation. So make sure the animations are the same length .
Otherwise you’ll end up with a skipping leg transition when your
character tries to turn.

After
you created the animations, you’re going to have to import them into
the game. We import them as .FBX files into Unity. Now you don’t need
to create left and right animations as you can mirror the animations
in game. There is a difference between mirroring them through the
animator or by altering their own settings and setting it to
‘mirrored’. You’re going to have to mirror the animations of the
walking turns in the animator, but the animations for the idle turns
are done by duplicating the animation and enabling the mirror setting in
its animation settings.

For
the WalkTurns you would like to have the boxes checked for Loop Time,
Loop Pose and Root Transformation Position (Y). Make sure that Root
Transform Rotation is based upon original, Root Transform Position
(Y) at feet and Root Transform Position (XZ) at Center of Mass.

As
with the TurnABCD you need to make sure that you have the boxes
checked for Loop Time and Root Transform Position (Y) Bake Into Pose.
Check if the Root Transform Rotation is based upon Body Orientation,
Root Transform Position (Y) at Original and Root Transform Position
(XZ) at Center of Mass as well.

Replace
the animations from Mecanim Locomotion Starter kit with the
animations you made and once you run the game, you will see the
character move, turn around and adjust his course when trying to
reach his destination.

Note: The animation is sped up due to framerate difference.

Now
all there is left is tweaking the animations, settings and polish its rough
edges. We hope this post gave you a better insight in our walking
system and our process behind our animations!

If you have any questions, you can mail our 3D animator, Jermaine van der Kolk at jermaine.vdkolk(at)gmail(dot)com

tags:

V.O.F. Wispfire
Hooghiemstraplein 144
3514 AZ Utrecht
The Netherlands
Chamber of Commerce: 57952388

Twitter

Facebook

LinkedIn

Wispfire