Legacy Reference

Working with Blend Shapes (Morphs)

Animated blend shapes, also known as morph target animation, is a method that stores a deformed version of a mesh as a series of vertex positions. In each keyframe of an animation, the vertices are then interpolated between these stored positions.

Blendshape animations are created by adding bones to the base skeleton. This involves explicit name matching between bone names and the blend shape controls.

For blend shape export requirements, see Exporting Blendshapes.

Blend Shape Authoring Requirements in Maya

As blend shapes only work for .skin attachments, use Maya to create a base .chr like a cube or triangle that is skinned to the export skeleton.

See the following requirements and guidelines when creating a blend shape scene in Maya:

  • All blend shape meshes must exist be in the same world space location as the skinned base mesh. Move your blend shape meshes on top of the skinned base mesh.

  • Smooth bind at least one joint to the blend shape base mesh.

  • Make sure the root joint of the skeleton hierarchy has no (zero) rotations.

  • Create an empty SceneRoot group node and a root joint as the top-level node of the deforming skeleton. Do not skin the root joint into your character mesh.

  • Set the SceneRoot group node and the root joint both looking forward with their z-axes aligned to the world y-axis and their y-axes aligned to the world z-axis.

  • For each blend shape mesh, create a joint in the origin and name it blend_shape_mesh_name_blendWeightVertex

  • The _blendWeightVertex joints should be parented under the root joint for the skeleton hierarchy.

  • Manually create the blendWeightVertex joints and connections. Connect and map the weight output range (0 to 1) of the blend shape node to (0 to 100) to the translateX attribute of these helper joints.

  • Nonrigid deformations require real-time tangent updates to get correct shading. Because such tangent updates are expensive, in order to minimize CPU cost, use vertex colors to transfer a blue (0, 0, 255) painted mask in your DCC tool to mark the most important facial parts.

  • Tangent updates only work with 8-weight CPU skinning. To implement that, open the .cdf file and add flags=8 on the line that lists the applicable skin attachment. This skinning makes the morphs expensive to use, so use it sparingly.

Blend Shape Setup in Lumberyard

Use the following procedure when setting up a blend shape in Lumberyard using Geppetto:

To set up a blend shape in Geppetto

  1. Create a SkeletonList.xml file and place it in the \Animations directory and add the following skeleton element block to the file:

    <SkeletonList> <Skeleton name="base_skel" file="exported_character_path_filename.chr"/> </SkeletonList>
  2. Add a .skin attachment to the skeleton .chr file.

  3. By default, Geppetto will add a Joint Attachment. Change this to a Skin Attachment and browse for the .chr file you exported earlier.

  4. Enable Software Skinning for the blend shape to work.

  5. Create a .chrparams file.

  6. Add an Animation Set Filter and point it at the directory of the exported animation file.

  7. Browse the directory containing the exported animation file and select the default animation.

  8. Add a new .animsettings file and save it.

  9. Browse for the saved .cdf file. Select and double-click the default animation.