Pose bone scaling

Issue #256 resolved
Gareth created an issue

When an armature is imported into blender the “Bone Relations” for each bone is set up to inherit the scale of the parent bone. This means a bone’s scaling depends on its own scale as well as its parent’s scale.

For animations / poses in duf format the scale of a bone doesn’t seem to depend on its parents. I think this results in incorrect scaling within blender in cases where a scaled bone has one or more child bones.

Setting ‘Inherit Scale’ to ‘None’ in Blender’s ‘Bone Properties’ seems to fix this - maybe this should be set by default when the armature is imported?

Comments (13)

  1. engetudouiti

    It is not format but as you said, each bone can set relation (inherit scale or not) in daz studio. then daz change it for each bone. so if we only import default rig without drv bone etc, we can use daz setting then when import duf, it include scale, may work well.

    But the daz way actually have problem when you manuall pose scale. eg we may hope to easy scale head bone, to adjust full face size, but we can not it in daz studio. same thing happen about hip bone.

    For posing in blender, (and if use scale), I like current way. so not hope daz current setting = default.

    Maybe Thomas can offer script, which change bone relation,

    (daz way = try to set daz way, when possible, if user need)

    (default = current way)

  2. engetudouiti

    And I afraid, if it may cause problem when convert rig, add driver etc,, so hope new option is offered or can change it in gloval setting.

    (then user can decide default way, when import but still can change it when we need as one click full bone.

    I suppose it may need to add new property for bone. to remain daz default . (but maybe most of daz human rig bones will come as Non in herit , though I do not know if there is exceptional case.. at least blender drv chilc bones need to inherit. so drv bone scale effect real pose bone.

  3. Thomas Larsson repo owner

    This seems correct. In http://docs.daz3d.com/doku.php/public/dson_spec/object_definitions/node/start it is stated that the inherits_scale property is always true, except for bones with a bone parent. My idea was to add an extra pass after the pose was loaded, to compensate for the different behaviour in DS and Blender. However, after I did that, the attached test file seems to work without the extra pass.

    What is really weird is that the scales listed in the duf file differs from the ones in DS:

     Bone         DS scale  duf scale
     lShldrBend     150%      1.5000
     lShldrTwist    100%      0.6667
     lForearmBend    75%      0.7500
     lForearmTwist  130%      1.7333
     lHand          100%      1.0
    

    So now I am really confused.

  4. engetudouiti

    I suppose actually the difference show inherit parent scale option difference. (twist and bend bone inherit)

    pose duf may convert and record current scale values for each bone with use same setting .

    But it not same about daz bone property in daz scene as visuall. (which we input value in daz studio)

    eg 0.6777 * 1.5000 (parent scale) = 1 so it change from 0.6777 to 1.0

    then 1.7333 * 0.75(parent scale) = 1.3 so it change from 1.733 to 1.3

    then when load property values, scale values will be converted with each bone setting (inherit parent scale or not) I suppose so.

  5. engetudouiti

    About g8 bones, only hip bone inherit scale (so inherit root node)

    but all other bones (maybe) not inherit parent scale. it can change with joint editor . I often tweak it, but as default, twist bone, bend bone not inherit scale.

    linked document seems describe the way for duf format. when write as pose preset duf, ds need to discribe all bone scale as inherit scale.

    that means when save the scale as pose preset, DS try to format scale as inherit scale. (though I do not know, why it need,, ) or I think it check current bone end point etc,, then not check the property value in the scene.

    if you hope to see same value, you need to change setting with joint editor, then make scale pose, save as pose duf. it should show(maybe) discribe value as ds property

  6. engetudouiti

    haha,, I think someone made pose after all hand show same scale.

    but bone A>B>C>D

    then bone B scale need to A multiple B, bone C scale need to multiple

    A * B * C, then D scale need to multiple A * B* C * D. to convert duf vallue for daz propety value. (suppose all bone set not inherit scale in ds)

  7. engetudouiti

    And one more we may need to consider,

    Twist and Bend bones usually scale as if twist bone inherited parent.

    But it is generated by ERC hidden x, y, z scale values.

    Though I do not know, if it may effect gloval scale too but it seems linked. when we change gloval scale of bend bones.

    only for Bend bones, x, y, z, scale, they have ERC which link with twist bones X, Y, Z, scale. (will be multipled)

    So (though I can not test all), even though twist bone set as non inherit scale,

    actually when change bend bone scale, ERC seems force to their child twist bones scale with X Y Z component scale. it seems only matter about those new daz rig pair bones. (G3 G8 mabye)

    it make me difficult to represent daz righ with use same options (inherit or non inherit scale), I suppose pefectly do same-thing we need to add driver (or constrain) with use scale inherit option. = it need another child bone for free scale,,, (so I do not think,, it seriously,,)

  8. engetudouiti

    I recommend with visible bone set, then check each bone scaling in ds.

    it is interesting (but complex)

    1_ set bend bone gloval scale as 0.25

    2_ twist bone setting is “No inherit scale” so I believe it not effect twist bone, but I see twist bone change scale. (but hand or other bone not effect bend bone scale , because they do not inherit parent bone scale.

    3_ that means, hidden bend bone x, y, z scale component ERC seems work (without we notice it)

    4_ then bend bone gloval scale actually change twist bone gloval scale (Value)

    5_ but as I said, I do not touch twist bone scale. so “Raw value” of gloval slcale keep as 100

    6. that means twist bone gloval scale are driven by Bend bone x, y, z compolent ERC . without change those componet property values.

    If we remove or hide those ERC temporally, we may see twist bone not change scale. (as visuall, and Value, Raw keep 100)

  9. Thomas Larsson repo owner

    Things seem to work now, except for Rigify forearms for some reason. It appears that the twist bones do inherit scale from its parent, unlike other bones. Currently I check if a bone inherits scale if its name ends with “Twist”, but there should be a better way to do it.

  10. engetudouiti

    I may need to check all bone scale property to check if it is ERC driven.

    one thing I miss was,, actually gloval scale of twist bone driven by bend bone gloval scale as same as each components.

    (I happend to select twist bone, then did not notice it was driven. but when select bend bone scale, it drive the twist bone)

    Though I do not know, in pose mode duf, how each bone scale value will be discribed about driven value (not inherit but driven by ERC)

  11. engetudouiti

    Then even though import pose worked, after all we can not mimic daz scaling way for blender with manuall pose + rig setting , right?

    because blender may not offer such ERC scaling. “twist bone scale only inherit their direct parent bend bone, but not inherit other bone scale””

    we may need to use constrain with off set option. (I do not remember it offered the off set option for scaling) maybe rigi-fy already set so. (if it only inherit bend bone scale (direct parent bone) with constrain.

  12. Thomas Larsson repo owner

    The Rigify forearms work now. It was a stupid spelling error.

    The plugin may not treat ERC driven bones completely correctly, but in practice scale poses seem to work quite well. Unless there is a difference that people care about I will leave this for now.

  13. Log in to comment