Rig weld: also require similar skin weights before welding (don't weld cavities / onion-skin layers shut) #626

Closed
opened 2026-10-10 06:38:07 +00:00 by sky_line · 1 comment
Owner

Rigged vertex welding (RenderVKRigWeld, #574) currently pairs open-boundary vertices from different meshes of one avatar purely by bind-space distance (RenderVKRigWeldDistance, default now 0.2 mm; it was 1.5 mm) plus a skinned-distance cutoff (RenderVKRigWeldMaxGap). That is not enough on its own.

Problem

Some items have intentional geometry that sits within the weld distance of another mesh but must stay separate. Example: adult items with cavities, where a separate mesh is layered as an onion skin over the body. Their open edges sit fractions of a millimetre from the body's, so the cavity was welded shut at the old 1.5 mm default. Lowering the distance helps but is a blunt tool: real seams that don't quite coincide stop closing, and thin layered features can still sit within any distance we pick.

Proposal: weld only vertices that deform the same way

Two vertices should only be welded when their skin weights are similar, i.e. they would move together under animation anyway (true seams between body parts, garment edges sewn to the body):

  • Compare the two vertices' joint / weight sets after resolving joints to the avatar's skeleton (different meshes may index joints differently): e.g. a weighted overlap score sum over joints of min(w_a[j], w_b[j]) (1 = identical, 0 = disjoint), and require it above a threshold (new setting, e.g. RenderVKRigWeldWeightMatch, default ~0.8).
  • Vertices whose weights differ a lot (a cavity rim weighted to different bones / collision volumes / bento joints than the surrounding body) are not welded, even if they coincide in bind space.
  • Applies within the existing pairing (between different meshes only, boundary vertices only); the per-mesh grouping from 4983d29d2a stays.
  • Cost: the weld insert already has the vertex's skin data available in the pre-skin stream / weight SSBO; comparing up to 4 joint/weight pairs per candidate is cheap.

Also check

  • That the boundary classification ignores vertices on a mesh's own interior holes where appropriate.
  • A debug view or log of welded pairs rejected by weight, to tune the threshold.

Related: #574, #616 (skinned vertex layout), 4983d29d2a (weld only between meshes), 5eb1254e99 (default distance 0.2 mm).

Rigged vertex welding (RenderVKRigWeld, #574) currently pairs open-boundary vertices from different meshes of one avatar purely by bind-space distance (RenderVKRigWeldDistance, default now 0.2 mm; it was 1.5 mm) plus a skinned-distance cutoff (RenderVKRigWeldMaxGap). That is not enough on its own. ## Problem Some items have intentional geometry that sits within the weld distance of another mesh but must stay separate. Example: adult items with cavities, where a separate mesh is layered as an onion skin over the body. Their open edges sit fractions of a millimetre from the body's, so the cavity was welded shut at the old 1.5 mm default. Lowering the distance helps but is a blunt tool: real seams that don't quite coincide stop closing, and thin layered features can still sit within any distance we pick. ## Proposal: weld only vertices that deform the same way Two vertices should only be welded when their **skin weights** are similar, i.e. they would move together under animation anyway (true seams between body parts, garment edges sewn to the body): - Compare the two vertices' joint / weight sets after resolving joints to the avatar's skeleton (different meshes may index joints differently): e.g. a weighted overlap score `sum over joints of min(w_a[j], w_b[j])` (1 = identical, 0 = disjoint), and require it above a threshold (new setting, e.g. `RenderVKRigWeldWeightMatch`, default ~0.8). - Vertices whose weights differ a lot (a cavity rim weighted to different bones / collision volumes / bento joints than the surrounding body) are not welded, even if they coincide in bind space. - Applies within the existing pairing (between different meshes only, boundary vertices only); the per-mesh grouping from 4983d29d2a stays. - Cost: the weld insert already has the vertex's skin data available in the pre-skin stream / weight SSBO; comparing up to 4 joint/weight pairs per candidate is cheap. ## Also check - That the boundary classification ignores vertices on a mesh's own interior holes where appropriate. - A debug view or log of welded pairs rejected by weight, to tune the threshold. Related: #574, #616 (skinned vertex layout), 4983d29d2a (weld only between meshes), 5eb1254e99 (default distance 0.2 mm).
sky_line added this to the Slipstream project 2026-10-10 06:38:07 +00:00
Author
Owner

Shipped in 1.3.0 Beta 2: rig weld pairs are decided once at the rest pose and only vertices that deform the same way are paired, so cavities and onion-skin layers are no longer welded shut.

Shipped in 1.3.0 Beta 2: rig weld pairs are decided once at the rest pose and only vertices that deform the same way are paired, so cavities and onion-skin layers are no longer welded shut.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#626
No description provided.