Viewer: clothes under clothes drawn as their _cull_00 twins and cut by the hide masks #354

Manually merged
github merged 2 commits from gh-pr/354/head into gh-pr/354/base 2026-11-26 20:29:55 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-26 04:47 UTC · original
holdmysocks:claude/people-armpit-slivers → master · +41 −11 · 1 files · 2 commits · merged 2026-11-26 05:18 UTC

This replaces the distance guess for clothes worn under other clothes with the game's own data. It fixes the slivers #327 left on cs_tal_bu: the t-shirt at the armpits, the dot at the collar and the notch above the hem.

How the game layers clothes. It doesn't use physics. Each garment ships as two drawables:

  • _full, which the viewer loaded. It is split into pieces, and its vertices carry no regions.
  • _cull_00, one mesh cut 1 to 3 cm closer to the body, whose vertices each carry a region number.

Each worn item lists, per layer, the regions it hides. Kent Paul's shirt, for example, names regions of the t-shirt's layer.

Change (model_view.rs):

  • In the outfit shown, a garment that another shown item hides regions of is loaded as its _cull_00 twin, when one exists.
  • Its triangles are then cut by the masks, the same way skin already was, and it is left out of the distance test.
  • Garments with no masks on them stay on _full and the distance test (jackets over a top still work as before).
  • SIXNG_NO_CULL=1 turns it off, for comparison.

Verified:

  • cargo test --release --locked passes.
  • Rendered before and after on the RTX 4080: cs_tal_bu is clean. Kent Paul now shows his black t-shirt at the open collar as it should, where the distance test hid it. Shanese and cs_tal_co (t-shirt under an open jacket) are unchanged or clean.
  • An earlier try that tuned the distance test (1 ring, 50 mm) only shrank the slivers and hid Kent Paul's collar. It isn't in this PR.

Not done:

  • The second mask list (hides_sub, whose key isn't decoded) isn't applied.
  • The CLI outfit GLB export still uses _full meshes.
  • No in-game comparison.
**@⁠holdmysocks** on GitHub · 2026-11-26 04:47 UTC · [original](https://github.com/holdmysocks/SixNG/pull/354) `holdmysocks:claude/people-armpit-slivers` → `master` · +41 −11 · 1 files · 2 commits · merged 2026-11-26 05:18 UTC This replaces the distance guess for clothes worn under other clothes with the game's own data. It fixes the slivers #327 left on `cs_tal_bu`: the t-shirt at the armpits, the dot at the collar and the notch above the hem. **How the game layers clothes.** It doesn't use physics. Each garment ships as two drawables: - `_full`, which the viewer loaded. It is split into pieces, and its vertices carry no regions. - `_cull_00`, one mesh cut 1 to 3 cm closer to the body, whose vertices each carry a region number. Each worn item lists, per layer, the regions it hides. Kent Paul's shirt, for example, names regions of the t-shirt's layer. **Change (model_view.rs):** - In the outfit shown, a garment that another shown item hides regions of is loaded as its `_cull_00` twin, when one exists. - Its triangles are then cut by the masks, the same way skin already was, and it is left out of the distance test. - Garments with no masks on them stay on `_full` and the distance test (jackets over a top still work as before). - `SIXNG_NO_CULL=1` turns it off, for comparison. **Verified:** - `cargo test --release --locked` passes. - Rendered before and after on the RTX 4080: `cs_tal_bu` is clean. Kent Paul now shows his black t-shirt at the open collar as it should, where the distance test hid it. Shanese and `cs_tal_co` (t-shirt under an open jacket) are unchanged or clean. - An earlier try that tuned the distance test (1 ring, 50 mm) only shrank the slivers and hid Kent Paul's collar. It isn't in this PR. **Not done:** - The second mask list (`hides_sub`, whose key isn't decoded) isn't applied. - The CLI `outfit` GLB export still uses `_full` meshes. - No in-game comparison.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:29:53 +00:00
github manually merged commit 93196ab1dd into gh-pr/354/base 2026-11-26 20:29:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.