Humans
Skill ferret-humans · download all skills · SKILL.md
When to use#
A character, an NPC crowd, a proof figure, a face from a description or a photograph, clothes from words, a species (wolf, orc, android) or a god.
The model#
A figure is one HumanSpec (seed, kit, body, face axes, skin, eyes, hair, outfit, motion, kitOptions). buildFigure(data, spec, tier) makes the geometry; tiers are full, L0d..L3m. The skeleton is 87 joints (kits append tails and ears after them) so every cc-clips clip plays. Convention: body faces +z, left is +x, quaternions xyzw.
Steps (by commands: the same ones a person, a test and an agent use)#
- Open the viewer with
?humans(read-only; headless:startServer({humans:true})), or register the commands yourself:registerHumansCommands({register}, data). humans.create {id, words, outfit, recipe?, proof?, seed};humans.set {id, path:'/body/age', value}(JSON pointer, refused when invalid);humans.dress {id, words};humans.preset {id, recipe|uniform|proof};humans.randomise.- From a picture:
humans.fromPicture {words, mediapipe|landmarks, image, regions, garments}(landmarks fit the face axes; colours come from pixels);humans.comparereports colour and landmark distances. - Look:
humans.show {id, tier, clip, expression, light, camera},humans.sheet {ids},humans.screenshot. Check:humans.validate,humans.report {id, tier}(triangles, bytes, build ms, garment penetration),humans.describe,humans.diff. - Ship:
humans.bake {id, tier, path}gives a glb (87+ joint nodes, skin, PBR materials, fabric textures, 51 ARKit morph targets on the head, sockets and chains in scene extras);humans.save;humans.codeis the share code. - Crowds:
planCrowd+bakeVariant(vertex animation, thin instances); 1000 people at L3d cost about 1 ms on an RTX 3050.
Check afterwards#
humans.validate has no errors, humans.report penetration fraction is small, the glb loads and a knee bend moves the skin (tools/humans/p11-glb.mjs).
What usually goes wrong#
- Bending a CC bone about local X: X is the bone axis, so it twists. Hinge about Z.
- Colours in specs and kits are linear; do not gamma them again under image processing.
Ferret.humansis its own namespace in the library bundle (names clash with other packages).- Giants: use
kitOptions.scale, the shape pack caps height near 2.3 m.
Files#
reference/humans.md— People and anthropomorphic characters from a spec: faces from words or a picture, bodies, clothes, hair, kits (animal-headed, fantasy, reptilian, robot, Greek, Egyptian, Norse), gait clips, crowds, glb bake, the humans.* commands and the ?humans viewer.reference/api-humans.md— every export of@ferret/humanswith signature and doc commentreference/api-humans-2.md— every export of@ferret/humanswith signature and doc commentreference/api-humans-3.md— every export of@ferret/humanswith signature and doc commentreference/commands.md— 18 commands of these packages with their arguments