snapping issues with MHX

Issue #1927 resolved
Alessandro Padovani created an issue

mhx 1.7.4.0111

This is reported in the daz forum, I can reproduce the issue. It only happens if we import the figure with limits enabled in the global settings, if we disable limits in the global settings then works fine. Disabling limits in the MHX properties doesn’t fix it, if limits are enabled in the global settings.

Let us know, in my opinion disabling limits is mandatory when working with IK, but I’m not sure why it works in the global settings and doesn’t work in the MHX panel.

https://www.daz3d.com/forums/discussion/672561/diffeomorphic-how-to-export-animation

There’s a video by Crosswind.

https://mega.nz/file/KaAQFAgA#7f8COWa3s74S2ZlOCTl2qXGoMeY9dZF2KEmfV4mdrWQ

my steps (works fine):

  1. disable limits in the global settings
  2. import G9 and convert to MHX without poles
  3. pose the hand with the IK control then snap FK to IK and IK to FK multiple times, it works fine

my steps (doesn’t work as shown by Crosswind)

  1. enable limits in the global settings
  2. import G9 and convert to MHX without poles
  3. disable limits in the MHX panel
  4. pose the hand with the IK control then snap FK to IK and IK to FK multiple times, the snapping can’t keep the pose

Comments (7)

  1. Thomas Larsson repo owner

    FK snapping is perfect. IK snapping has issues, even in the absense of limit constraints. If there are no pole targets, the pose space matrix of the ik hand (ik goal), ik upper_arm and ik forearm are set to the matrix of the corresponding fk bone, essentially using the code

    ikbone.matrix = fkbone.matrix
    bpy.context.view_layer.update()
    

    However, in extreme poses the ik upper arm does not match the fk bone after this, probably because it is part of an ik chain.

    This was expected. Note that the tooltip for the Pole Targets option contains the message “Enable for perfect FK/IK snapping”.

    Unfortunately, ik snapping doesn’t work perfectly even with pole targets, at least for G9, and this I don’t understand. Snapping puts the pole target in the plane defined by the upper_arm and the forearm. With the pole angle set to 90 degrees, that should put the ik bones in the same plane. Or so I thought, but other forces seem to matter too.

  2. Eka Juan

    I’ve downloaded the latest import_daz and mhx_rts, but the problem seems worsening. Now the pole can’t hold the FK IK snapping in place too.

  3. Thomas Larsson repo owner

    Well, I had forgotten how ik snapping works, in particular the role of the ik.twist bones on the Extra layers. In the last commit snapping seems to work fine, and reasonably well even without pole targets. Note that you have to regenerate the mhx rig, in order to have the ik.twist bones that are necessary for snapping.

  4. Thomas Larsson repo owner

    Note that the fix in #1935 also affects the current issue, because snapping can lead to nonzero values in locked channels. Enforcing locks might change the pose.

  5. Alessandro Padovani reporter

    Commit 1e23571.

    I can’t reproduce the issue anymore so as Thomas explained this should be fixed. If there’s nothing to add we can close as resolved.

  6. Log in to comment