PO/Library/PackageCache/com.unity.2d.animation@5.0.7/Documentation~/CharacterRig.md

4.2 KiB
Raw Blame History

Character skinning and weighting workflow

The following steps are the general workflow you can use to prepare your character for animation with the Skinning Editor. The steps detail how to create the bones, generate the meshes, and adjust the weights for your character.

  1. Use the Create Bone tool to build the bones of the character skeleton:

    • With the tool selected, click to define the start-point of the bone. Then move the cursor to where the bone should end, and click again to set the bones end-point.

    • After creating a bone, the tool allows you to set the end-point of the second bone and so on, in order to create a chain of bones.

    • To continue a chain of bones from any bone, select the Create Bone tool and click an existing bone, then click its end-point. A new bone is started from the end-point, creating a chain.

    • Alternatively, you can set the start-point of the new bone away from its parent bone. The child bone still belongs to the same chain and this is reflected in the bone hierarchy.


      A faded link shows the red and blue bones are connected in a chain.

  2. After creating the bones of the character, generate the geometry Mesh for the Sprites. It is recommended to use the Auto Geometry tool to auto-generate the geometry Mesh.

    • With the Auto Geometry tool selected, select a Sprite and then select the Generate For Selected button to generate a Mesh for that Sprite only. To Generate For All Visible Sprites, click the generate button without selecting any Sprite.
  3. Refine the generated Meshes further by using the Edit Geometry Geometry tool, or create your own Mesh outline with the Create Vertex and Create Edge Geometry tools.

  4. Paint weights onto the Sprite geometry to adjust how much influence a bone has on the vertices of the Mesh. This affects how the mesh deforms when the character is animated. It is recommended to use the Auto Weights tool to auto-generate the weights. The Auto Weights tool only generates weights for Sprites that have both a geometry Mesh, and bones intersecting their Mesh:

    • The Generate For All Visible button is available when you do not select any specific Sprite. Select it to generate weights for all valid Sprite Meshes in the editor.
    • The Generate For Selected button is available when you have a Sprite selected in the editor. Select it to generate weights for only the selected Sprite.
  5. Use the Weight Slider and Weight Brush tools to further adjust the weights of the Mesh vertices.

  6. To edit which bones influence a Sprite, select it and then go to the Bone Influence tool. A list of bones currently influencing the Sprites Mesh are listed in this panel at the bottom-right of the editor.

    • To remove a bone, select it from the list and select Remove (-) at the bottom right of the list.


      Select Remove (-) at the bottom right of the panel.

    • To add a bone as an influencer to the currently selected Sprite Mesh, select the bone in the editor window and select Add (+) to add it to the list.

  7. Test your rigged character by posing it with the Preview Pose tool. Move and rotate the different bones to check that the geometry Mesh deforms properly. Previewing poses can also be done while the following tools are selected: the Weight Brush, Weight Slider, Bone Influence, Auto Weights, and Visibility tools.

    • To restore a rigged character to its original pose, select Reset Pose from the Editor toolbar.
    • Edit the default pose by moving the character bones and joints with the Edit Bone tool.