People: a rig for characters, with pose controls and presets #88

Manually merged
github merged 1 commit from gh-pr/88/head into gh-pr/88/base 2026-11-26 20:08:55 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-23 22:44 UTC · original
holdmysocks:claude/people-rig → master · +294 −8 · 3 files · 1 commits · merged 2026-11-23 22:50 UTC

Follow-up to #78, #80 and #86.

What this does

  • Rig. Every part of a character is bound to one skeleton: the shared ped skeleton that all the parts' joint lists start with, in its bind pose (the vertices already hold the body shape). The renderer's existing GPU skinning then poses body, clothes and shoes together.
    • A vertex that hangs mostly on a part's own helper bones takes the bone weights of the nearest skin vertex. Bound to the shared bone the helper hangs from (often the torso), a sleeve stayed behind when the arm moved.
    • An attached accessory (watch) goes to the bone it was moved onto.
    • Hair, brows and beards ride on the head bone as one piece.
  • Pose controls. A Pose section in the Character panel: arms (raise, swing), elbows, legs (lift, spread), knees, spine (bend, twist, lean), head (nod, turn, tilt), and five presets (rest, arms down, walk, sit, wave). --pose <preset> for screenshots. Angles are turned about the model's axes at each bone's bind orientation.

Verified

  • Rendered on the integrated GPU: one character in all five presets (sleeves follow, jeans bend at the knee, heeled shoes stay on the feet, no holes); three more characters walking, sitting in a jacket with beard and hat, and waving with a body shape of 0.6 / 0.3.
  • After rebasing on #87 (which changed the same function, joint_mats), the sitting pose renders pixel-identical to before the rebase.
  • cargo test --workspace: 144 core and 12 viewer tests pass.

Not verified / known limits

  • The head and spine controls were not rendered, so hair turning with the head is untested. The single sliders were exercised only through the presets.
  • The first four of a vertex's eight bone weights are used, and twist / muscle helper bones follow their parent rigidly: shoulders, elbows and knees bend more simply than in the game.
  • No strand simulation; the game's animation clips are not played on characters in the viewer.
  • Vehicles and animals are untouched by the rig code (it runs only for outfit parts), but no vehicle was re-rendered for this PR.
  • macOS Metal renderer not run.

Files

crates/sixng-gui/src/model_view.rs (character code, plus one block in joint_mats next to the aircraft block from #87), main.rs (one flag), README.md. No shader or core changes.

**@⁠holdmysocks** on GitHub · 2026-11-23 22:44 UTC · [original](https://github.com/holdmysocks/SixNG/pull/88) `holdmysocks:claude/people-rig` → `master` · +294 −8 · 3 files · 1 commits · merged 2026-11-23 22:50 UTC Follow-up to #78, #80 and #86. ## What this does - **Rig.** Every part of a character is bound to one skeleton: the shared ped skeleton that all the parts' joint lists start with, in its bind pose (the vertices already hold the body shape). The renderer's existing GPU skinning then poses body, clothes and shoes together. - A vertex that hangs mostly on a part's own helper bones takes the bone weights of the nearest skin vertex. Bound to the shared bone the helper hangs from (often the torso), a sleeve stayed behind when the arm moved. - An attached accessory (watch) goes to the bone it was moved onto. - Hair, brows and beards ride on the head bone as one piece. - **Pose controls.** A Pose section in the Character panel: arms (raise, swing), elbows, legs (lift, spread), knees, spine (bend, twist, lean), head (nod, turn, tilt), and five presets (rest, arms down, walk, sit, wave). `--pose <preset>` for screenshots. Angles are turned about the model's axes at each bone's bind orientation. ## Verified - Rendered on the integrated GPU: one character in all five presets (sleeves follow, jeans bend at the knee, heeled shoes stay on the feet, no holes); three more characters walking, sitting in a jacket with beard and hat, and waving with a body shape of 0.6 / 0.3. - After rebasing on #87 (which changed the same function, `joint_mats`), the sitting pose renders pixel-identical to before the rebase. - `cargo test --workspace`: 144 core and 12 viewer tests pass. ## Not verified / known limits - The head and spine controls were not rendered, so hair turning with the head is untested. The single sliders were exercised only through the presets. - The first four of a vertex's eight bone weights are used, and twist / muscle helper bones follow their parent rigidly: shoulders, elbows and knees bend more simply than in the game. - No strand simulation; the game's animation clips are not played on characters in the viewer. - Vehicles and animals are untouched by the rig code (it runs only for outfit parts), but no vehicle was re-rendered for this PR. - macOS Metal renderer not run. ## Files `crates/sixng-gui/src/model_view.rs` (character code, plus one block in `joint_mats` next to the aircraft block from #87), `main.rs` (one flag), `README.md`. No shader or core changes.
Every part of a character is bound to the shared ped skeleton (the common
start of the parts' joint lists, in its bind pose), so the renderer can pose
body and clothes together. Clothing vertices on a part's own helper bones
take the bone weights of the nearest skin vertex; attached accessories go to
the bone they were moved onto; hair rides on the head bone. The Character
panel has a Pose section (arms, elbows, legs, knees, spine, head; presets
rest, arms down, walk, sit, wave) and --pose sets a preset for screenshots.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:08:54 +00:00
github manually merged commit d84b18f6ae into gh-pr/88/base 2026-11-26 20:08:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.