Hair export: scalp hair pressed under the outfit's hat #348
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!348
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/348/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-26 03:26 UTC · original
holdmysocks:hair-hats→master· +367 −24 · 5 files · 8 commits · merged 2026-11-26 05:33 UTCHair export, part of #146: hair under hats.
outfit --hair: when the outfit has a hat, the scalp pieces (slot "hair") are pressed under it the way the model viewer does (groom::Shell, 3 mm under the hat's lining). The guides are pressed before the strands are grown, and the grown strands again after, since noise, curl and clumps move them off the guides. This is a stand-in, not the game's method.Shell::press_strands: after the shell press, every strand is checked from its root against the hat's own triangles (Shell::with_lining). Where a segment crosses the hat, its far point goes back 3 mm under the hat on the line from the shell's centre, or stops 3 mm short of the crossing. The triangles are binned by direction from the centre and sampled along segments and triangles, so ones passing near the crown are found. The shell alone (5 degree cells, blended out toward the hat's edges) let tufts through the side of a cap.hairexport::hat_shell: builds the shell, with its lining, from the written model GLB. The viewer takes the triangles from the loaded hat parts.hairexport::piecetakes the optional hat. Pressed pieces name it in their extras (under_hat), and the summary gives the points moved (hat_pressed).Checked on Jason's look 1 (
player_story000_01 --look 1, a cap worn backwards over long hair): 5 scalp pieces, 411,913 of 1.19 M points moved. In Blender 5.3, ray tests on each strand segment against the cap mesh find 69,923 crossings with the shell press alone and 2 with this change (one strand at the cap's lower edge). Cycles GPU renders from the side at ear height and from the back show no hair through the cap.