Tutorials

A swinging tail with skinning

One long mesh that bends along its length like a chain: a tail, a long strand of hair or a sleeve. Skinning cuts it into pieces on nested rotation deformers, and physics swings them.

1. Mesh the tail

Give the tail a real mesh with points along its whole length (Mesh editing). The pieces are cut between the mesh's triangles, so a mesh with only a few long triangles can't bend smoothly.

2. Draw a deform path

  1. Select the tail mesh.
  2. Press 2 for edit level 2.
  3. Pick the Deform Path tool (P) and click along the middle of the tail from the root (where it joins the body) to the tip. Four to six points are plenty for a tail.

Alt+click deletes a point and Backspace removes the last one. If the points sit closer together than the mesh's triangles, a piece comes out empty and skinning stops with a message: space them out, or add points to the mesh.

3. Skin it

Modeling > Skinning > Use Deform Path for Skinning.

Every path point but the tip becomes a rotation deformer, each the child of the one before, and the mesh is cut midway between the points and glued back together. The original mesh is hidden, not deleted.

Each deformer gets a parameter from -45 to 45, keyed at -45, 0 and 45, in a parameter folder with the tail's name: <mesh> 1 at the root, <mesh> 2 after it, and so on. Move them one by one: the tail curls from the root outwards. See Skinning.

4. A physics group

Open Modeling > Physics Settings… and Add… a group named Tail.

  • Input settings: Angle X as Position X, and Angle Z as Angle, so the tail reacts when the body moves and tilts.
  • Pendulum settings: press Add until the chain has one more pendulum than the tail has parameters.
  • Output settings: Add… each tail parameter as Angle, <mesh> 1 from pendulum 1, <mesh> 2 from pendulum 2, and on to the tip. The parameter nearest the tip takes the pendulum furthest down.

Longer Duration swings slower; lower Ease of swinging settles sooner. Watch the Pendulum preview, or press Swing.

5. Try it

Turn on Physics and Follow in the toolbar and move the mouse: the body follows and the tail swings after it, root first. Export as usual: the deformers, glue and parameters go out in every moc3 version and the swing goes out in physics3.json.