Hair: grow strands the way the game's generation program does #212
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!212
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/212/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-24 21:31 UTC · original
holdmysocks:claude/people-hair-strands→master· +248 −44 · 3 files · 1 commits · merged 2026-11-24 22:01 UTCWhat
SixNG grew full hair and fur by putting each root triangle's stored count of strands at random points and blending the three guides. The game's strand generation program does it differently. Its simplest variant was read from the compiled code and checked with an interpreter (triangle, seed and root weights bit for bit; length and positions to the output's precision).
Changes
hairgenmodule with the program's arithmetic: hashed choice of a root triangle weighted by the triangle's density byte (up to four attempts), seed and barycentric weights of the root, three per-strand random draws, strand length and a 2-bit variant.Groom::coatuses it. Strands are placed by the game's hashes, cut at their own length (the blend of the guides' lengths, varied per strand, so tips are uneven) and carry their variant (Coat::variants).groomreads three more things: the per-guide threshold bytes of the variant pick, the groom's seed and its length variation.Findings
Not covered (stated in the module)
Verified
cargo test --release --workspacepasses (3 new tests with values from the checked reference).Linear: SIX-152.