human-morph

The body sliders of the character creator (CHARACTER-DESIGN.md), as pure functions over a human pack: which targets a body uses and how much, and the sum that turns them into positions.

MakeHuman's macro targets are sculpted at the CORNERS of a grid: female or male, baby, child, young or old, three muscle and three weight levels, and three ancestries. A body between corners is a weighted mix of the corners around it, and every slider is a position on one axis of that grid. The rules here are written from MakeHuman's file names and documented behaviour; none of their (AGPL) code is used.

The sliders, each from 0 to 1:

african, asian and caucasian are an ancestry MIX, normalised to sum to 1 (all zero is an even mix).

const pack = await loadHumanPack(assetUrl('makehuman/hm08/hm08.json'))
const weights = macroWeights({ ...DEFAULT_HUMAN_BODY, height: 0.9 }, (n) => pack.has(n))
const positions = await morphHuman(pack, weights)

A dense macro costs about 0.03 ms to add on a desktop, so a body is morphed on the spot rather than in a worker.