People: per-part clothing colours and preset colours in outfit exports #116

Manually merged
github merged 4 commits from gh-pr/116/head into gh-pr/116/base 2026-11-26 20:11:01 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 04:21 UTC · original
holdmysocks:claude/people-part-colours → master · +98 −20 · 8 files · 4 commits · merged 2026-11-24 04:28 UTC

What

  • Per-part colours. Garments without a materialid texture number their parts per vertex (raw vertex colour green = 4 x id + 2, ids 0-7). The viewer gives each vertex its part's garment preset colour as a vertex tint over a shade-only texture, so belts, soles, laces and toe caps are coloured apart.
  • outfit --look exports carry the garment preset colours: baked into the base texture where the garment has a materialid texture, else as GLB COLOR_0 over a shade-only texture. New ExportOptions::part_colours; the ped_tint record in model.json says which was applied.
  • Preset before tint row stays. Over about 6,100 items with a colour tag, a preset and a tint row, the preset's colour matches the tag on 2,970 and the tint row on 390. README notes it.

Verified

  • Workspace tests pass (after merging master through #114).
  • Viewer renders of eight characters before the merge, one (default look of the first story character) after it: per-part colours show.
  • One exported GLB inspected by its data: COLOR_0 holds the expected part colours.

Not verified

  • The exported GLB was not opened in Blender.
  • On the vstation palettes the tint row matches the tag slightly more often than the preset (327 against 284 items); left on the preset.
  • Gradient stops, fabric weave and tint-mask layers are not applied.
**@⁠holdmysocks** on GitHub · 2026-11-24 04:21 UTC · [original](https://github.com/holdmysocks/SixNG/pull/116) `holdmysocks:claude/people-part-colours` → `master` · +98 −20 · 8 files · 4 commits · merged 2026-11-24 04:28 UTC ## What - **Per-part colours.** Garments without a `materialid` texture number their parts per vertex (raw vertex colour green = 4 x id + 2, ids 0-7). The viewer gives each vertex its part's garment preset colour as a vertex tint over a shade-only texture, so belts, soles, laces and toe caps are coloured apart. - **`outfit --look` exports** carry the garment preset colours: baked into the base texture where the garment has a `materialid` texture, else as GLB `COLOR_0` over a shade-only texture. New `ExportOptions::part_colours`; the `ped_tint` record in model.json says which was applied. - **Preset before tint row** stays. Over about 6,100 items with a colour tag, a preset and a tint row, the preset's colour matches the tag on 2,970 and the tint row on 390. README notes it. ## Verified - Workspace tests pass (after merging master through #114). - Viewer renders of eight characters before the merge, one (default look of the first story character) after it: per-part colours show. - One exported GLB inspected by its data: `COLOR_0` holds the expected part colours. ## Not verified - The exported GLB was not opened in Blender. - On the `vstation` palettes the tint row matches the tag slightly more often than the preset (327 against 284 items); left on the preset. - Gradient stops, fabric weave and tint-mask layers are not applied.
An outfit part now carries the base colours of its item's garment preset
(matlib, one per sub-material), and the viewer colours each texel of a
garment with the colour of its sub-material, read from the materialid
texture (sub-material 0 where a garment has none), shaded as before.
Preset colours come before the stored state colour, the tint row and the
colour tag. matlib::Index::load_or_build builds the preset index when it
is missing, so the viewer does not depend on a sixng materials run.
Garments without a materialid texture number their parts per vertex
(raw vertex colour green = 4 x id + 2). The viewer and outfit --look
exports give each vertex its part's garment preset colour, so belts,
soles and laces are coloured apart. outfit --look bakes preset colours
into the base texture, or writes them as COLOR_0 over a shade-only
texture for the per-vertex garments.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:11:00 +00:00
github manually merged commit b07f89ad74 into gh-pr/116/base 2026-11-26 20:11:01 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.