IK Hand bone roll incorrect?

Issue #1549 resolved
Jasper29 created an issue

I think the IK hand bone rolls are a little off (Rigify). They are at 122 degrees in this file with the newest commit, but upon checking a recent file (same exact model/morphs), the hand roll is 116. I tried with both Daz Orientation on and off, just incase that caused it, but the results are the same. I do not remember it being his way, but I could be wrong. I changed the bone roll on one hand to show a comparison.

Am I going crazy, or has this changed?

Steps to recreate:

1: Import Genesis 8 character

2: Generate Rigify rig

3: Observe IK hand bones roll angles (both in Edit and Pose Modes)

Comments (43)

  1. Thomas Larsson repo owner

    Apparently it is Rigify that changes the hand roll. When I load a standard G8F and generate a metarig, the hands have roll 135 degrees, but rigify changes the roll angle to 121 degrees. This happens even if you use the Generate Rig button in the armature context, so this is something that rigify does.

  2. Jasper29 reporter

    Hmmm… This might be a Blender 3.5/3.51 bug because I’ve rigged plenty of models (non DAZ/without Diffeo) with the Rigify metarig before and never had this happen.

  3. Alessandro Padovani

    possible solution.

    I am not a rigify expert, nor I am good at rigging. But the metarig has options to generate rigify. In this case the roll angle can be preserved using a manual rotation axis for the metalimb, instead of automatic.

    Please test if this works fine I just tried and seems to work, again I have very little knowledge of rigify.

  4. Alessandro Padovani

    possible bug. create metarig.

    While we’re at it. It seems to me that create metarig doesn’t work fine, but I never used it so may be I miss something.

    steps:

    1. standard import G8F and merge rigs
    2. create metarig with “keep daz rig“ and “use daz rig for deform“
    3. check the mesh, it is binded to the “rigified” rig without twist bones, instead of the original daz rig with twist bones. This way it doesn’t use the daz rig for deform as per the chosen option.

  5. Jasper29 reporter

    @Alessandro Padovani If you use manual rotation axis, it will cause the arms to jump/move when switching to pole targets, which is not ideal. It will happen regardless if auto-align hands/feet is enabled. I believe the better(and non-destructive) option for now would be to edit IK hand bones roll angle after rig generation, and if needed just change it back if it presents a problem. Other than that maybe we should file a bug report with Blender devs if this is a Rigify problem.

    As for using the DAZ rig to deform the mesh (while keeping DAZ rig), I can confirm this behavior, although I do not ever keep the DAZ rig personally, so I never noticed it before.

  6. Alessandro Padovani

    @Thomas

    possible bug. auto align. I had a better look and I believe what I’m proposing with the manual rotation axis is the “auto align hand/foot“ option when we create rigify, that for some reason doesn’t seem to work. That is, the option becomes available only with manual axis but the plugin doesn’t seem to set the manual axis, at least the manual axis is not set if I keep the metarig.

    steps:

    1. import G8F
    2. convert to rigify with “auto align“ and uncheck “delete metarig“ so to keep the metarig
    3. check the metarig, the manual axis and auto align are not set for the limbs, thus the hand roll is changed

    note. Then if manual axis and auto align are required for the hand roll to work fine, it doesn’t make sense to have it optional we should always do that.

    @Jasper I don’t get the limb jump when I toggle poles, or I’m unable to reproduce the issue. Beware that poles will work fine only if we “optimize pose for ik” as required by rigify, otherwise you can’t use poles.

    steps:

    1. import G8F
    2. create metarig with “optimize pose“
    3. in the metarig set limbs to “x manual” and “auto align“
    4. rigify metarig
    5. pose the figure and toggle poles as you wish, works fine here

  7. Jasper29 reporter

    UPDATE (to using manual axis+auto align hand): It is Rigify because I followed the same steps with the basic metarig isolated, the same behavior occurs.

  8. Jasper29 reporter

    UPDATE: I found that when selecting the manual axis+auto align options, it flips the upper arm IK bone to +x instead of -x. To fix this, you must select the upper arm IK, go to Edit mode, go to armature tab, Bone roll tab, recalculate roll, then select Local -x tangent. (Or just hit ‘Shift+N’)

    Before:

    After:

    Still doesn’t fix original issue though, which is Rigify side.

  9. Alessandro Padovani

    @Jasper29 important. poles jump. I watched your video. The culprit is “improve ik“ that is not compatible with rigify poles so you can’t use rigify poles with it. But if you use “optimize pose“ then you don’t need “improve ik“.

    @Thomas Larsson improve ik tooltip. It is important to add in the tooltip that “improve ik“ is not compatible with rigify poles. Also for rigify it is better to set “optimize pose” as default instead of “improve ik“.

    Improve IK tooltip (only for rigify): “Improve IK by storing a bending angle. This is compatible with daz poses but doesn’t work with rigify poles so they can’t be used. Not needed if Optimize Pose for IK is used.“

  10. Jasper29 reporter

    If Thomas can confirm as well, then this will make things clear if it is some issue in regards to that situation on my end, but regardless the original post is about the IK hand bones roll angle being off, something we can all confirm, yes?

  11. Alessandro Padovani

    @Jasper. That’s odd. I can’t reproduce the issue here tried both with G8F and Victoria 8.1. The pole jumping only appears with “improve ik“. Did you use a rested model in your example or did you prebend something before exporting ? Because if you prebended then that could also interfere with “optimize pose“ and poles. That is, rigify needs a specific prebended T pose for poles to work fine, this has always been a design flaw with rigify and depends on the metarig pose. So I suspect that the pole jumping you get may depend on the specific model you’re using and her rest pose.

    Then yes the roll off is confirmed but here I can fix it with “auto align“, that is anyway a feature already implemented but not working as noted above.

    @Thomas. Anyway my notes above on “improve ik tooltip” and “possible bugs” are independent from the poles jump and should be fixed.

  12. Jasper29 reporter

    @Alessandro I never edit/bend the resting pose of any character I import in DAZ--it’s just a Genesis 8 base body with some body morphs. I DO normally edit the metarig before generation (only slightly bending the knees) for proper use with Rigify, but I did not do that at all in the showcased examples.

  13. Jasper29 reporter

    It could be a specific bug on my end, I do have Angavrilov’s feature sets enabled, but again, they were not used on the metarig during examples. I’m not worried because if it is a bug it only happens when doing a very niche thing that one would not ever normally do. Just realized it could very well be a Blender 3.51 bug--are you using 3.51 as well?

  14. Alessandro Padovani

    Yes. We provided extensive information I agree Thomas can verify and let as know so we’ll wait for that. You can try with the default G8F and Victoria 8.1 I don’t get poles jumping here unless I use “improve ik“. You may as well disable Angavrilov’s just in case.

    daz studio 4.21.0.5, blender 3.5.1, diffeomorphic 1.7.1.1571

  15. Jasper29 reporter

    hmm.. strange indeed. Well if a third party can confirm about using x manual rotation, then it probably is on my end. If I keep it on automatic, my poles are fine, everything is fine except of course the IK hand roll being off

  16. Jasper29 reporter

    @Alessandro, I removed Angavrilov’s Feature sets and imported a base Genesis 8 character and the issue with jumping pole targets still persists (upon enabling manual axis+auto align).

    It was worth a shot--we will wait for Thomas then.

  17. CookItOff

    I want to chime in here and say Do Not use “improve ik” with Rigify, at least for now.

    We had a discussion about what improve ik is doing to the Rigify generated rigs in another thread and that’s why Thomas made it an option. It will give you crazy thigh and upper arm results when using it. I can see errors happening the most when applying a BVH file to a character if improve ik was used at generation.

  18. Alessandro Padovani

    Commit 23f9757.

    bug. auto align. The auto align option still doesn’t work. The metarig limbs have to be manual rotation and auto align. Also auto align has to be used to fix the hand roll angle, so it would be better on by default.

    bug. create metarig with daz rig. If we create metarig keeping the daz rig as deform, the mesh is binded to the rigify rig instead of the daz rig.

    steps:

    1. create metarig keeping the daz rig as deform
    2. rigify metarig, the mesh is not binded to the daz rig

  19. Jasper29 reporter

    Just quick rigged a non DAZ character with Rigify, and can say that using X manual rotation with auto align still causes poles/arm to jump for me--however I can confirm that the hand rotation issue itself is Diffeo now because the hand rotation is fine here:

    hand roll by seems fine though:

    @Alessandro just wondering, so if you were to add just a human metarig to a blank scene in Object Mode, then turned on x manual rotation with hand auto align, generated rigify rig then turned on hand poles, you still don’t have any issue?

  20. Thomas Larsson repo owner

    Auto align is now set, and the create/rigify metarig tools should now work with keeping the daz rig. I removed the possibility to just duplicate the original rig and meshes into a new collection, since that can be done with standard Blender tools. The Keep Rig option now always means that the daz rig is used for deformation.

  21. Alessandro Padovani

    @Jasper29 I tried your steps and no, I don’t have issues with poles here. I believe you may have some other addons enabled interferring with rigify. You can try with a default blender installation by just moving or renaming the addons folder so blender will start with the default addons installed. I’m using blender 3.5.1 on Windows 10.

    @Thomas Larsson poles jumping. Can you please confirm this so we have a comparison and can settle this one.

    steps:

    1. on a blank blender scene generate human meta rig with the blender tool, no daz or difeomorphic involved at all
    2. set x manual and auto align for the limbs (arms and legs), no other options touched everything else is default
    3. rigify metarig, again with the blender tool, no daz or diffeomorphic involved at all
    4. go to pose mode and toggle poles, nothing jumps here everything is fine

  22. Jasper29 reporter

    @Thomas last commit I noticed you changed the legs to x manual rotation as well. Not a huge deal because one can change it back to automatic before rig generation, but the feet IK bones were fine and had no roll angle issues. Also, now the feet controller pads are rotated because of this:

  23. Alessandro Padovani

    Commit df1b882.

    bug. auto align. I agree with Jasper. The auto align option doesn’t work as intended. Specifically, the plugin always sets manual x rotation and never sets auto align. Please note that auto align is a sub option of manual rotation. Unless Thomas you do want to always use manual rotation for some reason, if so please let us know.

    Please note that if we use “automatic” or “manual x with auto align”, then the feet controls are not rotated. If we use “manual x” without auto align then the feet controls are rotated as reported by Jasper.

    # auto align option (aka manual rotation with auto align)
    if auto align is on
        set x manual and auto align for the limbs (arms and legs)
    else
        set automatic
    

    steps:

    1. create metarig
    2. check the metarig, manual rotation is set and auto align is not
    3. rigify metarig with auto align
    4. check the metarig, manual rotation is set and auto align is not

  24. Alessandro Padovani

    note. minor.

    It seems to me there's some confusion with “create metarig” and “rigify metarig”. We should set the metarig options for "create metarig" and the rigify options for "rigify metarig". Also because the user can edit the metarig properties so it makes little sense to put them in "rigify metarig". But this is minor not a bug.

    create metarig:

    • optimize pose for ik
    • auto align hand/foot
    • recalc roll

    rigify metarig:

    • keep daz rig
    • improve ik
    • split shin bone
    • reuse bend and twist bones
    • finger ik
    • tongue ik
    • custom layers

  25. Thomas Larsson repo owner

    The auto align hand option is checked again. In earlier versions of rigify there was only one rig type, limbs.super_limb, but now there are two, limbs.arm and limbs.leg, and I had missed copying the info to the new rig types.

    There is now a better separation between the create and rigify metarig buttons. More options are associated with the create part than you suggested, because they are used already in the first stage. The option values are stored as custom properties of the metarig so they are used consistently in the rigifying stage.

  26. Jasper29 reporter

    Thank you Thomas--but just so I understand, the IK hand bone roll angle issue cannot be fixed? We have to use manual rotation with auto align as a workaround (or manually edit roll)?

  27. Alessandro Padovani

    Commit aad389a.

    bug ? I’m not sure it works as intended. That is, the “x manual” rotation is always set even without the auto align option. As I understand it we either set “automatic” or “x manual with auto align”. Unless there’s some reason why you always want “x manual”. Let us know.

    Also I noticed the “custom layers” option is both in “create metarig“ and in “rigify metarig“ that’s probably a duplicate. Let us know.

    @Jasper29 The hand roll is fixed with auto align. Then as requested above @Thomas Larsson has to confirm if the poles jumping is a problem on your side, since I get no issues here with poles.

  28. Jasper29 reporter

    @Alessandro I see, yes you are right. With auto align and x manual the roll is fixed. I guess my question is then how come the hand roll was normal with Diffeo before with automatic rotation on by default (like Rigify is by default as well), and now it has changed?

    As far as the pole jumping issue, it is most likely an error on my side, I wouldn’t doubt it--but it can be fixed easily.

  29. Alessandro Padovani

    Commit aad389a. update.

    @Jasper29 I checked diffeomorphic 1.6.1 with blender 2.93 and I see that super limb was always set to “x manual“ that’s why it worked with the hand roll. That is, “automatic“ was never used and it’s a bug. That settles it then.

    If there’s nothing to add we may mark as resolved.

    @Thomas Larsson Let us know if you want “custom layers“ both in “create metarig“ and “rigify metarig“ or if it is bug. Everything else is fine and the issues are fixed now.

  30. Jasper29 reporter

    I stand corrected then, I thought it was always set to automatic. So yes issue is resolved then, thank you.

  31. CookItOff
      <div class="preview-container wiki-content"><!-- loaded via ajax --></div>
      <div class="mask"></div>
    </div>
    

    </div> </form

    Just wrote an long comment how my add-on may help with this issue, and the add file feature for this site deleted it. grrrrrrrrrr.

  32. CookItOff

    @Thomas Larsson Thomas, I wrote an add-on that helps me with cleaning up motion capture files when using Rigify.

    *You are 100% free to use my add-on how every you need. Incorporate it into diff or clean it up and make it better.

    OK. what my add-on does and why I created it:

    The reason I needed to create the add-on is that Rigify’s native snap IK to FK doesn't properly snap the upper chain bones (Thigh and Upper-arm); the leg or arm alignment will not properly match what is happen with the FK keys. It’s really noticeable if the leg or arm is in a unique position. You can solve this by clicking on the thigh or upper-arm controllers and snapping IK to FK a second time then re-keying it for each frame, but that really isn’t an option for anything over 10 frames. The problem is that when you want to snap and bake multiple frames using the “Action” button, under snap to IK to FK, the native Rigify behavior only snaps the controller one time before keying it.

    **What my add-on does is that “double snaps” the upper chain controller and only those controllers, before re-keying for a specified frame-range. This solves the single snap issue I noted above.

    *The important part is that my-add-on “double snaps” the upper chain controllers like one would do manually to solve the issue above, and then re-keys its position.

    *How to use it: Click on either the IK foot or hand controller and snap the IK to FK like normal. After Rigify snaps IK to FK bake the all the snaps using Rigify’s “Action” button; once again like normal. After those bake open my add-on panel in the “Scene Properties” icon next to the outliner. That’s where I put it for the time being.

    Click on either both Thigh or Upper-Arm controllers and then click the corresponding button in my add-on.

    **Something I would love the add-on to have is away to manual set the frame-range from the add-on panel or tell it to match the scene’s frame-range. But this is beyond my coding skills at the moment. As of now I have to manually go into the script before running it and manually adjust the frame-range.

    I hope this helps with the issue or helps track something down. Either way, my add-on is something I can live without with Rigify’s current snap function.

    I shared the add-on in the comment above; it’s called Re-Bake.

    Thanks,

    Tim

  33. Log in to comment