Hair: each asset's own strand parameter and colour sets #335

Manually merged
github merged 6 commits from gh-pr/335/head into gh-pr/335/base 2026-11-26 20:28:22 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-26 02:16 UTC · original
holdmysocks:claude/people-hair-paramsets → master · +182 −22 · 5 files · 6 commits · merged 2026-11-26 02:38 UTC

Each hair and fur asset now gets the strand parameter set it names. Until now the viewer used one guessed default per slot.

What the game data says

  • An asset's registry record (struct 20e0f6ed, type 30) carries two properties that name its strand sets, each as the joaat of the set's lower-case name:
    • 960033653 names the colour set.
    • 2259149558 names the parameter set.
  • All 1,421 hair and fur assets name both sets, and every value is a set of the game's strand tables (#330). 171 parameter sets are in use; the most common is Long_HighGloss_000, on 187 assets.
  • One character's three assets name Long_HighGloss_000 (hair), Eyebrows_MidGloss_000 (brows) and Eyelashes_HighGloss_002 (lashes). The first two are the sets matched earlier against that character's game frames. The lashes set differs from the old guessed default, and only the lashes change in a plain render.

Changes

  • New hairsets module in sixng-core: asset GUID → (colour set, parameter set). It is built from the registries in a few seconds and cached in the index folder.
  • hairlink: the registry reader now returns any asked properties. The hair link table and its cache are unchanged.
  • Model viewer: each piece takes the parameter set its asset names. A piece whose item and outfit name no colour set takes the asset's colour set.
  • SIXNG_HAIR_PARAMSETS still overrides. The per-slot defaults remain for pieces with no known asset; the lashes default is now the set the checked character's asset names.
  • Research example hairsets repeats the check above.

Not covered: animal fur. A fur groom is not linked to an asset GUID in the viewer yet, so SIXNG_FUR_SETS stays the only way to set an animal's sets.

Tests: sixng-core, sixng-gui and sixng-cli all pass. One unit test is new.

**@⁠holdmysocks** on GitHub · 2026-11-26 02:16 UTC · [original](https://github.com/holdmysocks/SixNG/pull/335) `holdmysocks:claude/people-hair-paramsets` → `master` · +182 −22 · 5 files · 6 commits · merged 2026-11-26 02:38 UTC Each hair and fur asset now gets the strand parameter set it names. Until now the viewer used one guessed default per slot. **What the game data says** - An asset's registry record (struct `20e0f6ed`, type 30) carries two properties that name its strand sets, each as the joaat of the set's lower-case name: - 960033653 names the colour set. - 2259149558 names the parameter set. - All 1,421 hair and fur assets name both sets, and every value is a set of the game's strand tables (#330). 171 parameter sets are in use; the most common is Long_HighGloss_000, on 187 assets. - One character's three assets name Long_HighGloss_000 (hair), Eyebrows_MidGloss_000 (brows) and Eyelashes_HighGloss_002 (lashes). The first two are the sets matched earlier against that character's game frames. The lashes set differs from the old guessed default, and only the lashes change in a plain render. **Changes** - New `hairsets` module in sixng-core: asset GUID → (colour set, parameter set). It is built from the registries in a few seconds and cached in the index folder. - `hairlink`: the registry reader now returns any asked properties. The hair link table and its cache are unchanged. - Model viewer: each piece takes the parameter set its asset names. A piece whose item and outfit name no colour set takes the asset's colour set. - `SIXNG_HAIR_PARAMSETS` still overrides. The per-slot defaults remain for pieces with no known asset; the lashes default is now the set the checked character's asset names. - Research example `hairsets` repeats the check above. Not covered: animal fur. A fur groom is not linked to an asset GUID in the viewer yet, so `SIXNG_FUR_SETS` stays the only way to set an animal's sets. Tests: sixng-core, sixng-gui and sixng-cli all pass. One unit test is new.
The colour ramps and sets, the parameter ramps and sets and the hair LOD
presets are binary XML files of the packs archive. They are found through
the archive's table of contents by their root element, parsed (RBF0) and
cached in the index folder, so the viewer and its exports use the game's
colour sets, fibre parameters and strand counts without research files.
The parameter set per slot defaults to the sets checked against the game
frames, until the asset property naming it is read per asset. The env
overrides stay for research.
While nothing in the view changes, each frame takes the next strand dither
pattern and is blended into a running mean (32 frames, then a moving
average), so a still view of hair settles into a smooth image instead of
per-pixel speckle. Any change to the camera, light, models, joints,
instances or materials restarts the mean. Plain screenshots wait for the
mean to settle. SIXNG_ACCUM=0 turns it off.
Characters' hair and bodies now shadow themselves in a plain launch, as
in the game. SIXNG_SHADOWS=0 turns it off; thumbnails and the 3D map keep
it off unless SIXNG_SHADOWS is set.
Hair and fur assets name their strand colour set and parameter set in
their registry records (properties 960033653 and 2259149558, the joaat of
the set's name). New hairsets module reads both for every asset (cached
in the index folder); the model viewer takes each piece's parameter set
from its asset, and the asset's colour set for a piece whose item and
outfit name none. SIXNG_HAIR_PARAMSETS still overrides; the per-slot
defaults remain for pieces of no known asset.

All 1,421 hair and fur assets name both sets, and every value is a set
of the game's strand tables. Research example hairsets checks this.
# Conflicts:
#	crates/sixng-core/src/lib.rs
#	crates/sixng-gui/src/model_view.rs
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:28:20 +00:00
github manually merged commit 4613aada0e into gh-pr/335/base 2026-11-26 20:28:22 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.