Hair: read groom LOD chains from the files' names #285

Manually merged
github merged 2 commits from gh-pr/285/head into gh-pr/285/base 2026-11-26 20:24:36 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-25 15:02 UTC · original
holdmysocks:claude/people-groom-lods → master · +167 −18 · 5 files · 2 commits · merged 2026-11-25 15:32 UTC

Reads groom LOD chains from the game instead of guessing them, where the archive's table of contents can be read. This follows the exact hair links of PR 273.

What changed

  • Pieces are named. A groom piece's file is <placeholder without _full>_<word>. hairlink::piece_names tries a built-in list of piece words (base, top_02, ponytail_tie …, each also with a number) against the piece table's ids. That names 2,766 of the 4,095 pieces of the named human assets.
  • LODs are read by name. A named piece's LOD files are <piece>_lod1, _lod2 …, found by name id in the table of contents (lod_files).
  • The guess only handles the rest. chains keeps every name-read chain as it is, and those LOD files join no other piece. The bones and strand-count rule now only handles unnamed pieces.
  • The exact table stores every groom's chain (HairLinks::lods). The cache version goes from 2 to 3.
  • The viewer's groom list and sixng grooms --list use those chains (HairLinks::relabel). The groom catalog's own chain and LOD fields are a guess from neighbouring files.

Measured

  • On named pieces the old rule agreed with the names on 4,200 of 4,253 chains. On the other 53 it attached too few or too many LODs. Example: a bun's _lod2 and _lod3 had gone to its flyaways piece.
  • The groom catalog now has 5,732 chains, down from 5,915. Before, the viewer's groom list hid 215 real pieces as LODs and listed 376 LOD files as pieces; now it does neither.
  • The hair link table builds in about 18 s, as before. The chosen grooms (the densest of each piece) are unchanged, so characters render the same.

Verified

  • cargo test --release --locked passes. New tests: pieces_and_lods_by_name, relabel_by_lods, and name-read chains in chains_by_starts.
  • I rebuilt the hair link table and grooms --list against the game and compared both with the old table and catalog (numbers above).

Not verified

  • I did not open the viewer's groom list in the viewer window. The change there is the catalog fields it filters on, which I checked in grooms --list output.
  • 1,329 pieces are still unnamed (no word in the list fits) and keep the guessed chain.
  • Fur (PR 278) does not use these chains yet. It will once both PRs are in master.
**@⁠holdmysocks** on GitHub · 2026-11-25 15:02 UTC · [original](https://github.com/holdmysocks/SixNG/pull/285) `holdmysocks:claude/people-groom-lods` → `master` · +167 −18 · 5 files · 2 commits · merged 2026-11-25 15:32 UTC Reads groom LOD chains from the game instead of guessing them, where the archive's table of contents can be read. This follows the exact hair links of PR 273. ## What changed - **Pieces are named.** A groom piece's file is `<placeholder without _full>_<word>`. `hairlink::piece_names` tries a built-in list of piece words (`base`, `top_02`, `ponytail_tie` …, each also with a number) against the piece table's ids. That names 2,766 of the 4,095 pieces of the named human assets. - **LODs are read by name.** A named piece's LOD files are `<piece>_lod1`, `_lod2` …, found by name id in the table of contents (`lod_files`). - **The guess only handles the rest.** `chains` keeps every name-read chain as it is, and those LOD files join no other piece. The bones and strand-count rule now only handles unnamed pieces. - **The exact table stores every groom's chain** (`HairLinks::lods`). The cache version goes from 2 to 3. - **The viewer's groom list and `sixng grooms --list` use those chains** (`HairLinks::relabel`). The groom catalog's own chain and LOD fields are a guess from neighbouring files. ## Measured - On named pieces the old rule agreed with the names on 4,200 of 4,253 chains. On the other 53 it attached too few or too many LODs. Example: a bun's `_lod2` and `_lod3` had gone to its flyaways piece. - The groom catalog now has 5,732 chains, down from 5,915. Before, the viewer's groom list hid 215 real pieces as LODs and listed 376 LOD files as pieces; now it does neither. - The hair link table builds in about 18 s, as before. The chosen grooms (the densest of each piece) are unchanged, so characters render the same. ## Verified - `cargo test --release --locked` passes. New tests: `pieces_and_lods_by_name`, `relabel_by_lods`, and name-read chains in `chains_by_starts`. - I rebuilt the hair link table and `grooms --list` against the game and compared both with the old table and catalog (numbers above). ## Not verified - I did not open the viewer's groom list in the viewer window. The change there is the catalog fields it filters on, which I checked in `grooms --list` output. - 1,329 pieces are still unnamed (no word in the list fits) and keep the guessed chain. - Fur (PR 278) does not use these chains yet. It will once both PRs are in master.
A piece's LOD files are named <piece>_lod1 ..., so once the piece is
named (placeholder base plus a known piece word whose name id is the
table's id) its LODs are read by name id from the table of contents.
2,766 of 4,095 human pieces are named; the rest keep the inferred chain,
which no longer takes the named pieces' LODs. The exact table stores every
groom's chain, and the viewer's groom list and grooms --list use it:
5,732 chains instead of 5,915, with no piece hidden as a LOD and no LOD
listed as a piece.
# Conflicts:
#	README.md
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:24:32 +00:00
github manually merged commit efe0d8c65f into gh-pr/285/base 2026-11-26 20:24:36 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.