Hair colliders: add the box pieces of the body and garment bounds #402

Manually merged
github merged 1 commit from github-bot/gh-402 into gh-pr/402/base 2026-11-26 21:03:31 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-26 19:22 UTC · original
holdmysocks:people/hair-box-colliders → master · +83 −24 · 3 files · 1 commits · merged 2026-11-26 20:59 UTC

Hair styling is now also damped against the box pieces of the body and garment bounds. Until now only their round pieces (tapered capsules and spheres) were used (#365, #374).

What the data holds

  • Kind 3 pieces are boxes. Each one's bbox (+0x30 min, +0x20 max, in the piece's frame) is the box itself. It is centred on the piece's frame, and the margin is in the w slot of the max.
  • Box pieces across the body and char_bipedbounds_* bounds, by bone:
    • feet: 540;
    • hands: 131;
    • forearms: 32;
    • head: 14 (the ear cups of over-ear headphones);
    • glasses frames: 39 (on their own bone, which only exists when the glasses are worn);
    • secondary-motion bones: the rest.
  • The game's hair pose program has a box collider kind, so the hair pass handles boxes.

What changed

  • fragphys::body_pieces now also returns box pieces, with their bbox.
  • groom::Cuboid is a new box collider (centre, unit axes and half extents) with a signed distance. Colliders::with_boxes adds boxes to the round pieces, and damping uses the nearest shape of either kind.
  • The viewer places each box on its bone, like the round pieces. The character panel note now gives the number of boxes.

What is inferred

  • As in #374, that the game damps hair against these bounds is inferred, and the 3 cm falloff is still a guess.
  • Kind 13 pieces (1,072, mostly feet) are still left out: their shape isn't read.

Checks

  • New unit tests for the box distance (faces, inside, past a corner) and for mixing boxes with capsules.
  • Tests: 323 core, 51 gui and cli pass. Clippy shows nothing new.
  • Lucia and Mandy each get 4 boxes (hands and feet). Their close and back renders are pixel-identical to the renders before this change, as expected: no hair reaches those boxes. The change matters for headgear such as over-ear headphones.
  • Lucia's front shot could not be taken this time. The viewer panics in the GPU frame timer ("frame timestamps read-back" buffer destroyed, from #343). The panic comes before the hair is loaded, so it is unrelated to this change.
**@⁠holdmysocks** on GitHub · 2026-11-26 19:22 UTC · [original](https://github.com/holdmysocks/SixNG/pull/402) `holdmysocks:people/hair-box-colliders` → `master` · +83 −24 · 3 files · 1 commits · merged 2026-11-26 20:59 UTC Hair styling is now also damped against the box pieces of the body and garment bounds. Until now only their round pieces (tapered capsules and spheres) were used (#365, #374). ## What the data holds - Kind 3 pieces are boxes. Each one's bbox (+0x30 min, +0x20 max, in the piece's frame) is the box itself. It is centred on the piece's frame, and the margin is in the w slot of the max. - Box pieces across the body and `char_bipedbounds_*` bounds, by bone: - feet: 540; - hands: 131; - forearms: 32; - head: 14 (the ear cups of over-ear headphones); - glasses frames: 39 (on their own bone, which only exists when the glasses are worn); - secondary-motion bones: the rest. - The game's hair pose program has a box collider kind, so the hair pass handles boxes. ## What changed - `fragphys::body_pieces` now also returns box pieces, with their bbox. - `groom::Cuboid` is a new box collider (centre, unit axes and half extents) with a signed distance. `Colliders::with_boxes` adds boxes to the round pieces, and damping uses the nearest shape of either kind. - The viewer places each box on its bone, like the round pieces. The character panel note now gives the number of boxes. ## What is inferred - As in #374, that the game damps hair against these bounds is inferred, and the 3 cm falloff is still a guess. - Kind 13 pieces (1,072, mostly feet) are still left out: their shape isn't read. ## Checks - New unit tests for the box distance (faces, inside, past a corner) and for mixing boxes with capsules. - Tests: 323 core, 51 gui and cli pass. Clippy shows nothing new. - Lucia and Mandy each get 4 boxes (hands and feet). Their close and back renders are pixel-identical to the renders before this change, as expected: no hair reaches those boxes. The change matters for headgear such as over-ear headphones. - Lucia's front shot could not be taken this time. The viewer panics in the GPU frame timer ("frame timestamps read-back" buffer destroyed, from #343). The panic comes before the hair is loaded, so it is unrelated to this change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:33:27 +00:00
github-bot changed target branch from master to gh-pr/402/base 2026-11-26 21:03:30 +00:00
github manually merged commit db1e366b14 into gh-pr/402/base 2026-11-26 21:03:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.