Body, hand and feet skin spec maps from the wardrobe material assets (#392, part 1) #435
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!435
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-435"
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-27 02:15 UTC · original
holdmysocks:people-skin-rma→master· +353 −1 · 5 files · 2 commits · merged 2026-11-27 03:11 UTCFirst half of #392: the spec maps of the body, hand and feet skins.
What the game binds. The skin shader (
ped_standard_skin, andped_standard_lod_skin) has two spec slots,speculartex(c6f46e79) andspeculartex2(739e3d0d). It has no separate roughness or metalness texture. On every mainhand_*andfeet_*mesh of every fit, both slots bind placeholders that are in no store; only the normal map is stored.Where they come from. They come neither from shader-archive defaults nor from the mesh's material params. Each texture state of a wardrobe item names a
Materialasset id beside its colour and normal map. The material assets are 47 PSO asset sets inpacks.rpf. Each record lists its textures by key:179eb44aisspeculartexand4cf41ef4isspeculartex2. On the stored first-person hands, the record names exactly the maps that mesh binds.Change
skinspectable: colour map → material → spec maps. It is built from the packs.rpf index on first use and cached as<work>/index/skin_spec.json. It has 6,793 materials and 2,639 colour maps. Ten colour maps that name more than one material (shared defaults) are left out instead of guessed.model.jsongets aspecentry.extrasand PNGs, so they show in the viewer's slot list and texture-slot view.Channels (read from the skin pixel program
PS_DeferredPedTexturedNC, second commit). There is no metalness.speculartexR: a translucency mask.saturate(R - c)goes to a G-buffer target of its own; it is non-zero only on thin parts such as the finger segments.speculartexG: roughness, about 0.6 on skin. Overlay layers blend it toward their own value and the detail map adjusts it; after a view-dependent factor and specular anti-aliasing, the G-buffer stores 1 - roughness.speculartexB: occlusion,lerp(1, B, strength), stored in 6 bits. It is mostly 1.speculartex2R: the detail strength mask.speculartex2G: the skin region,16 x G(high nibble, 0-15). Stored values are 16k + 5..7. A per-draw table turns the region into a layer of the detail normal and detail control atlases (0cd27763,7c0055b9).The GLB still carries the maps as stored and does not map them to glTF roughness or occlusion yet. The viewer's default shading is unchanged.
Checks
cargo test -p sixng-core: 337 passed. New tests cover material records, wardrobe asset links and leaving shared colour maps out.cs_lucia --look 0): hand gets9c4d3d0582891fbc/c603b049c4fbfa5b, feet get9baf566e90f2368a/e24a520be7f4f5cf. The hand map's layout matches the colour atlas (fingers, nails, upper body).cs_jason --look 0): hand, feet, body and teeth all get both maps.Linear: SIX-241.