Viewer: eyes follow the head when it is posed #181

Manually merged
github merged 1 commit from gh-pr/181/head into gh-pr/181/base 2026-11-26 20:15:57 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 16:42 UTC · original
holdmysocks:claude/people-eyes-follow → master · +26 −1 · 1 files · 1 commits · merged 2026-11-24 17:02 UTC

Bug

In the model viewer, the Pose controls for the head (nod, turn, tilt) and any clip that turns the head moved the face but left the eyeballs where they were. With a strong turn an eyeball ended up beside the ear.

Cause

The eye part is skinned to the face rig's own bones (FB_L_Eyeball, FB_L_Iris, FB_L_Pupil and the right-side ones), which hang from the facial root under the head bone. When the viewer binds every part to the shared skeleton, a step meant for clothing gave vertices on a part's own bones the bone weights of the nearest body-skin vertex. The nearest body skin to an eye is the neck, so the eyes were bound to the neck and torso.

Fix

Vertices on the face rig's own bones (FB_..., FACIAL_...) keep the shared bone their chain leads to, the head. Clothing on its own helper bones is handled as before.

Checked

  • Workspace tests pass.
  • Rendered one character with a strong head pose (nod 20, turn 45, tilt 15 degrees) before and after, a second character with a different pose after, and the rest pose after: the eyes sit in their sockets in every one.

Not covered

  • sixng outfit exports are not affected: they keep each part's own bones, and this re-weighting step is viewer only. No export was re-checked for this PR.
  • The eyes do not look around: the eyeball bones are not animated by the Pose controls.
  • A debug print of how each part is rigged is added behind an environment variable.
**@⁠holdmysocks** on GitHub · 2026-11-24 16:42 UTC · [original](https://github.com/holdmysocks/SixNG/pull/181) `holdmysocks:claude/people-eyes-follow` → `master` · +26 −1 · 1 files · 1 commits · merged 2026-11-24 17:02 UTC ## Bug In the model viewer, the Pose controls for the head (nod, turn, tilt) and any clip that turns the head moved the face but left the eyeballs where they were. With a strong turn an eyeball ended up beside the ear. ## Cause The eye part is skinned to the face rig's own bones (`FB_L_Eyeball`, `FB_L_Iris`, `FB_L_Pupil` and the right-side ones), which hang from the facial root under the head bone. When the viewer binds every part to the shared skeleton, a step meant for clothing gave vertices on a part's own bones the bone weights of the nearest body-skin vertex. The nearest body skin to an eye is the neck, so the eyes were bound to the neck and torso. ## Fix Vertices on the face rig's own bones (`FB_...`, `FACIAL_...`) keep the shared bone their chain leads to, the head. Clothing on its own helper bones is handled as before. ## Checked - Workspace tests pass. - Rendered one character with a strong head pose (nod 20, turn 45, tilt 15 degrees) before and after, a second character with a different pose after, and the rest pose after: the eyes sit in their sockets in every one. ## Not covered - `sixng outfit` exports are not affected: they keep each part's own bones, and this re-weighting step is viewer only. No export was re-checked for this PR. - The eyes do not look around: the eyeball bones are not animated by the Pose controls. - A debug print of how each part is rigged is added behind an environment variable.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:15:55 +00:00
github manually merged commit 84e1b422ad into gh-pr/181/base 2026-11-26 20:15:57 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.