Clothing
Skill ferret-clothing · download all skills · SKILL.md
When to use#
A character needs clothes that look made: trousers, a knitted jersey, a tailored jacket, a cap, a kerchief, boots. For quick shells over the old procedural humans use ferret-humans; for armour plates, rigid parts.
The model (the tailor way)#
Measure the body, cut the pattern by the rules, sew it off the body, put it on at its supports, add weights and textures, store it, move it. Each part says in reference/clothing.md whether it is built or status: in progress; use only what the code has now.
- Cut:
measureBody, blocks (trousers,jersey,jacket,shirt,tshirt,waistcoat,coat,cloak,hoodie,skirt,dress, hats ...). Ease by fitting and by layer (ease,upperEases,underThickness: passunderto a block), sleeve cap = armhole + setting ease (settingEase), darts (darts), grain per panel. No per-outfit numbers. - Held:
Garment.support(kindfitted, hung, waist, head, hand, foot;pinnedlines;stiffpieces). - Fabric:
fabricPhysics(name),triangleCompliances,bendCompliance(weave.ts). - Sewn:
sewGarment(garment): seams in the tailor's order, closed seams welded into one node. - Put on:
dress.tsis in progress (planplans/PLAN-CLOTHING-TAILOR.md). Until thendrape(body, garments, { h, frames })is the OLD way, to be removed: add no switch for an outfit.
Steps#
const body = bodyFromMesh(skinnedMesh),const m = measureBody(body).- Draft blocks, or words:
describe(text); any skeleton:mapRig; or your ownGarment. - Dress (
drapefor now), then per garmenttransferSkin,bakeGarment(d, { fabrics }),garmentMesh(...); or by commandclothing.dress {entity, garments, fabrics},clothing.list,clothing.undress. - Cache:
outfitKey,OutfitStore,dressCached; the store lives in the game;node tools/clothing/store.mjs build|list|verify|pack. Any change that can change a dressed result bumpsCLOTHING_CORE_VERSION. - Motion:
ClothMotionService, commandsclothing.motion.start|stop|set|stats|reset(budget,near,far); baked:bakeClip,sampleBakedCloth, stored per clip in the record.
Check afterwards#
Run the regression set tools/clothing/regress (run.mjs, compare.mjs): seam gap under 10 mm, no cloth in the body, no skin or lower layer through, no spikes, three walk frames. One case at a time, low priority, on the RTX.
What usually goes wrong#
- A fault in one outfit: do not add a switch; look at the cut (ease, support), the fabric, the core; then the regression set.
- A garment falls off in motion: it has no support; give the block
support.pinned. - The store gives an old result: the core version was not bumped.
- A baked loop jumps:
fpsmust divide 60; raisewarmCyclesorloopBlend.
Files#
reference/clothing.md— gameplay/clothing.mdreference/api-clothing.md— every export of@ferret/clothingwith signature and doc commentreference/api-clothing-2.md— every export of@ferret/clothingwith signature and doc commentreference/api-clothing-3.md— every export of@ferret/clothingwith signature and doc commentreference/api-clothing-4.md— every export of@ferret/clothingwith signature and doc commentreference/commands.md— 12 commands of these packages with their arguments