Hair colliders from the character's body bound #365

Manually merged
github merged 1 commit from gh-pr/365/head into gh-pr/365/base 2026-11-26 20:30:46 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-26 06:37 UTC · original
holdmysocks:claude/people-hair-colliders → master · +168 −14 · 3 files · 1 commits · merged 2026-11-26 06:58 UTC

Hair styling is now damped against the character's real body bound instead of the surface-point stand-in.

What the data holds

  • Human characters have a body bound fragment, defaultfemale_fr1_000_bounds or defaultmale_mr1_000_bounds. It is a ragdoll composite with one group per bone (group name = joaat of the bone name): head, neck, acromions, clavicles, spine 0–5, arms and legs.
  • Kind 2 pieces are tapered capsules along local y:
    • +0x70: radius at +y.
    • +0x74: radius at -y (= the margin).
    • +0x78: segment length.
    • Check: the bbox y half extent is length / 2 + the larger radius on every piece checked. The thigh pieces put the larger radius at the hip, which is +y.
  • Kind 0 is a sphere with the margin as radius. Boxes (hands) and kind 13 (feet) are not used.
  • The per-garment char_bipedbounds_* fragments use the same layout, but they have no head or neck pieces. How a garment selects its bound is not known yet, so they are not used.

Changes

  • fragphys::body_pieces reads the round pieces with their bone hash and frame.
  • groom::Taper and Colliders::shapes: d = sat(1 - dist / falloff), with dist to the nearest piece surface (≤ 0 inside), then the existing third-rounding and strength cap.
  • In the viewer, the bound comes from the rig (_fr1_ / _mr1_ parts). Pieces are placed on the bind pose (game frame = Cᵀ W C of the Y-up joint). Characters with no bound keep the point stand-in. SIXNG_DEBUG_HAIR prints the pieces.
  • The falloff stays at 3 cm. The game stores a per-shape falloff, but its source has not been found.

Checks

  • New unit test taper_colliders.
  • cargo check --workspace --all-targets is clean.
  • Tests: core 314, GUI 49, all pass.
  • Lucia and Mandy close-up and back renders look the same as before or slightly cleaner. Mandy's curls near the shoulders are a bit more defined.
**@⁠holdmysocks** on GitHub · 2026-11-26 06:37 UTC · [original](https://github.com/holdmysocks/SixNG/pull/365) `holdmysocks:claude/people-hair-colliders` → `master` · +168 −14 · 3 files · 1 commits · merged 2026-11-26 06:58 UTC Hair styling is now damped against the character's real body bound instead of the surface-point stand-in. ## What the data holds - Human characters have a body bound fragment, `defaultfemale_fr1_000_bounds` or `defaultmale_mr1_000_bounds`. It is a ragdoll composite with one group per bone (group name = joaat of the bone name): head, neck, acromions, clavicles, spine 0–5, arms and legs. - Kind 2 pieces are tapered capsules along local y: - +0x70: radius at +y. - +0x74: radius at -y (= the margin). - +0x78: segment length. - Check: the bbox y half extent is length / 2 + the larger radius on every piece checked. The thigh pieces put the larger radius at the hip, which is +y. - Kind 0 is a sphere with the margin as radius. Boxes (hands) and kind 13 (feet) are not used. - The per-garment `char_bipedbounds_*` fragments use the same layout, but they have no head or neck pieces. How a garment selects its bound is not known yet, so they are not used. ## Changes - `fragphys::body_pieces` reads the round pieces with their bone hash and frame. - `groom::Taper` and `Colliders::shapes`: d = sat(1 - dist / falloff), with dist to the nearest piece surface (≤ 0 inside), then the existing third-rounding and strength cap. - In the viewer, the bound comes from the rig (`_fr1_` / `_mr1_` parts). Pieces are placed on the bind pose (game frame = Cᵀ W C of the Y-up joint). Characters with no bound keep the point stand-in. `SIXNG_DEBUG_HAIR` prints the pieces. - The falloff stays at 3 cm. The game stores a per-shape falloff, but its source has not been found. ## Checks - New unit test `taper_colliders`. - `cargo check --workspace --all-targets` is clean. - Tests: core 314, GUI 49, all pass. - Lucia and Mandy close-up and back renders look the same as before or slightly cleaner. Mandy's curls near the shoulders are a bit more defined.
The default female and male body bounds (defaultfemale_fr1_000_bounds,
defaultmale_mr1_000_bounds) hold the ragdoll pieces the game builds its
hair colliders from: tapered capsules and spheres on the head, neck,
acromions, clavicles, spine and limbs. fragphys::body_pieces reads them
(kind 2: radius at +y, radius at -y, segment length at +0x70..+0x78),
the viewer places them on the bind pose and groom::Colliders::shapes
damps the style offsets by distance to their surfaces. The surface-point
stand-in stays for characters without a body bound.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:30:44 +00:00
github manually merged commit 845bab4caa into gh-pr/365/base 2026-11-26 20:30:46 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.