Wednesday, March 28, 2012

Attaching Rigs -- reparenting IKhandles and Loops

Hi,

Here is a simple example of loop that could happen if we re-parent an existing rig ikhandle to a new rig and we have the new rig in same hierarchy as existing rig.

Suppose our existing rig was shoulder, elbow, hand with an ikhandle between shoulder and ending at hand:


shoulder
|
|--elbow
|
|--hand


Suppose our new rig is -- new_hand

If we parented new rig to the hand of existing rig, and parented the ikhandle to the new rig:


shoulder
|
|--elbow
|
|--hand
|
|--new hand
|
|--ikhandle


We would get loops.


Why?

move new hand
moves handle (because handle child of new hand)
moves elbow (because elbow part of ik network)
moves hand (because hand child of elbow)
moves new_hand (because new_hand child of hand)
---
moves handle (because handle child of new hand)
moves elbow (because elbow part of ik network)
moves hand (because hand child of elbow)
moves new_hand (because new_hand child of hand)
---
moves handle (because handle child of new hand)
moves elbow (because elbow part of ik network)
moves hand (because hand child of elbow)
moves new_hand (because new_hand child of hand)
.
.
.
loops :<


I think a hierarchy like this may be more helpful:


shoulder
|
|--elbow
|
|--hand

new hand
|
|--ikhandle



move new hand
moves handle (because handle child of new hand)
moves elbow (because elbow part of ik network)
moves hand (because hand child of elbow)

no loops :)


Hope this is helpful,
Regards,
Nate


Inspired by Jason Schleifer's Animator Friendly Rigging (jasonschleifer dot com)