Hair: each strand its own coverage dither; curls per guide; count rule in 1440 lines #353

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

@⁠holdmysocks on GitHub · 2026-11-26 04:42 UTC · original
holdmysocks:claude/people-hair-dither → master · +27 −10 · 4 files · 1 commits · merged 2026-11-26 05:05 UTC

Character hair looked sparse, veiled and blotchy: a pale haze around Lucia's ponytail, solid dark patches, and scalp showing at the hairline. The main cause was in the viewer, not the data.

Coverage dither per strand. A strand thinner than its minimum drawn width (2 pixels) keeps each MSAA sample with a probability equal to the share it covers. The dither offset came from the model's palette tint, which is the same for a whole character, so every strand kept the same samples. Where strands overlapped, their coverage did not add up. The offset now comes from a hash of the ribbon's point, as the game takes it from the strand's own bits.

Curls per guide. Clumped strands that follow one guide (the ponytail has 132 guides and 66 strands per guide) now start their style curl on the root frame's axis, shared by all of them, as the strand generator carries the frame from the root. A random turn per strand spread every ringlet into a haze about 4 cm wide.

Count rule in 1440 lines. The strand count rule now counts in the game's fixed 1440-line reference view instead of the window's height, so a small window draws as many strands as a large one.

The widening from #345 stays. Without it, the scalp still shows at the default framing.

Tests: cargo test --release -p sixng-core -p sixng-gui -p sixng-cli pass. Checked against renders of Lucia (default framing, full body, side, front and back close-ups) and Mandy.

**@⁠holdmysocks** on GitHub · 2026-11-26 04:42 UTC · [original](https://github.com/holdmysocks/SixNG/pull/353) `holdmysocks:claude/people-hair-dither` → `master` · +27 −10 · 4 files · 1 commits · merged 2026-11-26 05:05 UTC Character hair looked sparse, veiled and blotchy: a pale haze around Lucia's ponytail, solid dark patches, and scalp showing at the hairline. The main cause was in the viewer, not the data. **Coverage dither per strand.** A strand thinner than its minimum drawn width (2 pixels) keeps each MSAA sample with a probability equal to the share it covers. The dither offset came from the model's palette tint, which is the same for a whole character, so every strand kept the same samples. Where strands overlapped, their coverage did not add up. The offset now comes from a hash of the ribbon's point, as the game takes it from the strand's own bits. **Curls per guide.** Clumped strands that follow one guide (the ponytail has 132 guides and 66 strands per guide) now start their style curl on the root frame's axis, shared by all of them, as the strand generator carries the frame from the root. A random turn per strand spread every ringlet into a haze about 4 cm wide. **Count rule in 1440 lines.** The strand count rule now counts in the game's fixed 1440-line reference view instead of the window's height, so a small window draws as many strands as a large one. The widening from #345 stays. Without it, the scalp still shows at the default framing. Tests: `cargo test --release -p sixng-core -p sixng-gui -p sixng-cli` pass. Checked against renders of Lucia (default framing, full body, side, front and back close-ups) and Mandy.
The thin-strand coverage dither took its offset from the model's palette
tint, which is the same for a whole character. Every strand kept the same
samples, so where strands overlapped their coverage did not add up: a
crowd of thin strands covered no more than one of them. That showed as a
pale veil around the ponytail, solid blotches where the pattern lined up,
and scalp showing through. The offset now comes from a hash of the
ribbon's point, as the game takes it from the strand's own bits.

Clumped strands that follow one guide (the ponytail's 66 per guide) now
start their style curl on the root frame's axis, the same for all of
them, as the generator carries the frame from the root. A random turn per
strand had spread every ringlet into a haze about 4 cm wide.

The strand count rule now counts in the game's fixed 1440-line reference
view, not in the window's own lines, so a small window draws as many
strands as a large one.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:29:48 +00:00
github manually merged commit 62de3041a9 into gh-pr/353/base 2026-11-26 20:29:50 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.