Gravity Knight Part 5: Rigging And Animation.

Tim
Written by Tim on

For rigging and animation we used Autodesk Maya, which is a very powerful - and very complex - tool. Using Maya became quite affordable when Maya LT was released in 2015 years (also available on Steam). We used Maya simply because Patrick, who made the rigs and animation, is an experienced user. We can’t offer a detailed how-to on this topic but we’ve got a valuable video tutorials for you. This is how Patrick learned to animate in Maya.

Preparations

Before we exported our characters we separated all the limbs and created a matrix for each body part that we wanted to animate.

Rigging

We created 3 different rig set-ups for our game. The rig for the knight is the same as for all other humanoid characters because they shared the same basic model set-up. Naturally this was a huge time saver because keyframes could simply be copied without further adjustments. The humanoid rig consists of 16 bones and 4 IK handles which allowed us to animate head, hip, backbone and all 4 limbs.

Animation

We used classic keyframe animation to make our characters alive. We put our character in rough key poses along the timeline and animated the intermediary frames in the second step until the animation was fluid.

After finalizing the different animations we combined all previously separated mesh parts, attached the resulting mesh to the rig and manually weight painted the influence of the individual bones. Doing so we were able to guarantee a clean mesh management in Unity. Of course this step should be done at the very end because further editing of the model is not possible.

Hint

If you don’t deactivate segment scale compensate for all joints you may get scaling errors when importing your animations in Unity. Here’s a little script that automatically deactivates this property for all selected joints:

import pymel.core as pm
bones = pm.ls(sl=1)   
for bn in bones:
  if pm.nodeType(bn) == 'joint':
    bn.segmentScaleCompensate.set(0)