Viewer: clothing hems stay smooth on a heavy body #443

Manually merged
github merged 11 commits from github-bot/gh-443 into gh-pr/443/base 2026-11-27 03:47:30 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 03:02 UTC · original
holdmysocks:claude/people-hems → master · +2219 −149 · 27 files · 11 commits · merged 2026-11-27 03:44 UTC

Viewer: on a heavy body, clothing hems stayed jagged. Lucia's crop top and tank top at --body 1,1 had sawtooth hems; on the neutral body they're smooth.

Stacked on #427 (it changes the same Wrap code). Merge #427 first.

Cause:

  • Clothes follow the shaped skin through Wrap. Each garment vertex took the inverse-square mean of the 6 nearest skin vertices' offsets, weighted 1 / (d² + 1e-5).
  • With that weight, the nearest skin vertex almost fully decides. Neighbouring hem vertices picked different single skin vertices, and on a heavily shaped belly those offsets differ by centimetres. The hem broke into a sawtooth, and the skin showed through the notches.

Change (model_view.rs, Wrap):

  • The offset is the mean of the 16 nearest skin vertices, weighted 1 / (d² + (2 cm)²). Skin vertices nearer than about 2 cm weigh about the same, so neighbouring garment points get a smooth offset.
  • The normal push (at least the largest outward offset of those vertices) stays. Renders without it let skin through at the hem.
  • NEAR and SOFT constants; doc comments updated.

Verified:

  • cargo test --release --locked -p sixng-gui passes.
  • cs_lucia at --body 1,1:
    • looks 0 (tank top) and 6 (crop top): the hems are smooth now.
    • The straps, shorts and track pants waistband look the same as before.
  • cs_jason look 0 at --body 1,1: the necklace still sits on the neck (#427).
  • The neutral body is untouched: Wrap only runs for a shaped body.
**@⁠holdmysocks** on GitHub · 2026-11-27 03:02 UTC · [original](https://github.com/holdmysocks/SixNG/pull/443) `holdmysocks:claude/people-hems` → `master` · +2219 −149 · 27 files · 11 commits · merged 2026-11-27 03:44 UTC Viewer: on a heavy body, clothing hems stayed jagged. Lucia's crop top and tank top at `--body 1,1` had sawtooth hems; on the neutral body they're smooth. Stacked on #427 (it changes the same `Wrap` code). Merge #427 first. **Cause:** - Clothes follow the shaped skin through `Wrap`. Each garment vertex took the inverse-square mean of the 6 nearest skin vertices' offsets, weighted 1 / (d² + 1e-5). - With that weight, the nearest skin vertex almost fully decides. Neighbouring hem vertices picked different single skin vertices, and on a heavily shaped belly those offsets differ by centimetres. The hem broke into a sawtooth, and the skin showed through the notches. **Change** (model_view.rs, `Wrap`): - The offset is the mean of the 16 nearest skin vertices, weighted 1 / (d² + (2 cm)²). Skin vertices nearer than about 2 cm weigh about the same, so neighbouring garment points get a smooth offset. - The normal push (at least the largest outward offset of those vertices) stays. Renders without it let skin through at the hem. - `NEAR` and `SOFT` constants; doc comments updated. **Verified:** - `cargo test --release --locked -p sixng-gui` passes. - cs_lucia at `--body 1,1`: - looks 0 (tank top) and 6 (crop top): the hems are smooth now. - The straps, shorts and track pants waistband look the same as before. - cs_jason look 0 at `--body 1,1`: the necklace still sits on the neck (#427). - The neutral body is untouched: `Wrap` only runs for a shaped body.
Wrap takes a garment vertex's offset from the 16 nearest skin vertices, weighted 1/(d^2 + (2 cm)^2), instead of 6 weighted 1/(d^2 + 1e-5), where the nearest single skin vertex decided and neighbouring hem vertices broke into a sawtooth.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:02:51 +00:00
github-bot changed target branch from claude/people-necklace to master 2026-11-27 03:08:49 +00:00
# Conflicts:
#	crates/sixng-gui/src/model_view.rs
github-bot changed target branch from master to gh-pr/443/base 2026-11-27 03:47:28 +00:00
github manually merged commit 5c57d786ff into gh-pr/443/base 2026-11-27 03:47:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.