#1458: An arm handle on a rigged hand stays on the hand, never the thumb #1480

Closed
TheSlowly wants to merge 1 commit from TheSlowly/Slipstream:ik-hand-handle-1458 into main
Collaborator

Fixes #1458.

The reporter's log: arm_right was recognised as a hand (3 rigged finger branches) and its handle sat at the knuckles; arm_left wasn't (only the thumb rigged above the weight threshold), so it was treated like a hoof: the farthest region won (mHandThumb3Left) and extend grew the chain into mHandThumb1Left. Now a rigged thumb makes the wrist a hand (hooves have no thumb), a hand never extends and its handle never sits on the thumb. Hooves rigged on finger bones (incl. cloven, 2 branches) still extend as before. The decision lives in slposeiktip.h.

Test: slposeiktip_test.cpp (standalone g++, reproduces the reporter's left/right lines before the fix).

Fixes #1458. The reporter's log: arm_right was recognised as a hand (3 rigged finger branches) and its handle sat at the knuckles; arm_left wasn't (only the thumb rigged above the weight threshold), so it was treated like a hoof: the farthest region won (mHandThumb3Left) and `extend` grew the chain into mHandThumb1Left. Now a rigged thumb makes the wrist a hand (hooves have no thumb), a hand never extends and its handle never sits on the thumb. Hooves rigged on finger bones (incl. cloven, 2 branches) still extend as before. The decision lives in slposeiktip.h. Test: `slposeiktip_test.cpp` (standalone g++, reproduces the reporter's left/right lines before the fix).
Cause: updateTips called the wrist a hand only when at least 3 child
branches carried rigged vertices (weight > 0.2 in the avatar's rigging
info). On the reporter's body, the rigging info for the left hand showed
3 rigged regions in all: the wrist and the thumb (the log names the thumb
tip as the farthest). That is 1 or 2 branches, so the left wrist failed
the hand test while the right one passed. Any wrist that failed the test
was handled like a hoof: the search went to every depth, picked the
farthest region (the thumb tip), and `extend` grew the chain into
mHandThumb1Left, so the thumb became the arm's end bone. Hooves rigged on
the hand bones (#530) never use the thumb.

Fix: the hand/hoof decision moves into slposeik::chooseTip
(slposeiktip.h), a dependency-free function. A new `thumb` key in
ik_chains.xml (mHandThumb1Left / Right) makes the wrist a hand whenever
anything at or below the thumb is rigged, whatever the branch count. A
hand's handle never sits on the thumb. When nothing else is rigged
within hand_depth, the handle falls back to the tip list (the knuckles).
A hand never extends. Hooves rigged on the finger bones without the
thumb still extend as before (one or two branches).

Test-Plan:
    g++ -std=c++20 -Wall -Wextra -Werror indra/newview/tests/slposeiktip_test.cpp -o /tmp/slposeiktip_test && /tmp/slposeiktip_test
    (before the fix: the reporter's left hand fails with handle mHandThumb3Left, extension 1 joint)
    In world: human mesh body: both arm handles at the hands, both arm chains end at the wrist (INFO "IK chain arm_*" lines)
    In world: pony: front handles on the hooves as before, the chains still grow to the hoof bone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Collaborator

Superseded by your fix on main (7ce010b3ff), closing this one. The ticket's still in testing; I'll check your version in world.

Superseded by your fix on main (7ce010b3ff), closing this one. The ticket's still in testing; I'll check your version in world.
TheSlowly closed this pull request 2026-11-08 00:23:02 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream!1480
No description provided.