Animals: fur from the strand grooms, linked by archive order #26

Manually merged
github merged 1 commit from gh-pr/26/head into gh-pr/26/base 2026-11-26 20:03:59 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-23 02:59 UTC · original
holdmysocks:claude/animal-fur → master · +879 −12 · 7 files · 1 commits · merged 2026-11-23 03:00 UTC

What was wrong

Animals showed no fur. Nothing readable says which strand grooms belong to which animal (the archive's name table is encrypted).

How the grooms are placed

  • A fur preset (named after the 3-vertex placeholder <root>_fur_<slot>_<variant>) carries the GUID of a fur asset (41acf8eb; partskin now keeps it).
  • An unnamed resource after the groom block maps each GUID to its groom piece ids: 256 groups of 16 control bytes and 16 slots {u64 GUID, 16 zero bytes, pointer} leading to {u32 byte length, u64 ids}. The ids occur nowhere else, but give each variant's piece count and which pieces variants of one animal share.
  • packs.rpf stores resources in name order (24,418 of 24,422 adjacent named drawables ascend) and grooms follow their fur asset's name: an animal's grooms are one run, variants in name order, a shared piece stored once with the first variant that lists it.
  • Strand roots lie on the skin, which finds the run.

The walk (furlink::align) allows for placeholders without a preset (66 of 495, no count), counts off by one, and variants whose files are not in the archive. It settles them by how close each piece's roots are to the skin and to the right part (body or head). Animals that share a skin are walked together. Results are cached in <work>/index/fur_links.json.

Groom pieces: LODs are grouped by bone set rather than bone order, and a groom may join one of the last three pieces, because LOD names sort apart (x, x_fluff, x_fluff_lod1, x_lod1). 20,010 grooms give 5,599 pieces.

Viewer

  • An animal opens with its medium (else short) body and head fur. The hair panel lists the variants and marks inferred counts.
  • Automatic fur is drawn 3 mm wide and each strand takes the colour of the skin texture under its root. Both are display choices, not from the game; the colouring has a checkbox.

Checked

  • cargo test -p sixng-core: 96 pass, 4 of them new (furlink).
  • 11 animals in the rebuilt viewer. Pieces placed / of those near the skin on their own part: two cats 229 / 229, boar 97 / 97, chimpanzee 49 / 49, boxer 53 / 53, cow 18 / 18, deer 130 / 127, bear 29 / 28, coyote 44 / 41, Yorkshire terrier 132 / 118, bull 27 / 20.

Not known, not done

  • This is inferred from order and geometry; no stored link is read.
  • Whether the table lists a variant's ids in file order (assumed where variants share only some pieces).
  • Human hair with the same link: not tried.
  • Fur as the game draws it: only guide strands are decoded.
  • An animal with no body of its own (the Yorkshire terrier) is fitted to the mesh the viewer assembles, so its long variants do not place.
  • The first open of an animal takes 10 to 30 s while its link is worked out.

Research examples groomroots and partskins; SIXNG_DEBUG_FUR=1 prints the run and the expected variants.

**@⁠holdmysocks** on GitHub · 2026-11-23 02:59 UTC · [original](https://github.com/holdmysocks/SixNG/pull/26) `holdmysocks:claude/animal-fur` → `master` · +879 −12 · 7 files · 1 commits · merged 2026-11-23 03:00 UTC ## What was wrong Animals showed no fur. Nothing readable says which strand grooms belong to which animal (the archive's name table is encrypted). ## How the grooms are placed - A fur preset (named after the 3-vertex placeholder `<root>_fur_<slot>_<variant>`) carries the GUID of a fur asset (`41acf8eb`; `partskin` now keeps it). - An unnamed resource after the groom block maps each GUID to its groom piece ids: 256 groups of 16 control bytes and 16 slots `{u64 GUID, 16 zero bytes, pointer}` leading to `{u32 byte length, u64 ids}`. The ids occur nowhere else, but give each variant's piece count and which pieces variants of one animal share. - packs.rpf stores resources in name order (24,418 of 24,422 adjacent named drawables ascend) and grooms follow their fur asset's name: an animal's grooms are one run, variants in name order, a shared piece stored once with the first variant that lists it. - Strand roots lie on the skin, which finds the run. The walk (`furlink::align`) allows for placeholders without a preset (66 of 495, no count), counts off by one, and variants whose files are not in the archive. It settles them by how close each piece's roots are to the skin and to the right part (body or head). Animals that share a skin are walked together. Results are cached in `<work>/index/fur_links.json`. Groom pieces: LODs are grouped by bone set rather than bone order, and a groom may join one of the last three pieces, because LOD names sort apart (`x`, `x_fluff`, `x_fluff_lod1`, `x_lod1`). 20,010 grooms give 5,599 pieces. ## Viewer - An animal opens with its medium (else short) body and head fur. The hair panel lists the variants and marks inferred counts. - Automatic fur is drawn 3 mm wide and each strand takes the colour of the skin texture under its root. Both are display choices, not from the game; the colouring has a checkbox. ## Checked - `cargo test -p sixng-core`: 96 pass, 4 of them new (`furlink`). - 11 animals in the rebuilt viewer. Pieces placed / of those near the skin on their own part: two cats 229 / 229, boar 97 / 97, chimpanzee 49 / 49, boxer 53 / 53, cow 18 / 18, deer 130 / 127, bear 29 / 28, coyote 44 / 41, Yorkshire terrier 132 / 118, bull 27 / 20. ## Not known, not done - This is inferred from order and geometry; no stored link is read. - Whether the table lists a variant's ids in file order (assumed where variants share only some pieces). - Human hair with the same link: not tried. - Fur as the game draws it: only guide strands are decoded. - An animal with no body of its own (the Yorkshire terrier) is fitted to the mesh the viewer assembles, so its long variants do not place. - The first open of an animal takes 10 to 30 s while its link is worked out. Research examples `groomroots` and `partskins`; `SIXNG_DEBUG_FUR=1` prints the run and the expected variants.
Animals showed no fur: nothing readable says which grooms belong to which
animal. New module furlink places them from four facts:

- a fur preset (named after the 3-vertex placeholder drawable
  <root>_fur_<slot>_<variant>) carries the GUID of a fur asset (field
  41acf8eb; partskin now keeps it);
- an unnamed resource after the groom block maps each GUID to its groom
  piece ids (256 groups of 16 control bytes and 16 slots {u64 GUID, 16
  zero bytes, pointer} -> {u32 byte length, u64 ids}). The ids occur
  nowhere else, but give each variant's piece count and which pieces the
  variants of one animal share;
- packs.rpf stores resources in name order (24,418 of 24,422 adjacent
  named drawables ascend), and grooms follow their fur asset's name: an
  animal's grooms are one run, variants in name order, a shared piece
  stored once with the first variant that lists it;
- strand roots lie on the skin, which finds the run.

The walk allows for placeholders without a preset (no count), counts off
by one and variants whose files are not in the archive, and settles them
by how close each piece's roots are to the skin and to the right part
(body or head). Animals that share a skin are walked together. Results
are cached in <work>/index/fur_links.json.

Groom pieces: LODs are now grouped by bone set rather than bone order,
and a groom may join one of the last three pieces (LOD names sort apart:
x, x_fluff, x_fluff_lod1, x_lod1).

Viewer: an animal opens with its medium (else short) body and head fur;
the hair panel lists the variants. Automatic fur is drawn 3 mm wide and
each strand takes the colour of the skin texture under its root (both
display choices).

Checked on 11 animals: every piece the walk placed lies near the skin on
its own part for the two cats (229 of 229), the boar (97 of 97), the
chimpanzee (49 of 49) and the boxer (53 of 53); 83 to 97 % for the bull,
the coyote, the bear and the Yorkshire terrier.

Not known: whether the ids in the table are in file order (assumed when
variants share only some pieces); human hair (not tried); fur colour and
density as the game draws them (only guide strands are decoded).

Research examples: groomroots, partskins. SIXNG_DEBUG_FUR=1 prints the
run and the expected variants.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:03:57 +00:00
github manually merged commit 78e60f959d into gh-pr/26/base 2026-11-26 20:03:59 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.