Weights view

Weights are used to bind attachment vertices to bones so when the bones are transformed, the vertices are also transformed. Weights allow bones to deform attachments automatically as the bones are manipulated, making it easy to animate complex deformations.

Carefully plan your weights when setting up complex meshes.

Other names for allowing bones to affect mesh vertices include: linear blend skinning, blended skinning, multi-matrix skinning, skeletal subspace deformation, or sometimes simply "skinning". To avoid confusion with the unrelated skins feature in Spine, we use the name "weights".

While weights are most commonly used with mesh attachments, they also work with path, bounding box, and clipping attachments. For the rest of this page "mesh" is used in the text, but weights work with any of those attachments.

Bind

There are two ways to bind bones to a mesh:

  1. Select the mesh first
    Select a mesh with any tool, then click Bind in the weights view to enter Bind mode. Next, click each bone to bind to the mesh. When finished, exit Bind mode by pressing spacebar or escape, or by clicking Bind again.
  2. Select the bones first
    Select any number of bones with any tool, then click Bind in the weights view to enter Bind mode. Next, click a mesh to bind the bones.

When bones are bound to a mesh for the first time, weights are automatically computed as if the Auto weighting button was pressed.

The bound bones appear in the weights view and each bone is assigned a color.

When the Weights tool is selected, the bones are shown in the viewport with matching colors.

To see the weights that were computed automatically, Overlay can be checked.

When the Weights tool is selected, Overlay fills the mesh with the bone colors to show the influence of the bones on the vertices. Now when the bones are transformed, the vertices are affected and the image deforms.

Bones can be unbound by selecting them in the weights view and clicking Remove. The unbound bones will no longer affect the mesh. If all bones are removed, the mesh will return to being affected only by the transform of the bone to which it is attached.

Weights tool

Each vertex has a weight for each bone that determines the influence of the bone. While Auto weighting often does a good job, the Weights tool can be used to manually adjust weights.

When a mesh is selected with the Weights tool, pie charts are shown for each vertex to indicate the influence from each bone. The pies can be hidden by unchecking Pies.

To keep your setup pose from getting wrecked, switch to animate mode when transforming bones to see how weights behave. It can also help to animate the bones moving through their maximum range as you adjust weights.

To change weights for the selected vertices, first select the bones whose weight will increase or decrease. This can be done by clicking the bones in the weights view or in the viewport. Next, drag in the viewport to change the weight for the selected vertices, depending on the mode.

When switching to other tools, the selection for the Weights tool is saved. This enables switching to a transform tool, trying out the weights by manipulating the bones, then switching back to the Weights tool to further adjust the weights, without needing to change the selection.

Mode

The weights view Mode determines how weights are modified using the Weights tool. Before the Weights tool can be used, first select the bones whose weight will be adjusted. This can be done by clicking the bones in the weights view or in the viewport.

When subtracting a bone's influence, the influence of any other bones on the vertex is increased. Conversely, when adding a bone's influence, the influence of any other bones on the vertex is decreased. It is almost always more intuitive to adjust weights only by adding influence.

Direct

The Direct mode is used by selecting vertices, then dragging up or down in the viewport to adjust the weights or use the Weight slider in the weights view.

To select vertices when no vertices are selected, drag to box select. Additional vertices can be selected by holding ctrl (cmd on Mac), then clicking or dragging to box select. The selected vertices can be deselected by pressing spacebar or escape, or by clicking in any empty space.

Add

Drag to paint vertices with a brush that adds weights for the selected bones.

The Strength slider sets the maximum weight that will be applied. Size is the size of the brush and Feather is the percentage of the brush where the strength decreases from maximum influence to 0%.

Remove

Drag to paint vertices with a brush that removes weights for the selected bones.

The Strength slider sets the maximum weight that will be applied. Size is the size of the brush and Feather is the percentage of the brush where the strength decreases from maximum influence to 0%.

Replace

Drag to paint vertices with a brush that sets weights for the selected bones to a specific value.

The Strength slider sets the maximum weight that will be applied. Size is the size of the brush and Feather is the percentage of the brush where the strength decreases from maximum influence to 0%.

Smooth

