Import Expression as morph issue (new morph data system)

Issue #1112 closed
engetudouiti created an issue

This character import Daz default basic morphs, already. + Z morph + my custom morphs. >> convert MHX

Then I import i13 G7 basic expressions as

A import morph (new morph data system)

B. Import pose (with affect morph option)

btw about this products, 13 expression may only use daz default morph/pose controller sliders value. (face unit, expression, vismes..) so I think both way can load most of expression without problem and will show same expression.

(though mirror named MHX fail all facial rig bone pose to import, simply because bone name (or label or id) difference.

so at current I can only import expression pose which may only use morph slider in blender I suppose, but I check i13 expression, they seems not direct manipulate bones for most of case so it may work.

Imported expression

import as morph

import as Pose (with activate affect morph option)

Actually about this Expression,. I understand I need not use new system to import expression, because all basic morphs which used for this expression already imported.. (then the expression just apply value for each)

But if it can not manage most simple case, (all morph which used for the expression already improted), about more complex case (actually need to serch and circulate, intermideate pose controller which have not installed. ) simply apply wrong expression, I suppose.. ☹

Comments (12)

  1. engetudouiti reporter

    I now find important thing… if import expression include facial bone pose, import Expression as moprh simply ignore or not try to apply it for bone pose. I suppose maybe it may work well for G8.1 expression, because they may not directly pose facial bone.

    On the other hand, (actually I check again my Expression correction, they often include pose bone transform (described in duf) ..

    Eg I said worng about i13 victoria expression, most of them Mix use pose bone transform + basic morphs (Vismes + Expression + face unit)

    So if import as morph (new morph system) ignore bone pose values, it never work for G3 expression.

    (I do not have any expresison about G8.1 and G8, so about G8.1 I do not know, maybe G8.1 expression mainly only describe other controller value,

    then new moprh system may convert it correctly I suppose.

    (I test with convert MHX, now it can import facial bone pose correctly, (mirror) thanks.

    1. import as pose

    2. import as morph (though this expression include any real morph value, only describe facial pose bone transform) but test how it work.

    it simply return error “Scanned morph for genesis3 does not exist”.

    So I suppose if I try to import i13 expressions, new morph system only get other controller values. (include which I have not improted , if they are)

    but when there is no morph value (other controller value), and try to convert it as pose bone transform, but pure bone transform value not remain.

    I may test again real product expresisons which include both.

  2. engetudouiti reporter

    Yes above test was I simply did not up-date databalse, but now I confirm with console.

    But my predict is same, I now test with default rig, then import pose bone transform only expression file.

    it not move any facial bone. of course if I import as pose, it pose correctly.

  3. engetudouiti reporter

    mmm,, now I tried to import pure bone transform expression.. I scan morph with recent version, then it show almost no error for me,, >> import expresssion (which only pose bone), almost not work..

    as I said about this case, simply import as pose work … so I suspect,, (doubt) import as morph actually can apply expression which include bone transform value or not.. 😟 (it not need to use any driver, simply apply value for each facial pose bone..) or this error important? if you only catch, default expresison location,

    I think it is usuall, because usually when we save custom expression, we may save anywhere as I need.

    (so I save my custom expression (which bake transform) in my custom directory.

    Could not auto-detect character in duf/dsf file
    File I:\myfile\dazstudio4\Mylibrary\TK\Projects\blender3\expression\i13\100-belly-laugh.duf imported in 0.265 seconds

  4. engetudouiti reporter

    Then now I try to import default i13 expression (it mostly use base morphs only) and saved default G3 expression directory (so I suppose add on understand, it is g3 expression)

    then I got this error it seems first one I saw about new morph import

      File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\import_daz\error.py", line 207, in execute
        self.run(context)
      File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\import_daz\scan.py", line 297, in run
        self.defs, self.morphs = self.loadScanned(name, scanpath, False)
      File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\import_daz\scan.py", line 328, in importFile
    
      File "C:\Users\TAKE\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\import_daz\scan.py", line 374, in getKeyFrames
        url = anim["url"]
      File "C:\myprograms\Blender Foundation\blender-3.2.2\3.2\scripts\modules\bpy_types.py", line 804, in __getattribute__
        return super().__getattribute__(attr)
    AttributeError: 'DAZ_OT_ImportScanned' object has no attribute 'morphs2'. Did you mean: 'morphs'?
    

  5. engetudouiti reporter

    Ok above issue seems already solved. then I report failed case.

    It may need check each step. so I add each case.

    1 I had already imported all basic morphs.

    2 I have not imported symon G3 head expression morphs

    (it is usually controller which pose bone + change basic morphs value)

    3 I use only one symon controller eCTRLSWMBiteLipRight change value as 1.0 and save it as Pose (expression) preset (only activate head modifed controller)

    4. In daz studio if I load it , it simply only change the controller value as 1.0 like this. then show this face.

    5. then I up-date database (though it already up-datad) , then import the saved preset file by import expresison with use database.

    so it is clear, when add on try to bake the controller value for already imported morph (basic morphs) and face bone pose value something wrong. so I need to check when it happend.

    6. Next I convert the eCTRLSWMBiteLipRight as pure bone pose = Bake to Transform in daz studio. it actually do good job (about this controller I suppose it may not use shape keys but if they are they will be ignored I suppose)

    7 in daz studio,, it now turn as simple face bone pose only (no controller used),. then I save it as pose.. and load it. in daz like this.

    8 then check it in blender by import Expression (but it only change pose facial bone values, not serch data base (but I keep it active)

    it actually worked.. that means add on correctly apply each facial bone pose if we import pose directly (so it is not bone axis issue which we convert as blender axis)

    9 Next I import the eCTRLSWMBiteLipRight as Custom morphs first. (so when I import my first saved expression, it only need to change value as 1.0, then see how it work)

    though I miss import some un-necessary one,, but it is surprised for me,, anyway, the controller work correclty.. you may see almost same deform with above pic (pure bone baked pose)

    Return start poiint,, my saved pose preset, only move this controller as 1. so after import this ctrl, then when I import expressioin, now it work (it should be)

    but as new Expression import system, it need to auto bake the controller value as other imported morph value, and pose bone transform.

    As you can confirm when I import the controller as cusstom morph, it correclty drive already imported morph = so I can see same deform in daz.

    but if I do not import controller, then import as expresison, it seems failed to set value for basic morphs or it failed to pose facial bone.

    The simon ctrl include, basic facial morph value + facial bone pose value.. I suppose when bake to facial morph value, add on something failed.. (then may apply wrong value. or not apply value for the basci morps)

  6. engetudouiti reporter

    Thomas if you have already bought, Simon WM g3 expressions, test it please

    https://www.daz3d.com/genesis-3-female-s-expressions-face-aniblocks

    Used morph label = SWM Bite Lip Right

    Used morph name = eCTRLSWMBiteLipRight

    Used morph file name = head_eCTRLSWMBiteLipRight.dsf

    Simon is clever vendor, so he make real controller for head, then make Alias for root node. (usually many vendor do opositte I suppose) (so his file naming way is somehow unique, I think if it is reason, add on could not catch it?)

  7. engetudouiti reporter

    It is my guess but I see same issue when import pose even though all morph are already installed.

    It seems happen when face morph use Right and left and both controller at same time. add on somehow miss circulate effect.

    In daz studio, some vendor may use Both controller first, then change R and L siglhtly.

    eg eyeclose = 0.5 (it may drive R and L close eye) then add R eyeclose (0.3 ( 0.5 + 0.3) )

    minus L eyeClose (-0.3 (0.5 - 0.3) ) etc. Many expression file may include these 3 controller value
    (not only about eye. Both and Right and Left controller mix used then set value for each) to make Non symmetry Expresison.

    Why I think so, when I import un-simmetry expression, usually add on failed somehow.

  8. engetudouiti reporter

    bingo…

    So now I check when I import expression how add on set basci morphs.

    The eCTRLSWMBiteLipRigh describe these 2 oeration to set eCtrlLibBottomInOut(L/R)

            {
                        "output" : "Genesis3Female:/data/DAZ%203D/Genesis%203/Female/Morphs/DAZ%203D/Base%20Pose/eCTRLLipBottomIn-OutR.dsf#eCTRLLipBottomIn-OutR?value",
                        "operations" : [
                            { "op" : "push", "url" : "head:#eCTRLSWMBiteLipLeft?value" },
                            { "op" : "push", "val" : 0.752 },
                            { "op" : "mult" }
                        ]
                    },
                    {
                        "output" : "Genesis3Female:/data/DAZ%203D/Genesis%203/Female/Morphs/DAZ%203D/Base%20Pose/eCTRLLipBottomIn-Out.dsf#eCTRLLipBottomIn-Out?value",
                        "operations" : [
                            { "op" : "push", "url" : "head:#eCTRLSWMBiteLipLeft?value" },
                            { "op" : "push", "val" : 0.248 },
                            { "op" : "mult" }
                        ]
                    },
    

    That means,

    1st it set eCTRLLipBottomIn-OutR = 0.752

    next it set eCTRLLipBottomIn-Out = 0.248

    the 0.248 value is added for R and L then

    eCTRLLipBottomIn-OutR = 0.752 + 0.248 = 1.00 (FIN)

    eCTRLLipBottomIn-OutL = 0 + 0.248 (FIN)

    but add on do reverse for L and R (do not know reason thouhg ^^;)

    as you can see,, both = 0.248 but L = 1.00 R = 0.248 as FIN value.

    about other morph value, I do not see wrong value so it is actually main reason.

    Though the ctrl include many bone transform, but I hope add on could manage it well

  9. engetudouiti reporter

    Oh no,, I think the product file seems miss set name L and R..

    you see the dsf name is

    "id" : "/data/DAZ%203D/Genesis%203/Female/Morphs/SimonWM/G3F%20Expressions/head_eCTRLSWMBiteLipRight.dsf",

    but in function Operator

    "operations" : [
    { "op" : "push", "url" : "head:#eCTRLSWMBiteLipLeft?value" },

    I do not know what is going on any more^^;

  10. engetudouiti reporter

    then my saved expression preset is simply only describe this

        "animations" : [
            {
                "url" : "name://@selection/head#eCTRLSWMBiteLipRight:?value/value",
                "keys" : [ [ 0, 1 ] ]
    

    Ok I think it is not Add on side problem I feel ^^; (can you solve this issue?)

  11. engetudouiti reporter

    I confirm author miss set ID and name opositte ^^; (though I do not repot these things any more to daz)

    maybe I need to rename file or id or name correctly I feel.. or add on miss use another..

  12. Log in to comment