Making bones posable results in wrong drivers

Issue #296 resolved
jeroen b created an issue

If you create extra bones for face units, the drivers become affected. This is easily seen with the eyes in face units, look at how the eyes & eyelids (eyes side/side or up/down) behave before and after creating extra bones, after creating the extra bones the eyelids remain static instead of moving smoothly with the eye movements.

Something similar happens with making all bones posable when you use body morphs (poses). After making all bones posable (and thus creating more extra “Drv” bones), the Jcm’s do not respond anymore to manually posing the bones. It seems that this is caused by the driver input beeing changed to the new “Drv” bone instead of using the original deforming bone.

Comments (20)

  1. engetudouiti

    Yes I could confirm it with mhx converted rig, when I use eye side-side, eye lids (drv and child pose bones) not move anymore.

    (I do not remember when it changed or if it has been work so longtime)

    Basically, I suppose all bone controller need to link with drv-bones. (or constain if it is used)

    if I use eye side to side, it nee to move eye-drv bones, and all eye-lids drv bones. on the other hand, if user move eye-bone manually (child of drv bones), it have no link with other bones. but current status is, when I move eye-bone manually now it work as driver target of eyelids bones.

    At same time I know it is useful when user hope to pose eyes with widget (not depend controller) .

    When I check drv eyelids bones in driver editor, eyelids rotation driver target set as “eye” not “eye-drv” .

    To achive both (driven by drv-bone and eye-bone) I suppose, each l and r eye-lids transform driver need to add one more target (drv eye rotation) as B and expression need to change , like this example.

    0.125*A + 0.125*B +evalMorphsRot(self, 0)

  2. engetudouiti

    Yes I think it seems only way to keep both effect. (if I simply change driver target as eye-drv bone, when I pose eye manually eyelids can nof follow anymore)

    Though I do not have strong view about this issue. (basically as for me, manually move eye >> eyelids follow ) is better but, if it lost controller function, I can not decide which is good or not for others.

    I tried to use another Space type, but after all blender still not offer way to use visuall transform rotation value as driver targets. (so Local space is only way to get reasonable effect). then if use eye bone transform as driver targets of eyelids bone, when we use controller it can only change drv-bones transform values. so eye bone (child visual transform is ignored = 0. so it can not move eyelids.

    I seldom import pose controller (I can easy expect, there should be case it may not work well when we mix use controller and manuall pose), but samething may happen for jcm drivers too. maybe at current jcm only work when target bone posed by controller or manually posed. )

    eg as default, pectoral drv bone are auto driven by collar bones. then pectoral bone have child poseable bones user free rotate. then if it have jcm which deform with pectoral,

    the jcm only activate when pectoral move by sholder or move manually. (without driver ) I suppose. Though I do not know if there is jcm which link with pectoral bones.

  3. engetudouiti

    I test with handmade custom jcm for pectoral. then import it by import custom jcms.

    the jcm (shape key) change value as 1.00 when Left pectoral bone side to side. Then I import it.

    untill “all bone posable”, it work as expected, that means, when pectoral bone moved, by collar,, it set the shape key value as expected.

    Then after import the jcms when I set all bone posable,, plug in generate new pectoral bone. which can rotate free. but the jcm link with drv bones only. so even though I move pectoral side to side with use manuall pose, it never work.

    But when I rotate collar, it drive pectoral drv bone. then shape key value change. it is simply because, the driver target is not “pectoral bone”, but “pectoral-drv bones.”

    to correct it, I need to do same thing which I mentioned above. add pectoral bone transform value as new variable and may need to change the Expression.

    (or the custom jcm may only work when pectoral moved by collar bone)

    I suppose (though not test), many jcm may not work when user manually pose bones. (if jcm shape key (value) driver target only discribe, drv bone transform as same as when I import custom jcm for pectoral.

    or it only work when user manually pose, but not use pose controller.

  4. engetudouiti

    So this problem is, when we use all bones posable, we will have 2 bones for same locaton when rest pose.

    One is Drv_boneXXX (for controller or driven by another bone) and the child boneXXX (for manuall posing)

    then we may need to set these 2 pose bones (one of them) transform values as “driver target” of shape keys (jcms , flex morphs, ) or other bone transform., like eyelids bones (it need to move with eye then set driver target as eye or eye drv bone transform values)

    About these case, plug in need to set both bone transform values as driver expression varialbes, then count (mix) both bone transform as driver expression.

    Current plug in only count one of them. I suppose easy way is plug in simply duplicate current target variable with change bone name, and “add” it in expression.. then it may work as we expect, at least when user only use one of them for each bone sets.

    To get work better, plug in need to circulate visual transform of child pose bones. which include the “ parent drv bone” transform. then use them as driver target expression.

  5. engetudouiti

    Yes thanks I could confrim, now it add new variable, at same time do you intend to remove the evalMorphs function for eyelids only?

    like 0.125*(A+A2). before I could find evalMorphs function , which may circulate all controller effect,,, (though with test eye-side side, eye up-down it seems worked, but I do not know if it can keep controller driver which may effect those eyelids bones.

    Then I may test later custom jcm (attached), to test pectoral bone JCM , (for g3 left pectoral only) , If you need test it please. (import as custom jcms then check when manually move pectoral, or use collar rotation, it change the shape key value or not.

  6. engetudouiti

    I test with custom jcm. then it still not work . it seems add driver target for pectoral bone only. so when I manually move pectoral, it change shape keys. but if I move collar bone, it can not change local transform value for pectoral, (but it actually rotate drv-pectoral, then rotate pectoral as child bone,, so it need to move the shape key as JCM)

    I use all bones posable, after import face units, then import JCM and all bones posable again, if it cause this problem, (could not set driver target for drv pectoral and pectoal at same time,, ) that is reason why I recommend #298

    https://bitbucket.org/Diffeomorphic/import_daz/issues/298/auto-generate-necessary-drv-bones-for

    I may test again, after import face units, and import custom jcm, then use “all bones posable” one time.

  7. engetudouiti

    So I test again, this time, import jcm first, then make all bones posable. and test custom jcm only. this time it only set jcm shape key driver target for drv-bones like this pic.

    So if I manually pose child pectoral bone of drv, without move collar this JCM not work. I suppose same thing should happen, when user import pose controller after that, use “make bones posable”. without you happend could not change expression only about those “bone link bone”

    Then I suppose when user use “all bones posable” is really matter. to set driver target correctly. ( I suppose this funciton may change driver target too)

    I think it is not simple, but if we carefully check each case, there should be way to work jcm which will drive with both (separately and mix use)

  8. engetudouiti

    I think, you can consider use “Child constrain” or “copy transform constrain” in spite of set poseable bone as child. (as future plan after you solve this issue, consider as future option please)

    The advantage is, “local space” transform will include those constrain value as same as driven value. so you may only need to set actuall pose bones transform values as driver target. then set space keep Local = it can not include parant bone transform but can include effects of constrain (and driven value I suppose). so when drv bone transform, the child bone transform will add drv transform too (I suppose). because the delta is generated by constrain, not actuall parent bone.

    at same time it need to change current rig hieralchy so I do not think it is simple. (may need many test again)

    (I suppose, drv bones and pose bones may need to lcoate in same hieralchy when we use child of constrain. , but can not imagine how it may work for MHX etc and body drv bones when import pose controller, you may need to test with actual customize rig I suppose.)

  9. engetudouiti

    I made simple test, with use copy bone transform constrain + Before Original with manuall pose bones.

    I make eye bone. which is copy bone from drv-eye-bone. then it can move free, but follow drv-eye-bone as if it is child of the drv-bone. And I set driver for another driven-bone (eg eyelids) which rotate with pose eye bone.

    then when I pose drv-bone, >> it move pose-bones >> it correctly add visual rotation of the pose bone for the driven-bone.

    Basically it seems what we expected. I suppose. (though it is temp test, if we can use constrain in spite of “actuall parent relation” .

    check it with 2.92 and see how it work, maybe I think we can exchange all child pose bone to constrain copy transform bone, with keep free move. (though you may need to check it actually work well or not untill try it, at current It is true experimental test only,

  10. engetudouiti

    Then if you exchange current “copy transform with Before original” constrain to simple

    “child of constrain” it seems work more like default parent relation. then still include drv bone transform correctly. when the bone transform is used as driver target expression.

    That means, if we use constrain to generate posable bone (without set parent) , we can set them as driver target, then no need to use new variables for drv-bones. with keep local space for driver, I suppose.

    And it will solve jcm problem too. because now we need not new variable and change expression, but only need to use real pose bone (deform bone) transform values with use “local space” for driver expresson of jcm shape keys. (as jeroen b said ^^ we only need to use the original deforming bone.

    (but It is really experimental idea, I do not like many complain when it cause new problem so it is just idea what I currently have,, I may test with real improt rig, then see when I exchange them what will happen,,)

    ==
    Then I sometimes hope (though it take your time), you may make new branches for real experimental function only .,. then you can try real big change in the branch,, like this case I suppose,, ^^;)

  11. Thomas Larsson repo owner

    The extra variable has been added to shapekey drivers, too. As for the other suggestion, I haven’t checked it in detail, but it seems like a rather major revision which I don’t want to do at this time. I have started to go over the docs and hope to make a stable release in a few weeks, and don’t want to change things too much now. Besides, I’m not so fond of the child-of constraint, which seems to behave quite unpredictably.

  12. engetudouiti

    Of course I may not hope to this add on un-stable for vacation season ^^;

    but actually you can test it, I think child of constrain seems stable or not show any difference at least use default setting. so if you already know some exceptional case, it cause unpredictably, I easy change my idea (like when pose, it show strange etc)

    At current I test only with my improt rig, with exchange those drv bone and child bone. then see if it cause new issue or not. (eg it cause difficult to import pose etc)

  13. engetudouiti

    Ok I could confirm now jcms and eyelids bone rotate with both bones. thanks.😀

    (I did not test with import limb pose controller, but basically it may work I think)

    To be frankly said, About circulation way to mix 2 bone (parent drv and child pose bone) transform , (at current it seems add 2 bone transform rotation for each axis) I do not know detail if it is actually correct or not. (But at least it should roughly represent I suppose, when I mix use pose controller and manually move the bone.)

  14. engetudouiti

    Ha ha, yes Thomas you are right 😅

    I did not test with pose head etc,, now if I use child of constrain, it seems work only when I play with face controller and the bones, but it show unique things when I pose other real parent bone, with keep same hieralchy.. I could understand why blender document not used it to represent usuall bone hieralchy,,

    So I reject to use “Child of”. then I think “copy transform with Before original” seems work at current, but I do not think it may work for all case..

  15. engetudouiti

    To confirm , with commit 9cd9a2b , that means now user can use all bone posable, anytime they need? (eg to keep default rig, I do not import any morphs , but hope to move eyelids, pectoral, foot toe bones. because if I do not import any morphs, there is no way to close eyes ^^; ) then I use “all bones posable” to free move those default driven bones..

    after that I import morphs (pose controllers) then click again the function. next day, try to import custom new pose controller or jcms etc, then user may use “make all bones posable” , it still work without complex problem?

  16. Log in to comment