The Smooth button averages the weights of the selected vertices with their neighbors. The neighbors of a vertex are those connected by a hull edge (cyan) or manually created internal edge (orange). If no vertices are selected, all are affected. Smooth spreads the influence of bones and can result in smoother deformations. It can be clicked multiple times to increasingly spread the weights.

Smoothing can cause unnecessary vertex transforms. Prune can be used to remove small weights.

Prune

The Prune button removes weights below a threshold. When setting up weights, it is common to end up with some bones having a small effect on some vertices, especially after using Smooth. These weights are unlikely to make a visible difference but still cause extra vertex transforms to be calculated. Removing unnecessary weights reduces the number of vertex transforms needed to render the mesh.

The Bones slider determines the maximum number of bones that can influence each vertex. When a vertex has weights for more bones than specified, the lowest weights are removed and distributed to the other bones that have weights.

The Threshold slider sets the threshold below which the weights are removed from a vertex. The removed weights are distributed to the other bones that have weights.

Adjusting these sliders provides a live preview of the result and the number of bones that will be removed is shown.

Multiple meshes can be pruned by using the tree filter to show only meshes, then selecting all the meshes and clicking Prune.

Overlay

When a mesh is selected with the Weights tool and Overlay is checked, the mesh is filled with the bone colors to show the influence of the bones on the vertices. If Selected is also checked, only colors for the selected vertices and selected bones are shown, the rest are shown as black. This can make it easier to see faint colors.

If Selected is checked and Overlay is not, the image can be seen instead of black.

Animate mode

Mesh weights cannot be keyed in animate mode, however weights can still be adjusted in animate mode. This is allowed for convenience, to more easily try out weights using different poses without affecting the setup pose. It can also be useful to manually adjust weights to fix a specific deformation problem in an animation. Adjusting weights in animate mode is identical to adjusting them in setup mode.

When adjusting weights in animate mode, it can be useful to disable Auto Key. That way after adjusting the pose and weights, returning to the setup pose can be done by clicking anywhere on the timeline.

It can also help to animate the bones moving through their maximum range as you adjust weights.

Triangle order

When a mesh overlaps itself, the order the mesh's triangles are drawn is important. Triangles are sorted by first determining which bone has the highest influence on the triangle's vertices, then the order that the bones appear in the weights view is used to determine which triangles are drawn on top of other triangles. The order of bones in the weights view can be changed by dragging.

Update bindings

The Update Bindings button rebinds the current vertices to the bones, discarding the old binding positions.

When bones are bound to a mesh, the mesh vertices at that time are stored in relation to each bone. When a bone is moved, the vertices also move to stay in the same position relative to the bone. The bone weights determine how much each bone influences the vertices. For example, if the weight for a bone is 100%, the vertices will move with the bone exactly.

For more Update Bindings examples, see our mesh binding tutorial and rotating diamond tutorial.

If bones have been transformed after being bound to a mesh, adjusting the weights will change the vertex positions. This happens because each bone wants the vertices to be in different positions. Sometimes it is acceptable for the vertices to move when adjusting weights. Other times it is not, and that is when Update Bindings is useful.

Example without update bindings

In this example update bindings is not needed. Adjusting the weights causes the vertices to move, but this acceptable.

Consider a skeleton with a long tail. The more an image is bent, the more it distorts, so it is best to start with an image near the center of the bending range. A long tail needs to bend a lot in both directions, so it's best to use a long, skinny rectangle, bound to bones and weighted.

However, it may look odd to have the tail perfectly straight in setup mode, so the bones can be rotated so the tail is bent in setup mode.

Since the bones were rotated to bend the tail, the bones transforms have changed since the mesh was bound. Now each bone wants the vertices to be in different positions, so when the weights are adjusted, the vertices move. This is acceptable because adjusting the weights controls how the bent tail deforms and it is not important that this setup pose keep an exact position.

Example with update bindings

In this example update bindings is used to prevent vertices from moving when the weights are adjusted.

Consider a skeleton with a weighted mesh for an arm. If the arm bones are rotated in setup mode to achieve the exact setup pose desired, then adjusting weights to fix how the arm bends in animations will move the vertices in setup mode, ruining the setup pose. In this case, Update Bindings can be used to set a new bind pose after rotating the arms. Then when the weights are changed, the vertices in setup mode will not move.

Video

Next: Welcome screen Previous: Tree view