Pose transform (at least for armature "hip" or "torso" bone) need to re-consider

Issue #230 resolved
engetudouiti created an issue

For pose mode with import pose by this add on, at least current status can not show transform correctly.

I know daz and blender use different logic for visible parameter of UI to transform bones.

I see some new changes occured for scene generation when import duf, about parented node etc,

But maybe to solve issue, need to re-consider, daz nodes transform VS blender pose bone transform.

I do not expect, it will be solved for complex case, but Most important transform is root and hip (or torso)

at least these 2 transform value need to be improted correctly when we import pose duf,

if user use it for animation etc. I almost can confirm , rotation is OK (even though I use rigi-fy basically work for FK chain.

But transform need to be re-consider about each bone axis. without plug in auto convert as gloval transform. when import pose. it is not matter how import object hieralhcy with transform when we import scene.duf.

Comments (29)

  1. engetudouiti reporter

    I can point out current problem which I could find.

    1_ when import pose, plug in try to apply daz rig root node transform for blender rig object.

    So daz do not care, root node transform is for object, or for pose. DAZ actually use the root node for animation or posing. (it depend user, some user only use z transform for hip , but x, y transform is set as root node (rig object) transform.

    animation file or pose file not distinguish it. so all transform = pose and animation.

    Blender distinguish pose mode and object mode,

    so when import pose , if it include root node (daz rig transform), it need to apply for pose transform, but plug in can only apply it as object transform.

    Though there should be case user prefer it, but we now import pose. so if daz rig root transfomed, it need to be applied as blender rig transform for pose mode.

    To achive it, I suppose we need to add root pose node for default rig too.

    (though I suppose it change rig hieralchy so it is difficult) then daz improter default rig do not have any root node, so if root node moved in daz studio as pose transform, we may force to apply it for hip bone transform.

    on the other hand, MHX and rigi-fy already offer root node separately.

    It is the node which should use it for daz root node transform, when import pose.

    2_when import pose transform for rigi-fy rig, it do not apply any hip transform for rigi-fy armature.

    plug in need to apply it as Torso (rigi-fy FK mode) bone transform. it is correct way to apply hip bone transform. (even though there is no root pose)

  2. engetudouiti reporter

    If you import the attached pose (it only include daz root node transforms and hip node transforms without scale) for the blender rig, they can not show same roation and transform for daz default rig.

    Then one reason is, I suppose when import the pose file, conflict object root mode transform + pose mode hip transform

    (I suppose, if you apply daz root transform for figi-fy root transform .then hip transform as rigi-fy torso transform it should work, though at current we can not hip transform for rigi-fy I suppose, rotation or scale only work for me)

  3. engetudouiti reporter

    I hope to push my view ,” why use root pose bone to transform daz root (genesis female 3 node etc) is better”

    eg you import daz animation which use “root object” transform with hip bone transform. like walk cycle.

    some walk cycle may offer, only apply hip transform for up-down move ment, so the actor run same position.

    after that add movements for “root = genesis 3 female” transform. then make walk animation.

    If I import the animation, current importer use armature object transform for the genesis 3 female (root) transform. as object transform.

    then will add hip transform value as blender hip pose bone transform.

    Then when you make walk cycle etc, we may not hope to change mode from pose to oblect etc. if there is root bone, you may use root bone transform, may not touch armature object transform. Then you can use blender pose funciton, like clear transform,, it clear root pose bone transform. it can not change armature object transform untill you change mode.

    when we tweak animation, or key-frame, we mainly use pose mode functions for actor rig posing.

    So I recommend,

    1 if import asset have rig, , and the rig have root node which can tarnsform all, and start with zero postion,use “root pose bone” to change location as default when import daz pose file. then not use rig object transform to import pose.

    2 ideally (though I do not request it hard), when import daz rig figures (include mechanic, or some enviroment item , building (with door bone) too)

    script may try to add new root bone when there is no root bone. then use it to transform when import pose include the figure transform. (exchange it as root node transform then apply it)

    if the object have no rig, (daz prop type), we simply use object transform, (there is no pose mode for the prop)

    So there will be no need to use rig object transform for posing. (then rig object transform can lock ) for blender.

  4. Thomas Larsson repo owner

    Now I understand what you are saying. There will be a new option that merges the hip and object transformations, but so far it isn’t working.

  5. engetudouiti reporter

    If you can, I feel, not merge with hip but add new root bone to move full rig for daz default import rig, (but I do not know how others think)

    I remember, about MHX, asked to add root bone agaiin (you temporally seems hidden them for a while), you really easy added it at that time.

    So if it not so difficult , I may prefere, add root bone at least for daz main figures,

    I really understand, we may think, apply translate (location) for armature obj is reasonable. because as you said, daz do not offer root bone for daz figure.. but it is because daz do not distinguish transform for pose and scene.

    So when we work rig figure in blender,, we need to choose . “use rig object transform” or “use root node as posable bone, then use as bone transform”

    Most of blender user may use the later. because they do not need to think about daz figure.. when make rig.

    I thougt same thing when I think about root node posing with MHX and rigi-fy. Actually I mainly use IK bone armature in blender,

    so did not think seriously about default rig, (it was ok for me because at least it could import pose most of case, then I did not need detail about improted pose, I pose as I like with use imported pose)

    Then about rigi-fy , my main request is try to use torso bone to move daz hip bone. (I understand it may not show perfectly same bone arragement, or if local axis change, but for rigi-fy actually torso = hip bone. so for hip bone, location, we can use it. (and rotation may work too, if convert as gloval rotaion) then as I already said, we only need to use root bone transform for rigi-fy and mhx., if genesis 3 transformed in daz studio then import pose.(which include daz figure transform)

    So there is root bone already, we can use it. .(no need to move rig as object,, even though daz move so,,)

    ====

    And why I feel, daz do not care it is rig pose or scene location, when we use “zero pose” it actually reset root transform too.

    then in blender, we need to use pose mode and object mode separately,, so think about posing, and import pose, we may better use bone transform.. (so for dafault rig,, maybe we need to add new root bone)

  6. engetudouiti reporter

    I can not recommend merge root obj transform with pose hip bone transform. (I see recent commit, and I afraid ^^;)

    because actually there is root node in daz, and the pivot is not same as hip. (you can actually see start point arrow and end point arrow, when you select genesis root node,, though it not show bone shape, so daz treat it as if root bone. and it have individuall rotation axis order, orientation too,,) so if it use for pose, I suppose we need root bone for blender.

    I may hope you keep separate transform for daz root node and daz hip bone, it should be more easy,, (and not complex, and may stable, and flexible whe posing too,, so we can use root bone, as same as daz root node,, with pose mode)

    Then after all, my suggestion is, “add same name root bone (like genesis3 female _root) etc, for rig heralchy, then use it for root node transform with pose mode.

  7. engetudouiti reporter

    My suggestion 2.

    So actually all daz posealbe assets have actually root node, which can use as if bone for blender.

    Then make things simple, generate new bone with same object name. (use the root node start point, and rotation order) as same as we generate rig hieralchy..

    Then use it for pose mode transform (or import pose.duf which include root transform value), so we need not change hip transform.

    Thouhgh it is just my assamption, it sholud be more easy, than try to merge mesh transform to hip transform.

    We can say,, so daz have root bone, though it not show bone shape for all rig assets. but in blender to use it, we need to generate as top hieralchy bone for pose mode. (so we need new root bone to represent daz figure assets ,witch have the object name with prefix etc)

  8. engetudouiti reporter

    My suggestion 3

    1 To keep compatiblity, add option “generate root node” untill convert MHX and RIgi-fy. then generate root pose node when user hope it.

    (if plug in can keep, start point, end point for root (object) node when import scene, I suppose it is actually easy done,, without breaking something,) and root node only need for rest pose rig, so it not matter how importer generate scene with rig object transform,,etc)

    2 add option, use root bone to apply daz root node transform. (so rig do not move, but root bone move, it may only work correctly, when user generate root bone with plug in offered option. so it depend user.. )

    Then most of case, there is no harm,, even though we get new root bone, which have same name as rig name for default rigs. after merged.

    We never complain about rigi-fy root bone, and MHX root bone. we use it ^^; and it is not hip bone.(it start middle of mesh)

  9. Alessandro Padovani

    @Thomas

    If I understand correctly what @engetudouiti points out, I don’t see what’s the issue here. In blender an armature is an object itself so it can store the daz object transformations in object mode. Then the armature bones can store the daz figure transformations in pose mode.

    Then it is true that we have to switch between object mode and pose mode to pose/animate the object or the armature, but this is a limit with blender that has nothing to do with importing daz poses/animations.

    Let’s do an example with the G8F where I first pose the object in daz studio.

    Then I pose the figure Hip bone, that’s the root bone of the figure. We see the armature is shifted from the object because of the Hip bone translation.

    Then we do the same in blender. First we pose the armature, that’s an object itself so this is done in object mode. That is, object posing and animation in blender is done in object mode.

    Then we pose the Hip bone that’s the root bone of the armature so this is done in pose mode. That is, bone posing and animation in blender is done in pose mode.

    So when we save a pose or animation in daz studio we simply have to store the object transformations in the armature that’s an object itself, and the Hip transformations in the armature Hip bone.

  10. Thomas Larsson repo owner

    It should be possible to bake the object transform with the transform of the hip bone, or root/master bone in the case of rigify/mhx. However, although this is straightforward matrix algebra in principle, I haven’t managed to get it right, and it involves some code that I would rather not touch.

    However, engetudouiti’s test file revealed another problem. The plugin maps Daz bone names to other rigs (mhx, rigify). In order to figure which genesis version it is dealing with, it looks at the bones in the duf file. This works with all standard files, which include all the bones in the rig. But engetudouiti’s file only contains the hip bone, which is insufficient to detect the rig. The bone mapping then failed, and the mhx and rigify versions were posed differently from the original G8F.

    To fix this, the user can now specify the source rig explicitly. This option was always there, but previously it was only used to specify the rest pose, now it is also used for mapping bone names. The two first items are special: Automatic means that things work as before, and None means no bone mapping at all, for rigs that are not Genesis characters.

  11. Alessandro Padovani

    @Thomas

    I can’t understand why you want to bake the object and the hip together. They are different items that can be animated for different purposes. It makes little sense to merge their animations together.

    Thake as example a figure that walks around the scene. I can use a path animation on the object and a cycle walk animation on the armature. This way the object will always be in place. If I bake the object animation to the hip then I can no more use the cycle walk animation. Plus the object will be at its starting coordinates for the whole animation, that may not be desired.

    As for mapping bones to mhx and rigify the plugin does know the source rig the mhx or rigify comes from. So when applying a pose it may be expected that the pose is for that source rig, otherwise it will produce unexpected results with a bad mapping. This is the same in daz studio when we try to apply a G3F pose to a G8F for example. Then if we want to convert poses among genesis generations then yes it makes sense to specify the source rig of the pose, but only for conversion purposes.

  12. engetudouiti reporter

    Alessandro you do not need to use option. on the other hand, I hope to use pose mode when import pose which include daz rig transform. As I said, so user can choose way to apply rig transform for blender. you like daz way, then you may use object transform, for rig transform. but I hope to use it without change object mode for rig, then basically separate object transform and rig pose transform.

    It is actually simple logic, daz figure do not offer root node as poseable boen. (because for daz it is same, all mesh have individuall start point and end point, orientation value for root node. we can not see it in blender we only see mesh pivot), then for rig we may add root bone for pose to transform full.

    blender rig often offer root “pose bone” to full transform when we use IK fK combination rig. Then usually daz hip bone need to be mapped as Blender FK hip bone.

    So hip up<> down with IK, it can show IK hip transform. at same time blender offer root bone for rigi-fy. then many rig vendor like to add root “bone” for pose full figure, . of course full rig can move with object mode too. we can use root bone as pose, then we can use rig object transform when we make scene location.

    So my suggestion is enhancement of default rig. I udnerstand, some do not think it need. but it not means though you do not need the option, you need to use it. if it is not your favor, I suppose Thomas can offer as option (which add root poseable bone when user hope it)

    But actually I do not have many interesting for daz default rig to use in blender. so If many users against it, I do not expect much. to add new root poseable bone for import rig, but I only hope Thomas offer option, when import daz pose, Daz root transform applied for Root bone pose, not apply for rig transform. so I can use Daz pose as blender manner with pose mode.

    Then actually when this add on introeduced, other user request same thing (add root pose bone, for import default rig) But unfortunatelly, I did not think why it is useful for animation too. so I repled almost same thing what alessandro now reply. Yes you can use object transform for daz figure transform.. (but actually get poseable root bone enhance default rig for blender)

  13. engetudouiti reporter

    @Thomas

    Yes it is why I asked we need to reconsider.

    When Import pose file (json), script need to convert daz bone to blender bone, but if there is no root bone, it need more step, and need to use different mode (so apply it as object transform), it is not good way I believe. though daz user do not think it seriously I suppose.

    But animator actually carefully use root bone transform and object level transform for rig in blender.

    So if we import daz pose file flexible, I may choose use Daz rig transform as Root pose transform (as pose value) then set key for root bone.

    = we can use reset pose etc,, wthich desigend to work for bone.

  14. Alessandro Padovani

    I understand that merging the object animation to the root bone may be desirable to someone since this way you don’t need to switch between object and pose mode. I’m just saying this is not necessary for poses to work. Mainly because I see that poses are not imported fine anymore. See #230.

    Then if Thomas can add an option without breaking anything that’s fine of course. If this may help an easy way is to add a root bone so the object animation can be copied there. Then personally I don’t like it. Also I’m not sure how this will work for hierarchy animations, when the figure is parented to a car for example.

  15. engetudouiti reporter

    Of course when we request something new, Thomas need many time to remove problem. I feel sorry, and actually afraid it may cause new issue and take more time for user.

    But it not means, the concept is wrong.

    Then the more thinking about blender rig and aprication, actually it was pity when import daz rig, which do not have any full poseable root bone for IK<>FK rig. And as I said,, it do not remove rig-transform as object. when we make rig or generate rig (armature) in blender, we alerady have Armature and can move it as object. so there is no harm,, just add root bone for full poseable, then separate FK Hip etc,

    (which do not locate bone pivot on world 0, 0, 0, with rest pose, but Root bone set pivot, for world 0. 0 0 with rest pose)

    Though I do not use it mainly, but if user often use current enhanced IK compatible rig (with option), they may see why Root poseable bone is really useful and can free mix use FK hip bone. without add rig object transform. when they manage scene.

    We often believe current way is naturall, but If plug in had offered Root pose bone for default rig, as default, I suppose we may say it is really naturall, and reasonable. then we may clear separate location transform and rig pose transform. and might ues with import pose too.

    (as user option)

    At current we had used, object transform only for default rig so long, ( tried to represent daz rig), so did not consider, to add root pose bone.

    And to use it as really flexible, with many condition, we need time. (so maybe there should be bug or case which not work but worked before)

  16. engetudouiti reporter

    @Alessandor

    do you really not like to add full root bone for daz default rig (which improted for blender)?
    Can you explain why “you Do not like it”? though it caused new error, I think it is enhancement when add on add it.

    If you use IK chain when posing, then just hope to adjust figure position (you now add diffrent chair etc), without root poseable bone,

    1. you may change Location of rig then use Object transform for rig. it means you now change the figure default location,
    2. . you may need to change FK and IK once, then try to adjust position as FK hip(torso for rigi-fy).

    If you have root poseable bone, you may use it. without change mode, You may not say you do not like it.

    I really think strange, so Alessandro, you complain about Rigi-fy root bone , you do not like it? really? You may ask Rigi fy author, please remove root bone? even though you do not use it, you never say, you do not like it.

    Actually you say samething for me. (I just request to add root bone, for import pose)

  17. engetudouiti reporter

    @Alessandro

    OK if you means, you do not like use bone pose transform to import daz root node transform as pose,🤔

    I understand. I miss read why you said You do not like it. if so I aplogize. About this request, I think carefully for others.

    But add root bone is for me most stable way, to use daz pose file more flexible. and can divide pose mode transform, and default location more clear. but “object transform of irg” and “ use rig pose “ is case by case.

  18. engetudouiti reporter

    Then actually I do wrong to request .

    Why I said, merge hip transform with root transform, when I import pose file which include daz root node (it shown as selection) transform,

    + hip transform value,

    we have only one choice for default improted rig. we need to use Object transform to apply it.

    But I often use Rigi-fy, then like to import pose, then there are many case, I do not hope to change rig location, but apply rig transform as root bone pose value. So I request it for rigi-fy. but at same time, I had known, default rig had not offered “root” bone. and maybe others think it is OK, so if add option to use transform as pose transform, it need to use hip bone transform untill we add root bone.

    If we convert duf data as tansform, I may prefer to use same logic to import pose. because it make things easy. So I suggest if you convert as Pose transform, maybe it need to merge top node transform to hip node transform as default figure.

    Then Thomas seems think it is reasonable, (if user think daz pose duf. for pose bones ), and try to merge .

    But I hoped if Thomas plan to add root pose bones . so you do not need to try merge root transform + hip transform. then represent daz pose. what I expected.

    1_ Hope to get new option. Use daz root node transform, for root bone transform (pose), only when we import pose.

    2_ so default rig have no root bone, if use the option A it not work untill we merge transform, then I hoped if you can add root pose boen as same as converted MHX or RIgi-fy.

    3_ after that we can use new option “Move root bone for daz rig transform” = (do not move rig as object , keep current location)

    Current status is, most difficult challenge, because without add new root bone, but try to offer, “ Convert daz rig transform as Pose bone transform for blender without root bone”

    I worry it, though I suspect Thomas can do it,, but actually I may not use option if default rig not offer root pose bone as same as before(because I do not hope to mix hip and root transform,, it is my fault and really sorry, to miss represent,,). 😟

  19. Alessandro Padovani

    I don’t like it because it’s not as the daz rigs are done. I mean if we have to import daz figures and animations then I expect them to be the same in blender. Any variation should be an option and may be good if it works fine. In this case it seems to me that a lot of effort is required for something that is not needed to import daz poses and animations. If the last working commit is 0a895ec as reported in #235 that’s quite annoying.

    Then again I do understand that this may be a desirable option to avoid switching between object mode and pose mode. It is a nice idea. But it could not be worth the effort if it requires too much work because it is not needed for things to work.

  20. Thomas Larsson repo owner

    Commit 0a895ec was made on October 10, which was long before this mess started. Judging from the commit names, it was when we worked with pivots, which could affect posing somehow.

  21. engetudouiti reporter

    Alessandro so you could not see same pose and animation, with recent versions (not current new commit one with my request)

    When you set figure transform for daz root figure in pose file. Or when we import vendor pose file, it set location. But you seems did not know the issue.

  22. Alessandro Padovani

    @engetudouiti I just trusted or misunderstood what Thomas said in #235. “Poses were apparently distored by my (not yet successful) attempt to deal wtih issue #230. They should be back now.”. Actually that’s the only reason why I came here trying to help. Then if the pose issue is caused by pivots in #217 I’m done here.

  23. engetudouiti reporter

    I do not check which version had caused issue, but when I import with some version, now it did not show location correctly, so I reported it.

    as first purpose for me, just enhancement for rigi-fy import pose. (because there was no way to keep rigi-fy root node position when improt pose it seems auto-return even though I already moved with root bone.. (now it had new option thanks)

    then I test with base figure with use hip pose and root node transform. then felt, mix use object transform and pose transform may cause issue .(or need more cearfully apply correctly) so it is not caused my request. (but some problem happend I understand with my request,

    after all we need to wait . and thanks Thoams all efforts.

  24. engetudouiti reporter

    @Thomas

    I found some clear miss. (though there seems another problem ,with import transform mix)

    When import transform for root node, with use options, I clear see, the gloval scale value to import from daz (0.01) miss applied for transform value.

    So in daz 10 cm need to transform as 0.1 m in blender. but at current it try to 0.01 for the root node transform. Or I feel if it need to change my setting of blender.

    and about root transform (object), it seems swap axis .

  25. engetudouiti reporter

    No hip had issue too.

    To test simple, I make hip only pose. then first try to test it.

    About hip transform, it will add minus value for unnecessary axis location.

    rotation already work.

    Hip is right (I forget bone direction of hip ^^;) .

    So the problem is only happen about root node transform. with recent version.

  26. engetudouiti reporter

    Root node transform axis, as blender cordinate, need to change Z (up down) reverse.

    at current I do not know how you convert and apply location, for toot node ( object mode)

    But those 2 issue break rig object tnrasform

    (1. unnecessary unit multipled for location value, 2 up-down (blencer Z need to multiple -1)

    I do not test with change scale, so it may need consider separately.

    I test with mix, hip only, object only, then I suppose (maybe) the unit scale multipled for object location

    is only matter. other things is my delusion.

  27. Log in to comment