How you get pectoral driver rotation "Expression" fomula?

Issue #109 resolved
engetudouiti created an issue

I can assume, but it seems good to ask you directly.

how you set pectoral bones driver formula with collar for each Eular rotation? it is auto circulated from base figure dsf? (or json?)

or you reproduce it with compare pectoral bone roll which plug in auto- generate bone?

I hope to know your way,, then I can adjust for my purpose only..

(it is “private” roll ploblem, which I suppose it should be,,so I do not request to change it (or driver break) but hope to know, how you circulate it,, so I can change it acording to my roll adjustment way.

If it not circulated from actuall data,, but you try to reproduce it (adjust it) then set value in script,? (if so I understand reason,, but if you actually circulated from data values. I hope to know, why you can set so..)

Of course, I know, if I use pectoral driver with collar, it actually move correctly (as looking) so it is not bug and not problem…

But at same time, the current generate roll axis direciton is almost 45 degree change. (rotation order is not matter,, the axis direction is actually different from bones axis direciton in daz studio,, but driver work correclty.. so if I change bone roll, (add 45 or -45 etc,, ) driver break.

Comments (4)

  1. engetudouiti reporter

    It is actually small problem, but after I set “pose all bone” to generate free move child pectoral and drv_pectoral bones by your plug in,, new pectoral and drv bone copy current pectral edit bone data.

    (head, tail, and roll).

    So if I try to use local axis, (eg move side to side, or up-down with animation, with local axis,)

    it simply not work I hope. (local asxis change 45 degree,, for 2nd and main rotaion direction)

    yes I know I do not need perfect axis, just move pectoral , (I can use free rotation mode, or set quartanion for the free bone posing)

    Or I can manually add roll only for free bones. (then keep drv bone roll)

    I actually add new template system, to adjust my add on generate roll, almost same as Thomas axis direction to driver work.. (I dare to say it should be more precise.. about bone head postion and roll) but about pectoral,, I simply think, it may better not roll 45…

    (though at current it need to set so,, to driver work correctly),,

  2. Thomas Larsson repo owner

    To convert from Daz to Blender coordinate systems involves some quite complicated matrix math, and I don’t remember the exact equations anymore. Each bone stores its center_point, end_point and orientation in the properties DazHead, DazTail and DazOrientation. If the morphed bone has a different direction that in the base character, the difference is also stored in DazAngle and DazNormal.

    The drivers are set up in Bone.buildFormulas (bone.py line 742) which is called from Figure.build (figure.py line 217). But the code is not so easy to follow.

    Mult2, Mult3 etc is matrix multiplication, which works both in 2.79 and 2.8x

  3. engetudouiti reporter

    Thanks, I may check your code.

    (yes I see,, actually convert daz orientation to blender,, was really complex enough,

    with check daz documents, and I do not know, how I can , about controller formula.. (delta add formula etc,, to conevrt blender local axis)

    then do you know (or remember),, why only G3 breast bone will be generated with additional 45 degree roll ? it is what I hope to find reason,,,

    (45 or 135 or -45 or - 135, relative from bone axis direction in DS)

    Only pectoral bones local axis point diagonal direction like this pic..

    On the other hand, in ds when I check G3 pectoral bones in joint editor, or rotation tool,, I see the local axis point horizontial, and vertical direction,. (side and up ) as same as same rotation order bones..

    (then if I generate bones with my custom add on,, actually breast bones local axis not point out diagonal ,,)

    So at first I supposed, pose controller “collar drive pectoral” may not work.. ( will move pectoral as diagonal direction)

    but your plug in seems adjust it with driver formula, ^^;

    I suppose,, I need to check how you convert driver formula,, from dsf formula section, about Collar and pectoral (x, y, z rotation) but if you remember something, hope to know,,

    eg you edit formula only about pectoral to work correctly,, )

  4. Log in to comment