Hair export: root UVs in the head UV set they belong to #326
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!326
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/326/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 00:57 UTC · original
holdmysocks:issue-146-uv→master· +197 −20 · 4 files · 2 commits · merged 2026-11-26 01:09 UTCFollow-up to #312 for #146: the hair's root UVs now land on the head's UV map in Blender.
What the root UVs are
A groom's stored root UVs turned out to be coordinates in one of the head mesh's own UV sets, not in its first one. On Jason's head, scalp hair is UV set 3 (median difference 0.000) and brows, lashes and beard are UV set 2 (0.000 to 0.023); the next-best set is at least 0.06 off. No byte of the groom header separates the two cases, so the set is found by matching.
Changes
outfit --hairreads back the head mesh it has just written, matches each piece's root UVs against every UV set at the guide roots, and records the set in the piece's extras (head_uv_set,head_mesh). It takes the best set when its median is under 0.05 and less than half the next set's.scripts/blender_hair_curves.pyuses that set as each hair object's surface UV map, with the game's root UVs assurface_uv_coordinate. Where the set overlaps itself under the roots (one of Jason's lash pieces), it falls back to the first UV map under each root.Melanin Redness); the script from #312 stopped on it in Blender 5.3.Checked in Blender 5.3 headless on Jason's default look: all 11 pieces matched their set (scalp 3, face 2). The head point at each strand's surface UV lies a median 0.1 to 1.2 mm from its root, or 2 to 4 mm on scalp pieces whose guide roots sit that far above the skin. A Cycles render on the GPU looks as before.