Wednesday, 24 November 2010

Helping volume preservation through a modified bind pose

One of the major problems with linear skinning is volume loss on the model. Generally this is most noticeable at the elbows, knees and buttocks and is also the cause of the 'sweet wrapper' effect if a joint is rotated along its down axis.

There are lots of solutions for helping maintain volume. If you're familiar with Maya 2011 you'll probably have noticed the blended dual quaternion (DQ) skinning for example which is a great solution. Unfortunately if you're producing assets for a game engine you're generally stuck with linear skinning. I have come across game engines that support DQ skinning but only as a complete replacement to linear skinning and in my experience it's only really worthwhile if you can use both methods together. It is also computationally more expensive which is a factor in game development.

The sweet wrapper effect can be minimised using roll joints to distribute the twist over a number of joints, I'll cover this in a later post. For other areas it is possible to use corrective blend shapes or helper joints but these come with a cost at runtime.

A free and easy way of reducing the loss of volume in these areas is by changing the position of the skeleton when you bind the mesh; effectively by pre-bending the joints and re-binding the mesh at the new position.

Modified bind pose
The basic work flow goes like this:
  • Bind meshes as supplied by the Character Art team (in the model pose) to the skeleton.
  • Set up the modified bind (BPmod) pose on the skeleton - roughly 30 degrees bend at upper leg, knee and elbow. Store this pose using the pose manager (see previous post) so you can easily get back to it later.
  • Duplicate the meshes. This gives you new meshes that conform to the BPmod pose.
  • Bind these new meshes to the skeleton in this pose and copy the weights from the original meshes.
  • Delete the original meshes, leaving you with the ones you re-created.
You will notice that if you set the skeleton back to the model pose that the new mesh will not quite align with the original because of the different pose each mesh was bound in. Depending on how picky you are feeling, these are optional steps for fixing this:
  • Using the pose manager, set the skeleton to the model pose and conform the new mesh to the original (match world space vertex positions, see link to script below).
  • Go back to BPmod pose. Duplicate the meshes again, bind the new ones and copy skin weights.
Here is a script for snapping the vertices of one mesh to another. Select your source mesh, then your target mesh and run the script. Meshes must have identical topology for this to work. NT_snap_meshToMesh.mel

This is the result of simply re-creating and binding the mesh in a pre-bent position. The mesh bound in the modified pose is shown in red and the original in blue. You can clearly see a huge improvement in volume preservation as the leg is raised and the knee bent.

1 comment:

  1. Hey Matt,

    Any chance you can restore your images for this topic?