Pose Studio: attach an IK handle to a point on an avatar or object (continuous solve) #716

Open
opened 2026-10-12 11:32:39 +00:00 by sky_line · 0 comments
Owner

Pose Studio (#530) feature: pin an IK handle to a point on another avatar, on yourself, or on an object, and keep solving the chain to that point every frame as the target moves.

Use cases: a hand resting on someone's shoulder while they animate, holding a railing or a cup, a hand on your own hip, feet planted on a moving vehicle or prop.

How it would work

  1. Pick the target: with an IK handle selected, "Attach to surface" lets you click a point in the world. It uses the GPU cursor pick (#702), so it lands on what is drawn, including rigged mesh.
  2. Anchor the point so it follows its owner:
    • Rigid object or worn rigid attachment: object-local position (+ normal).
    • Rigged mesh / avatar body: the skinned triangle + barycentrics, or the nearest joint + offset as a cheaper fallback, so the point follows the animated surface.
    • Avatar without a surface hit: nearest joint + offset.
  3. Continuous solve: every frame the anchor is resolved to a world position and the chain's IK solves to it (with the existing pins / limits). If the target is out of reach, the chain stretches toward it as far as it can.
  4. Options: offset from the surface (e.g. palm thickness), align the end bone to the surface normal, blend weight / smoothing, and release (back to a free handle at the current position).
  5. Lifecycle: the attachment ends cleanly if the target object or avatar disappears (derender, leaves, teleport), with the handle kept where it was.

Notes

  • Shared poses (pose sync, #500 / #531): send the constraint, not the result. Streaming the solved bones every frame would flood the bridge (llRegionSay). Instead the pose channel gets a new record kind carrying the attachment itself, sent once and again only when it changes or is released:
    • the chain / end bone, the target's key (avatar or object), the anchor, offset and options;
    • each receiving Slipstream viewer resolves the anchor and solves the IK locally every frame, so the hand follows the target as that viewer sees it.
    • Anchor across viewers: other viewers may hold a different LOD of a rigged mesh, so triangle indices aren't portable. Send joint + offset (+ surface normal) for avatars and rigged mesh, object-local position for rigid objects; the receiver may refine onto its own drawn surface along the normal.
    • Versioning: a protocol version bump. Receivers that don't understand the record ignore it; the sender may add a low-rate baked pose (e.g. 1-2 Hz deltas of the chain) only when an older Slipstream listener is nearby, so newer viewers never pay for it.
    • Consent rules are unchanged: attaching to another avatar uses the existing posing consent; the target avatar being touched needs no extra grant since it isn't posed.
  • Exports (Pose Creator #117) bake the solved positions per keyframe.
  • A rigged surface point needs the skinned position, which lives on the GPU: read back the anchor's triangle each frame (a tiny readback, a frame late) or recompute it on the CPU from the joint palette for that one triangle.
**Pose Studio (#530) feature:** pin an IK handle to a point on another avatar, on yourself, or on an object, and keep solving the chain to that point every frame as the target moves. **Use cases:** a hand resting on someone's shoulder while they animate, holding a railing or a cup, a hand on your own hip, feet planted on a moving vehicle or prop. **How it would work** 1. **Pick the target:** with an IK handle selected, "Attach to surface" lets you click a point in the world. It uses the GPU cursor pick (#702), so it lands on what is drawn, including rigged mesh. 2. **Anchor the point so it follows its owner:** - Rigid object or worn rigid attachment: object-local position (+ normal). - Rigged mesh / avatar body: the skinned triangle + barycentrics, or the nearest joint + offset as a cheaper fallback, so the point follows the animated surface. - Avatar without a surface hit: nearest joint + offset. 3. **Continuous solve:** every frame the anchor is resolved to a world position and the chain's IK solves to it (with the existing pins / limits). If the target is out of reach, the chain stretches toward it as far as it can. 4. **Options:** offset from the surface (e.g. palm thickness), align the end bone to the surface normal, blend weight / smoothing, and release (back to a free handle at the current position). 5. **Lifecycle:** the attachment ends cleanly if the target object or avatar disappears (derender, leaves, teleport), with the handle kept where it was. **Notes** - **Shared poses (pose sync, #500 / #531): send the constraint, not the result.** Streaming the solved bones every frame would flood the bridge (llRegionSay). Instead the pose channel gets a new record kind carrying the attachment itself, sent once and again only when it changes or is released: - the chain / end bone, the target's key (avatar or object), the anchor, offset and options; - each receiving Slipstream viewer resolves the anchor and solves the IK locally every frame, so the hand follows the target as that viewer sees it. - **Anchor across viewers:** other viewers may hold a different LOD of a rigged mesh, so triangle indices aren't portable. Send joint + offset (+ surface normal) for avatars and rigged mesh, object-local position for rigid objects; the receiver may refine onto its own drawn surface along the normal. - **Versioning:** a protocol version bump. Receivers that don't understand the record ignore it; the sender may add a low-rate baked pose (e.g. 1-2 Hz deltas of the chain) only when an older Slipstream listener is nearby, so newer viewers never pay for it. - Consent rules are unchanged: attaching to another avatar uses the existing posing consent; the target avatar being touched needs no extra grant since it isn't posed. - **Exports** (Pose Creator #117) bake the solved positions per keyframe. - A rigged surface point needs the skinned position, which lives on the GPU: read back the anchor's triangle each frame (a tiny readback, a frame late) or recompute it on the CPU from the joint palette for that one triangle.
sky_line added this to the Slipstream project 2026-10-12 11:32:39 +00:00
Sign in to join this conversation.
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#716
No description provided.