problems with hinges mhx

Issue #1911 closed
zack redfiel created an issue

Hi. I am using diffeomorphic 1.7.3.2002 with mhx 1.7.3.0108 and Blender 4.0.2
and usually I use the hinges option because I like its function, but in this version I get this shoulders deformation, but in the previous version of diffeo 1.7.2.1763 with mhx 1.7.2.0093 this does not happen.

Comments (11)

  1. Thomas Larsson repo owner

    I don’t see anything like this. I don’t use hinges myself, but I’m quite sure that it hasn’t changed for a long time, and I don’t see how it could cause that deformation.

    Hinges work like this:

    • armSocket in the Extra collection is a child of clavicle.
    • arm_parent in the Help collection either copies the armSocket location (hinge) or the armSocket full transform (no hinge).
    • upper_arm is a child of arm_parent.

    It might be better to put the socket and parent bones before the clavicle instead, so the clavicle is also included among the hinged bones.

    Revisiting this I found a way to rearrange the arm_parent constraints that simplifies the code and eliminates a driver, but this shouldn’t change the deformation in the viewport.

  2. zack redfiel reporter

    I forgot to mention that it is a custom character and the blender in the second image is a 3.6 version, but the character with the armature and jcms are the same. I did the same process to convert to mhx and I get this result. I tried to do the same with the original female G8 and the deformation is less than the custom character, but when I do the same on another version I mentioned, there is a difference.

  3. Thomas Larsson repo owner

    So the problem has to do with jcms? That makes sense, but unfortunately I think it is unavoidable. A shoulder jcm is driven by the local rotation of the upper arm, i.e. the rotation relative to the clavicle. However, as I described in my previous comment, there are two bones inbetween, and the arm_parent bone is a child of the hip. There are two cases:

    No hinge: Due to the copy transforms constraint, the upper arm is effectively a child of the clavicle, and the local rotation is the rotation relative to the clavicle. The jcms work correctly.

    Hinge: The upper arm is a child of the hip, even if the arm is located at the end of the clavicle due to the copy location constraint. The local rotation is the rotation relative to the hip, but the jcm expects the rotation relative to the clavicle. So the jcm is driven by the wrong local rotation.

    A related problem is that rotation limits don’t work properly. The arm can only rotate 40 degrees downwards on the z axis, which makes the arm point straight down. However, if we rotate the spine, the arm can penetrate the body, because the constraint limits the rotation relative to the hip and not relative to the clavicle.

    Left arm hinged, right arm not.

  4. zack redfiel reporter

    Hi thanks for this information about the hinges, it seems that the recent version of MHX has these hinge options that fix this problem. How does this work?

  5. Thomas Larsson repo owner

    They don’t. The commits were premature. I did it at work and thought that I could fix it quickly at home, but it didn’t work out as I had hoped.

  6. Thomas Larsson repo owner

    Now I revisited this problem and the unhinge buttons seem to work now. When you press the button, the hinge property is cleared, and the upper_arm/thigh bones (both fk and ik) retain their position in world space. Any transformation for the armSocket/legSocket bones on the Extra layers is also cleared, because that would also ruin jcms.

  7. Thomas Larsson repo owner

    It is solved in the development version. However, it is perhaps not the solution that you hoped for. Once you have posed the limbs with hinge on, the buttons sets the hinge property to zero but keeps the arm pose. Making the jcms work correctly while hinging is on is not possible. The jcms expect to be driven by the rotation of the arm relative to the clavicle, and if the local arm rotation is relative to something else (namely, the hip), the value of the jcm is off.

  8. Alessandro Padovani

    I don’t use mhx myself so this is just an idea if it can help. From what I understand hinge is a tool for fk posing, but it is not compatible with jcms. If you just pose the figure, without animation, then you can use unhinge and it works fine. Otherwise for animation you can try “keep daz rig“, this way the jcms should be relative to the original daz rig and work fine.

    Again just ideas, didn’t try anything.

  9. Log in to comment