Auto IK not working on DAZ figures (aka option to connect bones ?)

Issue #210 resolved
Alessandro Padovani created an issue

This may also be related to #178, in that it provides an easy way to pose an armature without rigging it.

In blender there's a powerful tool that's Auto IK. We can enable it in the toolbar in pose mode and it is similar to what the Active Pose tool does in daz studio. That is, it uses IK to pose FK chains.

Unfortunately this only works if the chain is connected. That is, the child bone needs to be connected to the parent bone for Auto IK to work. Indeed Auto IK will recognize IK chains by the connect property. So it will consider a single IK chain everything that's connected. We can use this feature to limit IK chains, for example in a leg chain we can disconnect the thigh from the hip so using the foot as handle will only drive the knee.

https://docs.blender.org/manual/en/latest/animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html

Automatic IK
The IK chain can only extend from a child to a parent bone if the child is connected to it.

Then it would be nice to have connected bones in daz figures, so to allow Auto IK to work. But there may be a couple of issues.

1) I don't know how this will affect the new daz bones. That is, the end point will change for the bones that we have to connect and I don't know if this will affect the roll angle. If I do it by hand apparently not.

2) It is not so easy to decide how to do it. In daz studio the Active Pose tool provides pins that we can use to limit the ik chain. So the user pins the chain then pose it. In blender the Auto IK tool provides a similar option that's using Ctrl-PgUp/PgDown to limit the ik chain. But this will involve connecting all the bones up to the root, that's less than desirable in my opinion, also because some bones can't. For example we can't connect the thights to the hip for we lose the rotation pivots. Though we could use "fill bones" to avoid the issue, that's again far from elegant.

A better option may be to have a tool to connect bone chains. That is, the user selects the start and end of the chain then press "connect bone chain". Please note that before connecting two bones the tool will have to reposition the parent tail to the the child head, to avoid changing the rotation pivot.

Another nice option would be to have premade ik chains with legs and arms disconnected from the body so that hands and feet could work fine as ik handles to pose the limbs. But this will involve having a "map" for every figure to decide what bones to connect. So it will not be general purpose.

Comments (8)

  1. Alessandro Padovani reporter

    edit. In a real scenario Auto IK is most useful to animate FK chains, such us tails and ribbons. So may be providing a “connect bone chain” tool is the best option.

  2. Thomas Larsson repo owner

    Advanced Setup > Rigging > Connect IK Chains does what you want, I think. You need to remove the location locks on hands and feet manually.

    As somebody pointed out, this tool comes with some problems, e.g. it probably messes up jcms.

  3. Alessandro Padovani reporter

    Thank you Thomas for the fast reply. Just tested it and connect ik chains in advanced setup has the bug that it changes the pivot. This may also be related to jcms, since changing the rotation pivot of course modifies deformations. As pointed out above, the tool needs to first reposition the parent tail to the child head, then connect, to avoid changing the rotation pivot.

    Also it seems to me that this tool is not general purpose. That is, tested on a G8F it connects arms and legs that’s cool. But what if we need to connect a dragon tail ? Is it possible ? There’s no user docs on this tool so just asking.

    edit. May be for parented bones having the parent tail and the child head in the same location, the plugin could automatically set the connected property, since in this case there should be no harm, and it could target at least some cases with daz animals. Just an idea not tested in any way.

  4. Thomas Larsson repo owner

    The tool now has three options:

    1. Select which type of chains to connect: Arms, legs, arms+legs, or selected bones.
    2. Choose the location of the common joint: child head, parent tail, or midpoint.
    3. Option to unlock location for the last bone in the chain (hand/foot), so it can act as an IK target.

    I also rearranged the buttons; this button and Optimize Pose for IK are both moved to the corrections section. Auto IK does not work well with G8F legs, so it is a good idea to optimize the leg rest pose first.

  5. Alessandro Padovani reporter

    That sounds great. As for commit f2112a6 I get an error when I try to apply the rest pose though. Also I’d keep optimize and apply rest pose together just a suggestion it makes sense for me at least.

    steps to reproduce the issue:

    1. import a G8F with default options
    2. optimize rest pose for ik
    3. apply rest pose

  6. Thomas Larsson repo owner

    Oops. The optimize button now applies rest pose automatically, so it is not necessary to have an separate button for it in that panel. But I forgot to check that the Apply rest pose button still worked.

    Edit: Made apply rest pose optional.

  7. Alessandro Padovani reporter

    Commit a7481b0 seems to work very great. I am not sure what “unlock last bone” does, since location is not available for connected bones anyway. Though I don’t use location locks and limits on import so may be I miss something.

    Marking as resolved.

  8. Log in to comment