Import pose not working correctly.

Issue #235 resolved
Eder Rogerio Deana Juliette created an issue

I'm not sure if this is a bug, a new limitation of the addon or if I'm missing something, but that is what I get with all committees released after the 0a895ec7befd when I try to import poses. A lot of them don't work correctly.

Here is a pose I like to use as a test. commit 0a895ec7befd (Good result)

And here is what I got with the latest committees included the last one, d59985148dde.

Tested with blender 2.83.6, 2.90.1 and 2.91

Comments (37)

  1. Thomas Larsson repo owner

    Poses were apparently distored by my (not yet successful) attempt to deal wtih issue #230. They should be back now.

  2. Alessandro Padovani

    As for commit edd8fa4 and blender 2.90 I can confirm that poses are not imported correctly, since there’s some difference with the daz rotations in the hip area. But I don’t get any error here.

    1. import a standard G8F with the dbz option
    2. add extra face bones
    3. import units
    4. load any face pose and/or boby pose

  3. Eder Rogerio Deana Juliette reporter

    I keep getting this error only with the current commit (edd8fa4 ) combined with blender 2.90.1. With the previous ones included the d599851 or with other blender versions, the only problem is the bad poses.

  4. Eder Rogerio Deana Juliette reporter

    Sorry Thomas, still not working. Included for other blender versions now. Falling on import.

  5. engetudouiti

    @Thomas

    With current version, when disable “affect object” for import pose option, it cause erroer message for me.

    with activate “affect object” it work.

  6. Thomas Larsson repo owner

    That’s what I get for being ubersmart and not testing all cases. The error should be gone now.

    Eder, could you upload the pose file (duf/dsf) so I can test. The blend files are not really useful. When I test with Base pose kneeling B the results seems ok, both with G8F, mhx and rigify, apart from a global translation with rigify.

  7. engetudouiti

    @Thomas

    with new commited version, without I miss test, now it not work for both case “affect object” or not “affect object”

    both generate error for me. (as discribed by others)

    I use default G8 pose with export from scratch G8 man. “Base pose sitting B” I did not buy G8 pose. so it should be default one then you can test it I suppose.

    So it is not caused my special pose (Though it include hip location and root location too, with error but generate pose, but it can not show same location, with use object transform.)

  8. Alessandro Padovani

    Nope. As for commit 191e467 the kneeling B is not ok. The legs are visibly closer than in daz studio. Below there are the daz and blender front views. I don’t get the error anymore though so I can confirm it is fixed.

    edit. Also the head rotation seems not the same judging from the neck portion below the ear. Or in this case it may also be that I didn’t import jcms for the neck. But the head seems indeed a different rotation to me.

    Steps to reproduce the issue:

    1. import a standard G8F
    2. merge armatures
    3. load the kneeling B pose

  9. engetudouiti

    Now I could see actually node rotation not show same value, even though I remove all jcm effect in daz studio.

    with commit 191e467

    So I suppose, if there had been commit, which change function to convert daz rotation value as matrix?

    eg,, about Thigh bend bone, it should not remain twist rotation value. (we see only alias which pose twist bone as Thigh bend twist in daz studio, but real rotaion value = zero for Y axis.

    but actually when import pose, plug in add some rotation for Thigh bend main twist axis, and applied values seems slightly change from daz studio. with use same rotation mode. (try to mimic daz way)

  10. engetudouiti

    I see same thing happen all non twist bone, for imported rig (g3 and g8 use double quartanion rig, as you know then they do not use twist for bend bone. Though I do not know when it changed at all but if it worked before, actually it is one main reason, most of pose may effect added twist value for those band only bones. (or side-side)

  11. engetudouiti

    Thomas test this pose preset please. it only pose Thing bend and Thing twist.

    I could see some case pose file could load correctly (not add rotation for twist about Thiing bend bone) but may need to confirm case when save and use pose preset, (as usuall manner) it add twist value for un-necessary bone (attached in topic #239 , but hope to keep reply here, for OP problem)

  12. Thomas Larsson repo owner

    OK, I think I got it. There is nothing wrong with the posing code. The problem was that the rotation order in DS was not stored in the bones when the figure was imported with dbz fitting. So for some bones, the rotation matrix was evaluated from the Euler angles in the wrong order. The rotation order was stored when imported with unmorphed fitting, which is why the poses looked right to me.

    The reason why this happened is that bones imported with dbz are not posed, since the pose is already baked with the rest pose, so I thought it was ok to skip the code. However, the same code added the bone properties that are necessary to making posing work later on.

    This bug has probably been around for a while. Unfortunately, this means that you must reimport the character, and that you cannot load poses correctly to characters imported lately.

  13. Thomas Larsson repo owner

    So I added a tool to fix old rigs: Advanced Setup > Rigging > Copy DAZ Properties. It copies properties set by the plugin (name starts with Daz) between objects, and between their bones and posebones if they are armatures. Properties that are already set in the target object are ignored, so nothing is overwritten. Here is what to do:

    1. Import the character again.
    2. With the new rig active and the old rig selected, Copy DAZ Properties.
    3. Delete the new character.

    Now you should be able to pose your character correctly. Here is a test with Base Kneeling B, before and after the fix:

  14. Eder Rogerio Deana Juliette reporter

    It looks all is working fine now. Thanks for the efforts and fast results. I'll let the issue opened for more than 2 or 3 days. If no one adds new points concerning the question, I'll mark it as resolved as I think it is already indeed.

  15. engetudouiti

    Eder Roderio Nice catch bug 😀

    And Thomas thanks you offer simple way to correct issue. Though I may try new import to see how it change.

    I hope if it will correct hip + root object transform and rotation too but OP solve issue, I may add report in my issue if it remain.

    I have some view about “improt current posing as baked” when we import scene, or “not bake rotation when import” but it is actually complex problem ., and may need to consider scale, loacation, at same time, (and it depend how user set up their actor with daz offered controller type with scale), So I may keep it untill I can confirm it work better.

  16. Alessandro Padovani

    As for commit 1057670 the kneeling B pose works fine. Then I saved a test pose shift.duf affecting the figure and the hip bone. That is not imported fine. The figure is not scaled and it is also not placed correctly. Also the figure pivot is lost. When importing the pose I selected G8F as source.

    edit. If this is from #230 I understand that should be an option for people who don’t like to switch between object and pose mode. In comparison with #217 this is a step back because we lose the figure pivot. Apart the scale not working.

  17. Alessandro Padovani

    @Thomas Also could you please explain what the new pose options are for ? As I understand it, to select the source should only be necessary with the convert option, otherwise the plugin should assume that the selected pose is for the actual rig.

    Then if the source doesn’t match we get a bad pose of course, but that’s the same in daz studio when we load a G3F pose to a G8F without using a conversion addon.

  18. engetudouiti

    If you get the pose from blender pose duf, then apply it in another aprciation rig without rig map,

    without detect each bone rotation order of the source, I really hope to know, way.

    daz pose duf no need to describe rotation order for bone. because it simply discribe current selected rig property values when save.

    while we apply the value for same aprication, there is no need to detect source. yes if it not work well we use pose for different rig.

    But to use the rig pose data for another aprication (it have indivicual cordinate, and how set rotation order different for each aprication)

    at least you need to know bone rotation order of the bone . without detect the pose file are genereated with which rig we can not use rig map. because there is no way to know Eular rotation order of the bone. = DAZ parameter of the pose. discribed in duf.

    We rely how generate bone (and set rotation order for each rig <> set bone roll) for exported json. so we can generate almost same rig with keep real bone end point, and still show same bone arrangement (I remember it is really compex work)

    But in pose duf there is no such infomation. onlly contain bone name and each xyz properties. it do not show rotation order

    If I save pose file from blender, then use it for blender I need not to keep bone local axis at all. I already make it which save pose as json for blender and this add on then use for private prupse. . But if I make it for another aprication, it is really diffiulct work at least I start to detect each bone rotaion order, discribe, then convert as world matrix or if keep to use Eular value, I need to check exported aprication rig map.

    So which figure the pose file is made for is principal to use pose file parameter for another apricaiton.

    or the duf need to discribe world matrix . (but never we can expect it) or we may need another script, when use duf pose, convert it as new json. with re-assgin rig .

  19. engetudouiti

    And the option may need to set G3 pose for Rigi-fy G3. I do not remember if converted rig still keep all bone rotation order. maybe not.

    and after conversion, rigi-fy set rig type as Rigi-fy only. so if I apply pose for rigi-fy the plug in need to know which source figure is used to make the pose. then may try to convert.

    So if I apply pose for rigi-fy , I may need to use the option (maybe I suppose so) . or plug in may try to detect pose file from current active armature, then apply rig map. to convert. Without it break something, I must hope to keep the option. So defalt rig user may not use it. without you keep to use same rig pose I suppose. (plug in should auto detect from current selected rig)

  20. Alessandro Padovani

    @engetudouiti So the new options are to help conversion to mhx rigify. So if we select “automatic” without checking “conversion” does the plugin assume that the selected pose is for the actual rig, the same as daz studio does ? I mean for those who don’t use mhx rigify. And I suppose “conversion” still works as before to convert among genesis generations.

    edit. I see the explanation by Thomas in #230. I’m not sure how “none” is supposed to work. But using “automatic” should work as before.

  21. engetudouiti

    @Alessandro Padovani

    I do not know but I think, plug in can check rig map (and bone rotation), if it need by active rig. About daz studio, I do not think it is for the actual rig etc.. but if you means actual = current selection, it simply change current selected item property (though I do not know code, but there is no need to check rig etc)

    About importer , if plug in simply believe import duf = for the current rig, then I try to check rotation order, at least I need to check current rig and if there is rig map for conversion , I use it with current active rig. (actual rig), then I suppose as you said the option may need auto conversion process. But I think we have the option long time. (before we need to set duf source, when convert. now it seems appear with automatic, or user actually tell plug in the duf is made for which rig.

    How apply pose rotation may need to ask Thomas. (But at least we can not get it, from duf source. so we need to check selected rig or user need to say it is for which rig)

  22. engetudouiti

    none is actually none, if you make figure, or daz rig props, and save pose.. about the case, I suppose it need to set “none” because we can not convert it , but I suppose all bone daz rotation should be shown as bone property (at least I remember,, it will be generated)

    So maybe plug in can apply pose correctly. (eg car rig prop and pose for car rig)

    But I think if we try to import such figure,, the rig arrangement may not show perfectly same as daz tudio, for blender. because we can not make rig map for some bones (which need for some case.) Make rig map need try and erroer, blender can not offer perfect same local axis with visuall (some bone may toward opositte, or need to set local axis change.)

  23. Thomas Larsson repo owner

    @Alessandro, the plugin does two conversions: between bone names and between rest poses. Name conversion used to be automatic, because one can distinguish the Genesis rigs by looking at all bone names. But that only works if all bones are listed in the duf file. In engetudouiti’s only the hip bone was listed, which is not enough to determine the conversion table. This meant if the target rig was mhx or rigify, the plugin tried to pose the hip bone instead of root or torso, respectively.

    However, the source character list will probably be hidden again. It is only necessary to know it when converting between different Genesis generations (abdomen => abdomenLower and abdomen-2 => abdomenUpper, or vice versa?). For mhx and rigify there is only one file that specifies the bone names, so we can also use that.

  24. engetudouiti

    @Thomas

    Then why scale problem happend ? (it seems still remain for rig object transform values when import pose) and can you solve it too?

    or if it cause my scene setting? (It seems simple mistake for me,,) My main purpose is,, hope to see correct transform with pose mode about Riig-fy torso bone,, and keep request to get option, apply object transform as rigi-fy root bone pose value.(MHX may need to ask about user who mainly use it, though I may say same-thing)

    but without default work, (show rig object transform correctly, maybe it show same issue, untill convert as Bone pose value.

    I suppose you may need not pose file any more, and there is already other alessandro pic, it simply multiple 0.01 (unit scale) for all location when import pose for object transform location. (at leaast for rig object)

  25. Alessandro Padovani

    As for commit 9a62fed that seems to work great. Tested both kneeling and shift pose plus others. Tested both base and HD versions. The figure pivot is preserved so that’s ok too. I believe we can mark as resolved.

  26. Thomas Larsson repo owner

    The translation problem happened because unit conversion (centimeter to meter) was done twice, so Daz translations were multiplied with 0.0001 rather than 0.01.

    The new pose options have been removed. The correct bone name conversion can be done for mhx and rigify anyway.

  27. Alessandro Padovani

    As for the daz rig commit 171285c works fine too. I didn’t test mhx and rigify since I don’t use them so I’m not the right person for the job.

  28. Elie Makhlouf

    Hey Thomas, man I am new here, I am so glad I can to see the updates. I recently have been importing the rigs from DAZ into Blender 2.837. I am a bit confused about the workflow in using Diffeo. This is how I am doing it now. Could you point me to an accurate and recent tutorial on how to properly work in blender using version 1.5.

    At the moment this is my process

    1. I have to unparent all the clothes in daz for my character while still have it fitted to.
    2. I save the file and the export to blender using the same name as the DUF for the DBZ
    3. In blender I import the file with the addon and do the following:
    4. I manually ctrl click all the items and select the figure last in the import
    5. Then I click merge rigs
    6. then I click merge toes
    7. then I click extra face bones
    8. then I click make all bones posable
    9. Then I click update all
    10. Then I click import units
    11. Then I click import expressions
    12. then I click import Visemes
    13. Then I click import body morphs

    Once I am done I try to import a pose from a duf library and nothing happens….just the wrists move??????!!!!!

    Any help would be appreciated.

    It’s really weird, is cause when I import the poses there is movement but it is so minimal here look at this

  29. Thomas Larsson repo owner

    You need to make all bones posable after you import the body morphs. Skip step 8 and do it as step 14 instead.

    Body morphs are implemented as bone drivers, and in Blender you cannot move a bone that is driven. Make all bones posable creates an additional bone for each driven bone which can then be posed, but the bones are not driven until the body morphs are loaded.

    Note that you don’t have to import body morphs. Personally I prefer to pose bones by hand in Blender.

  30. Log in to comment