JCM's with MHX not working for me

Issue #1876 resolved
Anon unkwon created an issue

Blender 4.0.2

Using import_daz-15d592f69807 mhx_rts-81baade08add (Both the latest as I’m writing this report)

It seems that the JCM’s aren’t working once I converted the rig to MHX (They do work in the standard daz rig for some reason)

I tested it with a basic Genesis 8.1 character too.

Comments (25)

  1. Alessandro Padovani

    daz studio 4.21.0.5, blender 3.6.5 and 4.0.2, diffeomorphic 1.7.3.1943

    bug. jcms. I can confirm the issue, some jcms are lost when converting to mhx while they work fine for the daz rig. For example the thigh jcms for G8F. I didn’t check all jcms so there may be others. This affects both blender 3.6 and 4.0. ERCs are off so they shouldn’t be involved.

    steps (blender 3.6 and 4.0):

    1. import G8F with jcms
    2. pose the legs and test the shin and thigh jcms, they work fine
    3. convert to MHX
    4. pose the legs and test the shin and thigh jcms, shin works fine while thigh doesn’t

    bug. link bones. I also get an error when I try to use poles without link bones, this is limited to 4.0 while 3.6 works fine.

    steps (only 4.0):

    1. import G8F
    2. convert to MHX, with “pole targets“ and without “link bones“

  2. Anon unkwon reporter

    Looks like, I should be more thorough with my bug report xD, thanks for the proper bug report Alessandro (and generally all the work here and on the addon)!

    Not sure if it helps, I notice in the driver editor that the shapekey script expression don’t really match e.g. they say ["pJCMThighFwd_115_L(fin)"] while the mesh key is just called ["pJCMThighFwd_115_L"]

    Complete wild guess, I don’t really understand drivers with scripted expressions, but maybe it has something to do with it.

  3. Alessandro Padovani

    bug. rigify. I was going to test the jcms on rigify but it seems it doesn’t work I get an error when trying to rigify G8F. Both on blender 3.6 and 4.0.

    steps (both 3.6 and 4.0):

    1. import G8F
    2. rigify

  4. Jasper29

    Blender 4.0.2 Diffeomorphic v1.7.3.1943

    Everything is fine on my end, no errors:

    Step 1: import G8F

    Step 2: Rigify

  5. Alessandro Padovani

    That’s odd, I can confirm the error message for rigify on my side, I noticed there’s a typo error as reported in the error message but correcting it from “ob. rig“ to “ob.rig“ doesn’t seem to matter for python.

    That said I don’t use rigify or mhx myself so if the issue is only on my side then feel free to ignore my bug report.

  6. Anon unkwon reporter

    Tried out the versions that came with the stable release and the JCM still don’t work once converted to MHX.

    I don’t know how to use rigify, so I didn’t test it on my pc.

  7. Thomas Larsson repo owner

    The jcm bug is hopefully fixed now. Or bugs, there were several: bend and twist bones didn't drive jcms, the euler mode was always set to Auto, and the jcms were driven by the control rig if Keep Rig was enabled.

    Before mhx conversion didn’t care much about drivers at all. The mhx rig is obtained from the original rig by adding extra bones and renaming existing bones, and when bones were renamed Blender automatically changed the drivers. However, this didn't work for the bend and twist bones.

  8. Thomas Larsson repo owner

    The two other bugs should be fixed too. “ob. rig” was obviously a typo, but it should read “ob, rig” with a comma. Why is that not illegal syntax?

  9. Alessandro Padovani

    Commit 89d24af.

    Everything seems to work fine here, both jcms and link bones and rigify are fixed. Thank you for the fast fix. If there’s nothing to add we may close as resolved.

    p.s. As for the python syntax I guess it did read ob.rig where rig is an attribute of ob, that was not found. It seems the extra space doesn’t matter.

  10. DomDomk

    I have not yet reached the part of using Rigify with the latest stable version released by Thomas a few days ago, so the most convenient and safe, would be to use these latest versions of the repository that Thomas released today? and to make the characters from there again?

  11. Anon unkwon reporter

    Thank you for the fast fix attempt! Unfortunately it seems it still doesn’t work forme, tested the MHX rig only (Didn’t test on rigify)

    I’m using blender 4.0.2 and downloaded Commit 89d24af

    Steps: Create a generic Genesis 8.1 model, create the DBZ, bring it into blender, import using standard setting, import the JCM morphs, and when inside pose mode, switch legs into FK mode and bend them.

  12. Alessandro Padovani

    daz studio 4.21.0.5, blender 4.0.2, diffeomorphic 1.7.3.1947, mhx 1.7.3.0104

    Works fine for me here, unless you have specific steps to reproduce the issue.

    my steps:

    1. easy import G81F with jcms
    2. convert to MHX
    3. pose the legs using the IK controls and check the jcms

    minor bug. mhx colors. The mhx armature is black in blender 4, that’s probably because we don’t have bone layers and colors have to be assigned to the single bones instead.

  13. Anon unkwon reporter

    daz studio 4.22.0.1 (Newer)/Blender 4.0.2/diffeomorphic 1.7.3.1947/MHX 1.7.3.0104

    Tried your steps and I while the shin and the foot work, the thigh JCM isn’t working

    I’m using a newer version of DAZ studio (Maybe that’s the problem?), and I also updated the script folder (Which was posted a while back)

    I’m not sure if this a problem specific to me but the thigh JCM isn’t working in either IK or FK. (Which shouldn’t matter right? Cause it is based on the bone rotation.)

    PS: I’m talking specifically MHX, haven’t tested rigify.

    PSS: Reinstalled both addons and recreated that generic character, the thigh is still not working.

  14. Thomas Larsson repo owner

    The JCMs work fine here. You can inspect the drivers in the driver context. E.g. for the thigh rotation, the name of the driving bone is changed from “lThighBend” (DAZ name) to “thigh.bend.L” (MHX name). You can also notice that the rotation for the same pose is slightly different. This is because the MHX thigh and twist bones are not exactly at the same place as the DAZ ones, but they have to be perfectly aligned in rest pose.

  15. Anon unkwon reporter

    It seems, this is might be just on my end then? I opened up the same screen and I get this:

    Not sure if that matters but I’m running windows 11 btw xD

  16. Alessandro Padovani

    update. bug. optimize jcms. Ok I believe I got it, the issue arises when “optimize jcms“ is off in the global settings. That is, with optimize jcms everything works fine, without it jcms are wrong for mhx, while rigify works fine.

    Personally I always optimize jcms, I see no reason not to.

  17. Thomas Larsson repo owner

    OK, then I think I know what the issue is. Will try to fix it later today or tomorrow.

  18. Anon unkwon reporter

    I tried to go back some versions where it starts to happen on my pc,

    I still had a few commit releases on my pc and kinda went through them to see where it started, and I noticed that:

    Converting to MHX using Diffeomorphic-import_daz-184294487647 doesn’t come with the JCM issues for me

    but converting to MHX using Diffeomorphic-import_daz-ef731c354a34 causes the same issues like the latest commit, so maybe some changes that happened in between those two commits caused this?

    I don’t have all the commits downloads it’s far from complete and there might be quite a gap but maybe this helps.

    @Alessandro Padovani

    This might be it! I didn’t had this on, since it said experimental and that kinda made me not want to use it. But turning this on in the global settings fixed it for now! Thank you very much!

    May I ask what “Optimize JCMS” does, or why it is considered “experimental”, I tried looking it up on the wiki, but couldn’t find anything. If it doesn’t come with major downsides, I might just stick to that.

    Eitherway thank you all, for all the work on this!

  19. Thomas Larsson repo owner

    In the last commit JCMs should work both with optimize jcms on and off. There are still problems if you keep the daz rig.

    Optimize JCMs removes some unnecessary drivers. In DS a slider can be both driven by other sliders and changed by itself. A Blender property can be either, but not both. To simulate a DS slider we thus need two properties in Blender, called the raw and final properties, cf. https://diffeomorphic.blogspot.com/2021/05/on-raw-and-final-slider-values.html. But specifically for JCMs we know that the final value is only going to be used in one place, so we can discard the final property and drive the shapekey directly.

  20. Thomas Larsson repo owner

    Now both jcms and ordinary morphs should work, both with and without Optimize JCMs and Keep Rig.

  21. Anon unkwon reporter

    Tested the JCM without the optimize feature and it works! Bone colors are also working!

    Thank you for the work and super fast fix!

    Should I just go ahead and close this report? From what I gathered things are working perfectly.

    Cheers!

  22. Log in to comment