Outfit export: an attached accessory goes on its attach bone #448

Manually merged
github merged 5 commits from github-bot/gh-448 into gh-pr/448/base 2026-11-27 05:11:49 +00:00 AGit
Owner

@⁠holdmysocks on GitHub · 2026-11-27 03:49 UTC · original
holdmysocks:claude/people-watch → master · +322 −43 · 13 files · 5 commits · merged 2026-11-27 05:10 UTC

Outfit export: an attached accessory (cs_jason's watch) goes on its attach bone instead of staying on the floor. The body-skin session found the watch on the floor in the export.

Cause:

  • A watch is modelled at its own root bone, Watch_Root, at the authoring origin under the feet. It also carries attach bones under the body (Watch_L_Wrist, Watch_R_Wrist) that no vertex uses. The game moves the root onto an attach bone.
  • The viewer already did that (place_attached), but the outfit export didn't. In the GLB the root stayed a child of SKEL_ROOT at the floor.

Change:

  • sixng-core outfit::accessory_attach: the detection, moved out of the viewer so both use it. The rules are unchanged:
    • every used bone shares one name prefix that isn't a body prefix;
    • the root is the topmost ancestor with that prefix;
    • the vertices lie within 25 cm of the root;
    • the attach bone is unused, has the same prefix, isn't under the root, and is at least 30 cm away;
    • the left one wins.
  • export_outfit, after merging the skeletons: for each such part, the root bone becomes a child of the attach bone. The root and the bones under it get a rest pose moved by bind(attach) · bind(root)⁻¹. The inverse bind matrices stay, so the watch sits on the wrist and follows it in animations. The report lists each placed part under attached.
  • The viewer's place_attached calls the shared function; it behaves as before.
  • New test watch_goes_on_the_wrist.

Verified:

  • cargo test --release --locked -p sixng-core -p sixng-gui --lib --bins passes.
  • sixng outfit cs_jason --look 0: the report shows s01_watchsports_mr1_000_regular_ws00_full with root Watch_Root on Watch_L_Wrist. Loaded back into the viewer, the GLB shows the watch on the left wrist, with nothing on the floor.
  • The viewer's cs_jason look 0 still shows the watch on the left wrist.
**@⁠holdmysocks** on GitHub · 2026-11-27 03:49 UTC · [original](https://github.com/holdmysocks/SixNG/pull/448) `holdmysocks:claude/people-watch` → `master` · +322 −43 · 13 files · 5 commits · merged 2026-11-27 05:10 UTC Outfit export: an attached accessory (cs_jason's watch) goes on its attach bone instead of staying on the floor. The body-skin session found the watch on the floor in the export. **Cause:** - A watch is modelled at its own root bone, `Watch_Root`, at the authoring origin under the feet. It also carries attach bones under the body (`Watch_L_Wrist`, `Watch_R_Wrist`) that no vertex uses. The game moves the root onto an attach bone. - The viewer already did that (`place_attached`), but the outfit export didn't. In the GLB the root stayed a child of `SKEL_ROOT` at the floor. **Change:** - sixng-core `outfit::accessory_attach`: the detection, moved out of the viewer so both use it. The rules are unchanged: - every used bone shares one name prefix that isn't a body prefix; - the root is the topmost ancestor with that prefix; - the vertices lie within 25 cm of the root; - the attach bone is unused, has the same prefix, isn't under the root, and is at least 30 cm away; - the left one wins. - `export_outfit`, after merging the skeletons: for each such part, the root bone becomes a child of the attach bone. The root and the bones under it get a rest pose moved by bind(attach) · bind(root)⁻¹. The inverse bind matrices stay, so the watch sits on the wrist and follows it in animations. The report lists each placed part under `attached`. - The viewer's `place_attached` calls the shared function; it behaves as before. - New test `watch_goes_on_the_wrist`. **Verified:** - `cargo test --release --locked -p sixng-core -p sixng-gui --lib --bins` passes. - `sixng outfit cs_jason --look 0`: the report shows `s01_watchsports_mr1_000_regular_ws00_full` with root `Watch_Root` on `Watch_L_Wrist`. Loaded back into the viewer, the GLB shows the watch on the left wrist, with nothing on the floor. - The viewer's cs_jason look 0 still shows the watch on the left wrist.
A watch is modelled at its own root bone under the feet; the export left that root on SKEL_ROOT, so the watch stood on the floor. The detection the viewer used moves to sixng-core (outfit::accessory_attach); the export reparents the root under the attach bone with a rest pose moved by bind(attach) * bind(root)^-1.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:53:34 +00:00
github-bot changed target branch from master to gh-pr/448/base 2026-11-27 05:11:48 +00:00
github manually merged commit 945682c3af into gh-pr/448/base 2026-11-27 05:11:49 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.