Skin detail atlases and occlusion; translucency recorded (#392) #463
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!463
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-463"
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 05:23 UTC · original
holdmysocks:people-skin-detail→master· +341 −23 · 10 files · 8 commits · merged 2026-11-27 06:05 UTCPart of #392 (body skin spec maps). It follows #455.
Detail atlases (gap 1). No mesh binds the two skin detail slots. The engine falls back to two arrays of 48 tiles (256 x 256) in
data/ttdb/graphics/ttdb_graphics.ttpf:e4bb0ab707979121: detail normals, BC5.3e830fd3713f2e21: detail control, red channel.Each material's region table (
a6b9e97a) picks a tile fromspeculartex2G. On people it is tile 16 + region.skindetail_n_*,skindetail_c_*).extras.skin_spec.detail.Occlusion (gap 3). G-buffer AO =
lerp(1, speculartex B, 4d1ecedd). The lighting multiplies diffuse ambient by it and specular ambient by its fourth root. Direct light is not touched.occlusionTexture, and the viewer applies it.Translucency (gap 3). Decoded: the thickness from
speculartexR, the per-entity profile and the per-light transmittance. The formula is inextras.skin_spec.translucency.Not in this PR (follow-ups):
.zmtdata file (type 0x163). It was not found among the PSO and meta files of data, levels, packs, script or the story pack. Translucency is recorded but not shaded or mapped to a glTF extension.3b316b01+0x74 and +0x30 scale the detail terms. The engine default is 0, which turns detail off. Each ped's own value is not traced, so the viewer takes 1.Tests: core 358, gui 53. Build OK. The RTX 4080 render of cs_jason is OK.