Clothing is the body's field, pushed out

A figure needs a sleeve, a plate, a strap. The instinct is to model each one as its own primitive and place it on the body. That works for exactly one pose, and it is a fitting problem forever after.

A tunic and a sleeve on the same moving figure. Left: shapes placed once at the rest pose. Right: derived from the body's own field. The hem is where you can see the shell in cross section, and the thickness is the whole lesson.

On the left the plate stays where the arm used to be. On the right it is welded to the limb, because it was never a separate shape: it is the arm's own surface, offset outward, cut to a region. It shows as two bands rather than one because that is what a sleeve is from the side, with the limb running between them.

An offset is a subtraction

This is the property the whole technique rests on. Subtracting a constant from a distance field moves its surface outward by exactly that constant, and the result is still a distance field. So a garment of thickness T sitting G above the skin is two offsets of one field:

float shell  = max(body - (G + T), -(body - G));  // a slab above the skin
float region = /* where the garment exists */;
float cloth  = max(shell, region);

The first max is a slab: outside the inner offset, inside the outer one. The second cuts it down to a sleeve, a chest piece, a boot. Nothing about the garment describes a shape, which is why nothing about it can stop matching the shape.

What you get for free

Where the region lives, which is the part that goes wrong

The garment fits automatically. Where it sits does not. A region defined in world space is a plate nailed to the room, and the arm swings out of it, which is the same bug in a subtler costume. The region has to be expressed in the same moving frame as the part it belongs to: between this joint and that joint, along this bone.

A practical form is to define regions by joint interpolation, as above. It reads directly and it moves with the skeleton without anyone maintaining a second transform.

The limits, stated honestly

This gives you fitted clothing, not loose clothing. A cloak, a skirt or a scarf has its own dynamics and lags the body, and offsetting cannot produce lag because it has no memory. That is a different technique: a swept field driven by its own simulated points.

The other real cost is that every garment layer reads the body field again, so a stack of five layers evaluates the body five times unless you hoist the evaluation and reuse the value. Hoisting it is easy and worth doing on the first layer, not the fifth.

Rules of thumb

  1. Fitted clothing is max(bodyOffsetSlab, region). It is never its own shape.
  2. Two offsets make the slab: gap for the inner surface, gap plus thickness for the outer.
  3. Define the region in the moving frame of the part it belongs to, not in world space.
  4. Stack layers by increasing gap. They cannot intersect if each is offset from the same body.
  5. Evaluate the body once and pass the value down. Every layer wants it.
  6. Loose or trailing cloth is not this technique. Offsets have no memory, so they cannot lag.

All 61 notes How to use them Credits