Strand hair: no bare patches when a groom is drawn at a distance #467

Manually merged
github merged 1 commit from github-bot/gh-467 into gh-pr/467/base 2026-11-27 06:34:27 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 06:03 UTC · original
holdmysocks:claude/people-strand-order → master · +64 −5 · 2 files · 1 commits · merged 2026-11-27 06:30 UTC

Strand hair: a groom drawn at a distance no longer loses whole areas. Jason's caesar cut (cs_jason looks 4, 8, 9 and 10) showed a bare reddish patch on the crown once the camera was a few metres away.

Cause: past a short distance the viewer draws only the first part of a piece's strands (the game's strand count rule; at about 3 m roughly a sixth). The ray-traced passes also keep the first n. The scattered strands are grown in random order, but the clump members are grown root triangle by root triangle and come after them. So a cut list kept the scattered strands and the first triangles' clumps, and dropped the rest of the scalp. Short scalp pieces such as 103669010 (caesar top) are mostly clump members, so the crown went bare and the head skin showed.

Change (groom.rs, Groom::coat_with): the finished coat's strands are put in a fixed shuffled order (a hash of the strand index), with their points, guides, normals, variants and clump numbers moved together. Any first share of them is then spread over the whole piece. The order is the same on every build. The glTF hair export writes the strands in the new order too; their content is unchanged.

Verified:

  • cargo test --release --locked -p sixng-core -p sixng-gui --lib --bins passes. New test a_cut_coat_keeps_every_area: the first fifth of a strip of clumped strands reaches at least 18 of its 20 triangles (in the old order, 4). The hair export test now counts the scattered and clumped strands instead of expecting them in order.
  • Viewer, cs_jason #look=4 from about 3 m: the bare crown patch is gone and the close-up is unchanged. Before/after renders compared.
**@⁠holdmysocks** on GitHub · 2026-11-27 06:03 UTC · [original](https://github.com/holdmysocks/SixNG/pull/467) `holdmysocks:claude/people-strand-order` → `master` · +64 −5 · 2 files · 1 commits · merged 2026-11-27 06:30 UTC Strand hair: a groom drawn at a distance no longer loses whole areas. Jason's caesar cut (cs_jason looks 4, 8, 9 and 10) showed a bare reddish patch on the crown once the camera was a few metres away. **Cause:** past a short distance the viewer draws only the first part of a piece's strands (the game's strand count rule; at about 3 m roughly a sixth). The ray-traced passes also keep the first n. The scattered strands are grown in random order, but the clump members are grown root triangle by root triangle and come after them. So a cut list kept the scattered strands and the first triangles' clumps, and dropped the rest of the scalp. Short scalp pieces such as `103669010` (caesar top) are mostly clump members, so the crown went bare and the head skin showed. **Change** (groom.rs, `Groom::coat_with`): the finished coat's strands are put in a fixed shuffled order (a hash of the strand index), with their points, guides, normals, variants and clump numbers moved together. Any first share of them is then spread over the whole piece. The order is the same on every build. The glTF hair export writes the strands in the new order too; their content is unchanged. **Verified:** - `cargo test --release --locked -p sixng-core -p sixng-gui --lib --bins` passes. New test `a_cut_coat_keeps_every_area`: the first fifth of a strip of clumped strands reaches at least 18 of its 20 triangles (in the old order, 4). The hair export test now counts the scattered and clumped strands instead of expecting them in order. - Viewer, cs_jason `#look=4` from about 3 m: the bare crown patch is gone and the close-up is unchanged. Before/after renders compared.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 06:07:34 +00:00
github-bot changed target branch from master to gh-pr/467/base 2026-11-27 06:34:26 +00:00
github manually merged commit dbc057a076 into gh-pr/467/base 2026-11-27 06:34:27 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.