Snap Constraints (FK to IK and Space Switching)

Please read the Limitations section before buying

(BlenderMarket in a few days)

Works for Blender 2.81, provided under GNU General Public License

The current build is as of 2/4/20


Update: Feature and Bugfix (02/04/20)

  • Feature: IK with Use Rotation will work when visual keying the target
  • Bugfix: Visual Keying IK should key the whole chain now

Problems Solved by Addon:

  • Snapping FK to IK: You’ll no longer need to create duplicated rigs just to support FK to IK snapping. At the click of a button, the IK target and Pole will be snapped based on the FK chain.
  • Space Switching: We all know the hassle of rigging props. When you want to switch hands or let go of things, you have to manually recreate the pose again. Not anymore. The addon will move the ChildOf owner bone to match it’s visual/world pose at the click of a button.

Limitations:

  • IK: Use Tail, Use Position must be True. There is support for optional Use Rotation but both Use Rotation, Use Position, and IK Constraint influences must be 1.0. As the Chain Length increases, snapping IK from FK will become less and less accurate
    limit_ik
  • ChildOf: Excluding the Target and Inverse Matrix, the rest of the options must match the default ChildfOf Constraint. Only one childof constraint should be active at any time. The addon will not correctly snap FK to ChildOf if multiple are active.
    limitation_childof
  • CopyRotation: Excluding the Target, the rest of the options must match the default CopyRotation constraint.
    limitation_copyrot

What Exactly is Provided?:

  • Snap FK to IK
    ik_copyrot4
    This also means you can setup an IK rig by Applying Selected Rest Pose to the IK bones after snapping
    setupIK_good
  • Snap FK to ChildOf
    space_switching_g
    childof_ex
    (process vid can be found on the Gumroad page, 2nd cover mp4)
  • Snap FK to CopyRotation (Ex can be seen in the Snap FK to IK gif)

UI
The first button will:

  • IK : Snap IK bones to match FK chain. Auto keys target’s affected loc/rot/scale. Auto keys mute=False if keyed previously.
  • ChildOf: Does not affect target. This will transform the owner such that when the constraint is activated, the owner will be in the same world-space location. Auto keys owner’s affected loc/rot/scale. Auto keys mute=False if keyed previously.
  • CopyRotation: Snap target to match FK worldspace rotation. Auto keys target’s rotation. Auto keys mute=False if keyed previously.

The following buttons will do a current frame visual bake on the owner. After that, the constraint mute button is exposed for convenience.


Additional Media

IK snap from FK, any chain length.


No affiliation but Rig shown can be found at: https://assetstore.unity.com/packages/3d/characters/humanoids/angelic-warrior-female-31650

Thank you for reading this far. Let me know what you think! If you have any questions, comments, or feedback, you can email me at [email protected], reply here or PM me.

4 Likes

This does look pretty cool, but using Child Of and IK constraints like that can cause some problems unless you mess with depsgraph.

When i do IK vs FK switching i do it mostly with math.Matrix functions, which can mean no need for child ofs and i add/remove the IK constraint altogether instead of muting it as leaving it there can cause cyclical dependencies with other rigging used during FK posing :+1:

Otherwise this would be a great thing :slightly_smiling_face:

One can also use a timer to monitor bone selection and make the whole process automatic if your wanting to get really clever :wink:

I appreciate the work that goes into making add-ons this is just a friendly heads up for when you release as you might get some complaints from people.

Thanks for the feedback.

I’m a bit confused on some parts, so I apologize. The IK/FK switch is unrelated to any child of constraint. It’s just a plain old IK constraint with some snapping code. No additional dependencies are created by the addon. So there’s no potential for cyclic dependencies other than the ones people create.

For the ChildOf case, specifically with a weapon being held by either hand independently or having both hands on the weapon:


The relations are:

  • Spear:
    • Child of Left Hand
    • Child of Right Hand
    • Child of “double handed” bone
  • Left/Right Hand
    • ChildOf “double handed” bone

The Double Handed bone serves as the parent of all 3 to give the appearance of both hands being attached to the Spear. So there isn’t a cyclic dependency even with all constraints existing. Muting is auto keyed to account for the parenting changes throughout the animation so changes spaces doesn’t affect the rest of your animation.

I do the same with IK constraints. I remove them completely when unneeded. But that’s not part of the addon because it’s a separate personal script that isn’t publicly ready.

In response to the bone selection monitoring and auto rigging: This addon isn’t focused on auto-rigging but it is aimed at simplifying rigging. It’s a small part of a bigger addon that’ll hopefully be as useful as the motion trail 3D addon.

And finally, it has been released, just not on Blender Market yet.

1 Like

Oh i see i misunderstood! I thought the Child Ofs were being used to get the IK targets to follow the FK movement. I haven’t seen the code so i really didn’t know :sweat_smile:

Good luck with Blender Market :slightly_smiling_face:

Yeah, just a bit of cold hard math is all.

Thanks

This looks like a very usefull script… though I need to teach myself about rigging a bit more first to decide how much i’d need it.
question: could this (the fk/Ik snapping) also work with twist bones (for the wrist for example)?
Also I wonder if it requires any specific setup/rig or will it work with any ik target/pole?

@mzprox This addon should work with any IK target/pole. If the constraint is there, it should work (with the outlined limitations in the first post). If you’d like me to test a rig you already have, I’d be glad to. Whether it works for twist bones, could you show me an example or the setup?

I’ve posted a youtube video showing IK/FK snapping, maybe it’ll answer a few of your questions.

By chance is there plans to update this?

What do you have in mind?

Sorry for delay, but I was hopping to be able to use this to allow for me to have something similar to this;


The error message I encountered was in version 3.1
Works well in version 2.93.5
thank you for this addon

hello do this work in blender 3.0?

thank you soo soo much , i appreciate this