Is it possible to import differomorpic animation back into daz?

Issue #466 closed
Lenoardo created an issue

i tried everything but it is very difficult issue. so far it seems that you created solutions only for DAZ to Blender, but it would be very useful if we could import daz to blender then animate in blender and export back to daz. will you consider adding a bvh export for daz option?

Comments (58)

  1. Thomas Larsson repo owner

    Blender comes with bvh and fbx exporters, have you tried that. The purpose of this already too big plug-in is to import native daz files into Blender. Going in the other direction is beyond the scope of this plugin.

  2. Lenoardo reporter

    Even with original bvh armature when you export it from blender to bvh and import in daz it gets bugged, there is a fix for that using https://www.daz3d.com/forums/discussion/428856/sagan-a-daz-to-blender-alembic-exporter/p1 . It is a new alembic exporter, but for some reason it has an option to fix blender exported bvh files, but this works only if the armature is un-altered. Using this on deiferromorphsic exported bvh does improve the situation, but it is bugged.

    What you could do is to figure out what is the problem and add a button to convert your armature to the way original armature is set up - for export purposes.

    Another thing you could do is add a backwards retargeting option to your bvh retargeting addon, so we can animate in differeomorphic setup and retarget it to original bvh daz armature that can be imported back to daz.

    I understand this is not the goal of your addons to export stuff to daz, but i think this is within acceptable limits it is hardly out of scope to add backwards retargeting. Hey lets just be able to retarget back to original armature, instead of only running away from daz? Is it really that much?

  3. Lenoardo reporter

    will you consider at least backwards retargeting? so retargeting from your armature to armature that was exported from daz as bvh?

  4. Thomas Larsson repo owner

    It isn’t so easy to figure out the relation between rotations in Blender and DS. There is a relation between the bone orientations, but in Blender some axes have been interchanged and some have been flipped, because Blender requires that the bones point along the local Y axes.

    I tried to export the armature as a bvh from DS and use the retargeter as you suggested, but couldn’t get a good result.

    What does work is if you import the character with the settings Z Up = off and Orientation = DAZ Unflipped. Then you can export a bvh and the pose is correct in DS. Alas, these are debug settings where the bone orientation is the same as in DS, and not so easy to work with.

  5. Thomas Larsson repo owner

    What we need is tool that converts an action for an ordinary daz rig to the unflipped rig. Such a tool can be made, but it will take some effort. Once it exists, we could export an animation to DS with the following steps.

    1. We need two armatures, the ordinary one and the unflipped one shown above.
    2. Create the animation in Blender for the ordinary rig.
    3. Use the new tool to flip axes. The animation no longer makes sense for the ordinary rig.
    4. Assign the action to the unflipped rig.
    5. Export the action as bvh.

    Not terribly elegant, but I think it is doable.

  6. Xin

    I don’t think this is worth doing. Why would you go back to a limited software that does things in bizarre manners compared with established 3d packages like Blender that have been tried and tested for complex animations and which can interface with pretty much everything, from game engines to other 3d packages (unlike daz)?

    This feels like a rare feature/workflow that almost nobody would use. Once you learn Blender there is no reason to go back.

    Trying to make the addon be daz on blender is something that will only make the addon increasingly rigid and harder to maintain: think of all the very likely issues people will report over time, all the future time that will be spent maintaining it, all the changes that will have to take this feature into account.

    Bottom line, this is daz’s responsibility. That daz is bad at interfacing with other software is daz’s problem. The way I see it, getting out of daz and gaining the full advantages of a full 3d package is the entire point of this addon.

  7. engetudouiti

    I have no view which OP request is worth or not for this add on enhacement. But at same time I clear remember there have been quite a few DAZ user, who try to make animation in free aprication with stable IK , then export for daz studio as animation format file (bvh, FBX, etc) I kinema or Akitsu or blender… Only reason we seldom talk about it seriously in daz forum, daz depend vendor who sell item for daz. and pose file or animation file are one of popular daz items. Then about OP issue, import bvh which exported from blender for daz studio, we need to consider difference of blender bvh and daz bvh.

    1 Daz do not generate rig by import bvh, so all bvh import need to re-target .

    2 it is somehow complex, but Blender export bvh always include bone rest pose off set value from Hip (I do not remamber all detail though)

    in animation file. I noticed it when I tried what OP do long time ago then reported issue. but blender dev may not consider, and there seems no active bvh add on dev in blender I feel. (so it auto closed )

    https://developer.blender.org/T50555

    So when import blender bvh, we need to clean up the off-set of bvh . or ds rig try to pose bone with use the off set values then deform ugry. That means we need original bvh exporter. (we can not re-use blender bvh exporter for that purose. or maybe in blender we need to change each bone rest pose when export.

    It is only matter when bvh use bone translate animation for non root bone (eg face bone translate animation), (bvh may not describe translation as animation data, when there is no translation channell, only root postion described.

    What I may expect , there will be animation.duf generator which can directly import for daz studio. it may work if we make kind of rig template for each generation figure for default import rig (and converted rig) At same time it may only work for rig, which we make template (converter for each bone transform for daz)

    I test many free app for the purpose long time. but basically they do not work without I haslte around to check problem for each aprication importer exporter.

    So if there will be tool which can export animation file directly which made by this add on import daz rig, by one click and export to ds,, I simply apreciate it. Daz ani-block (animate-2) is actualy powerful tool. btw Ds ani-block system is far better than blender Action editor. (conposit animation block) , though there is no complex F-curve modifer etc,, but about NLA tool.. Ani mate is better than blender (at lesast user friendly) and we can direclty use iray and already applied (bought) materials.

  8. Xin

    That’s not true, aniblocks and daz’s animation system are definitely worse than Blender’s animation system, which resembles the system of industry standard 3d packages. It’s not even a close comparison, daz is just awful in this aspect. What daz does is not standard for a reason, you lose a lot of flexibility. Not a single animator I know would prefer daz system. On the other hand, most daz users hate daz’s animation system.

    As I said, trying to force all the bad stuff of daz on Blender is not a good philosophy. At one point the user needs to learn to use Blender properly, or just use daz. Trying to make Blender be daz or excessively accommodate to daz makes little sense (while making Thomas' life harder in the long term), Most people using this addon are using it precisely to get out of daz and gain the power of a proper 3d package (especially in animation), otherwise they would stick to daz.

  9. Alessandro Padovani

    Xin, personally I agree that blender is way better than daz studio at like everything. And indeed that’s why people ask to use blender to make things for daz studio. So they can do in blender and sell in the daz shop. In the daz forum there’s request to use blender to do daz animations and even daz original figures, that is, model and rig in blender then export to daz studio. That I understand is outside the purpose of diffeomorphic.

    edit. There are a couple of things that I find very interesting in daz studio though. The first is the morphing armatures in the genesis platform, so the armature can morph from a human to a werewolf during animation for example. The second is the daz puppetteer system to “handcraft” a mocap, that indeed resembles how puppetteers animate. I find it very effective for some kind of animations as dancing loops or moving holds or even quick facial animation. It would be great to have those in blender too.

  10. engetudouiti

    I did not say, blender animation tool is better than daz animation tool as full aspect. of course not.

    but I said about blender NLA = action editor, and way to save each animation unit as action and daz Aniblock (Animate 2 editor) system. I really like the ani-bock type editor to composit animations (re-use and mix) . and it is better than current blender offer action editor.

    I do not know why generate animation file made in blender and make it use in daz studio means  trying to force all the bad stuff of daz on Blender?

    OP said make animation in blender, then export it to animate in daz studio and render. we make animation or pose with blender. but export it for daz studio too.

    Then we are just 3d hobby user. . Why just make hobby render (just some minutes animation or static pose render with env) you can say it is right or bad way? I mainly have learned blender to make mod of 3d games, with import game character rig or animation file, or make some shape but most work need in mod tools to show in game.

    I understand It is just hobby. So I really do not know why hobby user need to think same as your personal view. If you have used daz studio often, and you know more detail about daz studio than blender, you might hope to use blender only for specific purpose but still use daz studio too.

    it is just your way how use blender and daz studio for your 3d hobby . I already notice this add on is really enhanced to generate rig as same as daz in blender. so if I keep to use daz figrue and render, I usually stick with blender and this add on to make 3d scene. at same time I do not understand why when we talk about daz figures (which made for daz studio not blender), and add on to make some 3d work in blender, we need to deny export animation from blender for render in daz studio. (return animation to original rig and materials)

    importer and exporter for 2 apricaiton i(like bridge) is better than import only.

    You can say, this add on is mainly developed to import daz figure to blender. And hope Thomas concentrate it. if so I could understand. I mainly report about import things. at same time OP request is reasonable for me.

    I always had hoped if there will be add on which can re-export animation from blender to daz studio for iray render.(with use many daz assets) it is not relate with knowledge of blender at all. just for full use daz assets which we already got (then in daz studio I use ani-block, and I think it is far better than blender action editor for composit animation units)

  11. Xin

    Catering to people who sell on the daz shop (or refuse to learn Blender) is absurd. It’s their own responsibility to learn how to sell stuff there. daz should cater to them, it’s their store, not Thomas'.

    Trying to make Thomas work for free for a few people who are in it for money seems ridiculous to me. There is no artistic workflow worth doing where you would choose to go back to daz. It makes no sense since you are assumed to be a Blender user the moment you use this addon.

    This would be very clear if you could poll the people who use this addon, especially for animation. What do they do later? the overwhelming majority of them would never go back to daz because there is no legitimate reason from an artistic/workflow standpoint. Selling stuff on the daz store is not a legitimate one, that’s just making Thomas work for a few people for free.

    As for NLA strips being worse than aniblocks, that’s just not true either. Blender has strips which integrate much better with everything in the scene since Blender’s animation system is way more powerful in general (you can drive whatever you want): https://docs.blender.org/manual/en/latest/editors/nla/introduction.html#header

    If you know how to use them, editing those strips is quite easy too (and way more flexible than daz).

    As I said, once you spend time learning Blender for animation (just like people spent time learning daz), there is no reason to go back. And it will only get worse for daz since Blender is improving that area soon to.

  12. engetudouiti

    Xin I have used blender action editor, then know how stirps work. and of course daz can keep all ani block in saved scene with mix use time line.

    and edit each ani-block for all nodes.

    Blender action editor is actually really bad UI and not offer way to save those strip as each animation file . all need to save as blend scene action.

    why you can say it is better than save and keep as each ani-block file. tell me reason why.

    Then I say xin you may better not say me to learn blender, I suppose you do not know than me.

  13. Xin

    You can easily use the “append” feature from Blender, among a lot of other alternatives. Blender has its own workflow which is superior in virtually every sense once you learn it.

    The main reason why Blender doesn’t create obscure file formats is because Blender strives to be portable since it’s a full 3d package, unlike a glorified closed doors store that tries to make interfacing harder to keep people walled in. Did you know this addon can’t import aniblocks? Thomas had to work around that because daz doesn’t do thing correctly and wasn’t designed to be a full 3d package but to serve their store. Once you approach 3d packages with an open mind instead of trying to force daz’s way on everything, you will see how absurd daz is.

    In any case, why are we arguing this? can you legitimately claim that a single animator would ever choose to go back to daz for aniblocks? for what exactly? daz animation system in general is awful so there is no net gain from it. Using daz to save aniblocks created in Blender for later use in Blender is such a ridiculous convoluted workflow, Blender’s own workflow is faster and more efficient. This seems to me like people refusing to learn Blender and instead trying to make Blender like daz.

    I feel like at one point Thomas will need to make it clear that this is an importer, not a new interface for daz or a plugin for daz, but an addon for Blender to be able to import daz store assets.

  14. Alessandro Padovani

    Xin, I agree it makes little sense to go back to daz studio from an artistic and technical point of view. As for the daz shop, I’d not be so harsh myself. I like daz also because they provide great tools and models for free, as the whole genesis base packages and the free assets in the shop. That’s not a little thing in my opinion.

    So personally I’m also keen to help people who want to use blender to make daz assets.

  15. engetudouiti

    I think We are just a hobby 3d user not pro 3d animator. So please do not say it makes little sense to go back animation to daz studio from an artistic and technical point of view. so what is real technical and artistic view ?

    Xin you really change what I say often . I know add on can not import any daz aniblock file. but we can make ani block free in daz studio, if there is animation file in daz studio

    so it is no relation with this request at all. and I have not bought any new assets from daz shop almost 3 years more.

    The reason to import animation for daz studio, is simply use daz assets which I had bought, as full with genesis figures and iray render (or 3delight? ) we can add already made and well customized assets for iray too. the real purpose to use blender or daz studio is render.

    So if someone like to make all in blender then render animation do as you like. at same time if user like to use daz studio to render animation, and plan to re-use animation file in blender then use it with Go figure offered ani-block system is free. if you say it is techinically wrong or not artistic, you need to mention the reason clear.

    At same time I said I have no strong view, and request it for this add on , but I apreciate such request as daz studio and blnder user. . even though Thomas not plan it. so when someone deny it is no useful etc , I may hope to ask reason. . And I can not agree your answer after all.

  16. Alessandro Padovani

    Engetudouiti, as for aniblocks afaik animate lite can’t save them unless we buy the full license in the shop. Or am I missing something ? I’d like to save aniblocks if there’s a way to do it.

  17. engetudouiti

    Alessandro I means free.. you can free make aniblock with animate 2 and animation on daz time line. in daz studio. so you simply buy it if you hope to make ani-block

    or you can not. It is same untill we bought hd morph we can not import it to blender. At same time I never say daz user need to buy ani-mate 2. For user who do not have animate 2 licenses, simply I think they can not understand the real function of Animate 2, so if you need to test ani block editing ,I recomment buy it.

    and compare blender LNA Action editor strip system. When I request tool for daz studio, I do not care each user get the official add on or not. as same as HD morph or daz pyshics assets.

    Then even though you do not have Animate 2, you can still run import animation duf which you made in blender for daz studio if there is exporter.

    But I do not think there is any merit to keep talking about issue any more, because yours simply do not like to run Animation in daz studio. For me it is just case by case.

  18. Alessandro Padovani

    Thank you I was just in doubt that I may miss something. I do use animate lite to compose aniblocks and bake them to/from the timeline. I did the zero-dance for simulations this way. As far as I see animate lite is fully functional it just can’t save.

    But we can save timeline animations instead then bake to aniblocks for editing, so it’s almost the same there’s just one extra step.

  19. engetudouiti

    I do not remember all lmits of animate light, but could you edit ani-block directly with animate light?

    The worst thing was, now I have lost official go figure documents which describe all options about Animate 2. then in web I can only find some you tube series. though it still useful. but not describe each detail about edit aniblocks and work with daz time line.

    If there is user who bought ani-mate 2 now, they may lost how to use it correctly and simply thinkg it is not good tool as NLA animation editor. even though they like to learn tool. If I am real daz suporter, I may recommend vendor tutorial. but I am not. so do not link those. even though I found them.

    (almost things I remember of each options, but I do not remember each option difference, so may need to test again if I full use it with import animation files)

  20. Lenoardo reporter

    I am not even going to bother reading through pointless bickering DAZ vs Blender, there is no arguments there they are 2 different software built for different purposes. I will however express my deepest annoyance with people who go off topic and trash the threads and request with their garbage. Nobody cares about your opinion on what software is better or about some philosophy - keep it to yourself please and don’t pollute a SIMPLE REQUEST FOR BACKWARDS RETARGETING with pointless arguing. With that being said I will share why I made this request, I have a very good reason so here it is:

    Diforomorphic daz importer is great, love it. But I don’t want to move my entire workflow to blender simply because it is way to complex, problem-prone and there are serious performance implications as you add morphs and correction complexity and it is inferior when dealing with clothing setups. I just want to pose my character in DAZ and render it in blender in 1:1 geometry ratio, that is all I want and it is very easy to do with new alembic exporter i mentioned. You set it up once and you are good to go, you can even re-use the setup. Problems with this is animation, DAZ is difficult to animate with so animating in blender and getting it back to DAZ then exporting back to blender through alembic would patch all the problems for this workflow.

  21. Alessandro Padovani

    Leonardo, in general I’d agree with you about “trashing” posts but, in this case what you see as “trashing” I see as “evaluating”, since Engetudouiti Xin and me are main contributors to diffeomorphic. And you should care about our opinions because they do affect you as a diffeomorphic user. For example both Xin and Engetudouiti (much less me) may be able to help Thomas find a nice solution to export daz animations. Or not if they don’t want to.

    Then in general a little chat doesn’t kill anyone so please avoid being rude that’s not the case here. Thank you.

  22. Lenoardo reporter

    Oh, didn’t realize you are all developers my apologies. I see this DAZ vs Blender bickering a lot everywhere so it goes on my nerves quickly but yes since you are all developers I should have tolerated it and not been rude about it. But, I dont agree with the attitude of “why should we cater to DAZ users when we want to run away from DAZ”, like dude are you making this for good of humanity or is this a commercial project? because i dont think this is commercial and if you are doing it for good of humanity then obvious that some kind of blender to daz would be very useful and beneficial for lot of people. You can make all kinds of arguments about how bad is DAZ or about their development or their politics and then not do something out of principle. Like if you dont want to do it because it is hard or because you got other things to do thats great power to you, but this kind of taking sides based on some principles that way only ordinary people end up losing because DAZ is going to do their own thing either way. You don’t have to do it, just dont try to convince me you are doing me or someone else a favor by not doing it.

    So to clarify some things.

    • Exporting animation from DAZ as bvh, imported to blender, retargeted to differeomorphic = animation works fine. EDIT: it doesnt appear to work after some further testing
    • The imported armature/animation from above exported bvh, when exported back to DAZ - does not work. but it works if you use bvh fixer from Sagan Alembic Exporter EDIT: works

    So, really only thing that needs to be done to make this work is to retarget animation from diffeomorphic back to DAZ Genesis8 armature. I fail to understand why this is an issue, if you can do Genesis 8 to Differeomorphic, why cant you just reverse this process, export armature and click fix in sagan exporter and have animation work?

  23. Alessandro Padovani

    The developer of diffeomorphic is Thomas alone. Then Xin and Engetudouiti did some tools, other than helping Thomas. As for retargeting the bvh I’d agree with your vision, but I’m not a coder myself so can’t help here. And evidently there are issues if Thomas says so.

    p.s. then personally I’m doing this for fun, “good of humanity” sounds cumbersome

  24. engetudouiti

    😓 It was my fault. Though I still think export as duf is more easy for me, (if I make it because I know how plug in convert it for default rig)

    , but I did not check carefully your all steps about bvh I still think retarget for the imported bvh from DS rig is really difficult. but did not test with your mentioned bvh fix of new alemibic tool. so I should not add un-necessary infomation.

    At same time, I am sorry for others, I just hope to mention, if import animation, animate 2 is not bad tool to composit many animation file in daz studio.

    (About blneder NRA tool = Action editor is my personal view. I requested same thing about Action editor in blender dev forum before., and contact other user who offer good UI template . then I show how think about Daz Animate 2 ways. he actually like daz animate 2 UI. but it not relate with this issue) so it not means DS animation tools better Than Blender etc… )

    Then Alessandro thanks nice catch ^^ .. I needed it. btw At least I do not contribute this add on at all, but actually long time user.. who first use this add on I suppose. just add request what I need for me with bug report.. Anyway If Thomas think actually it is useful,, after all he may try it, so keep open . I do not attach anything here.

  25. Lenoardo reporter

    ok so i have tested the stuff again and, no - it appears when you export a proper full body animation from daz and try to use bvh retargeter in blender it does not work at all. so yes i guess it is not a simple matter.

    BUT, the armature that is imported from daz, when exported with blender and then fixed with sagan alembic exporter works and animation works. so i guess if retargeting from differeomorphic to this daz imported armature(through bvh) worked it could be done like that.

  26. Xin

    Thomas, if you are gonna spend time doing this, which I don’t recommend since it doesn’t make much sense (it’s a slow and awkward workflow where you lose a lot of flexibility and get no visual feedback on the actual final look of the mesh as you animate which is quite ugly), look into importing both rigs and creating bone constraints on the “debug” rig, specifically the Transformation constraint (in Local Space). As long as the transformations are such that there is a one to one correspondence between axes (that is, axes are parallel in local space, which can involve flipping (just swap min and max in the constraint)), you can very likely get away with letting the constraints do all the work (no reason to “translate” the action yourself). This way, the “debug” rig mimics the useful rig. You can then export the action from the debug rig.

  27. Alessandro Padovani

    @Thomas Larsson , if possible I’d second Xin so the user avoids to import the debug rig, that should be done in the background by the plugin. Also it makes little sense to animate in blender the daz rig since it doesn’t have any feature for animation. I feel what Xin suggests may also be used with mhx and rigify that would be much more useful.

    As for the issue with the hip rotation, did you bake the animation before exporting ? I mean on every frame. Because euler may need baking to work especially if you export quaternions. I just saw the blog and didn’t test.

  28. Lenoardo reporter

    I think mr Xin has not used DDI, DAZ and Blender for anything more practical then a sketch. I think if he did he would understand how impractical, inefficient and just plain difficult it is to port large number of assets to blender using DDI and go through all the tedious, error prone, performance bogging setups. When you can skip all that hell and just get what you need to blender and keep using DAZ for what its good for. Again, I understand if someone doesn't want to fulfill some request for real reasons but i think its best you keep prejudice and philosophy aside especially when you don’t know what you are talking about.

    Anyways thanks a lot for doing something Thomas I will test it out soon!

  29. Alessandro Padovani

    Leonardo please stop judging others, and keep focused on feature requests. That is, there is a difference between evaluating programs and/or feature requests, and judging people for their comments. You may be more polite.

    Then personally I believe Xin knows and does much more than you. And I’d wish to close this here.

  30. Lenoardo reporter

    I am simply responding to his remarks about my remarks so I am firmly on topic. If he did not deviate from feature-request topic into philosophy topic this would not have happened, either way I will reserve my rights to judge others how I see fit.

    He is correct that Blender is more modern and everything that goes in that context, that point has been beaten to death by many opinionated people. Xin is just flat out wrong that in all scenarios DDI workflow is superior then the workflow I mentioned, therein lies discrepancy. He has not tried both workflows and not considered all the implications for different production reasons, yet he is quick to suppress a feature that could mean life or death to someone. So yes I will reserve my right to state what I think on the topic that concerns me.

  31. engetudouiti

    Thomas the hip rotation or any bone limit issue is usuall one even though we import basic fbx or bvh directly to ds.Then I hope to sugest We should not judge other user reuqest by each experience or view., about this add on any more. That make anything good. There is no meaning to deny other request about this add on. each people may think this add on should be, but it is Thomas who decide what need or will be added . and he is not stuff man. So even though one time he do not interesting about ii, when he think it is maybe useufl, he have done for his add on. It only need to be decided by Thomas. If othes comment , it may better to offer idea to solve. or question to make things clear.

    Then Focus of Thomas blog, I remember I often need to set un-limit (as same as some pose.duf request it when import) Daz seems not show same dialogue when we import as other format I feel. But as you said, It might remain some problem when we make complex animation (eg daz rig have some driven bone. as default. so I do not know how it will be baked as bvh.. it need to test)

    Anyway thanks Thomas add new interesitng tool. After you finish this version stable, I may hope to add some request about export pose and animation. (untill it I think there remain room to enhance the bvh export option, but it may better to devide this topic I hope to know after OP test , it woked for each case. and if it not work, when it cause problem. (so do not quick close this untill you confirmed please)

  32. Lenoardo reporter

    Hello again I have just tested it and yes it appears method is not perfect and sagan bvh fixer makes it worse 🤷‍♀️

  33. Cristian Salina

    Leonardo, have you tried using the Maya bridge? That plugin comes with the feature you’re looking for (transfer an animation back to daz). Perhaps you could download a free trial of Maya and see if it works.

    https://www.youtube.com/watch?v=k2OzpcZTgqU

    I personally don’t think this feature is necessary since the whole point of the addon is to move away from Daz to a more superior tool like Blender.

  34. engetudouiti

    @Lenoardo

    you should test recent commit 😄 I believe you do not care format. (and I believed it is far easy than use bvh, because we do not need to care difference of daz and blender bvh importer, exporter)

    Thanks Thomas 😍 I really thinking to make new topic, export as duf , but it seems need not any more) I may report if it not work for some case… with another topic.

  35. Thomas Larsson repo owner

    I wrote about the last commit here: https://diffeomorphic.blogspot.com/2021/04/save-pose-preset.html

    The problem with the previous method was that it relied on the old and crappy BVH format. Going directly from Blender to DAZ made life much simpler.

    @engetudouiti Exporting stuff as duf is quite complicated in general, since it requires duplication of DS’s reference system. However, pose presets don’t depend on any other files, so this is not an issue here.

  36. engetudouiti

    @Thomas

    When I ask something I reserch it 😗 what I did today is actually check the pose and animtion preset format carefuly, (hand made write and test, and notice we only needed scene, animation object with url scheme to load pose preset. then I had confrimed if I can request it, you can do it easy as you already did. only mater is convert for daz Euler order correctly with check your rig covnersion data (as for me it took one week I suppose)

  37. Rakete

    This works really great with the default armature! But is it possible to make work with Rigify as well? If I try to save an animation that I made for a DAZ character with Rigify, only the head moves when I apply it in DAZ.

  38. engetudouiti

    You know without you convert rig-fy bone animation to default rig animation, or it never work. but I expect it too. (it should be expected as future. as first step we needed pose exporter for default rig, now it have done by Thomas few days work.

    To it work, it need retarget and convert MHX (or rig fy) bone animation to default rig bone animation first.

    I suppsoe you may include IK pose, about the case, you need to change IK to FK animaiton then retarget to default rig

    anyway untill Thomas forgive us to take his time for the request,

    I plan to test this add on, to easy retarget.

    https://github.com/Mwni/blender-animation-retargeting

    but Thomas had offered bvh retarget, for daz figures already (it use template),, so may hope to test it again. (I used Thomas bvh retargeter long time ago, but not remember how it work clear ^^; )

  39. Thomas Larsson repo owner

    It is impossible to get it exactly right, but an approximation is possible, and mhx would probably be simpler than rigify. The main discrepancy lies in the bend and twist bones, which are joined into a single bone in mhx and rigify. One could assign x and z rotations to the bend bone and the y rotation to the twist bone, but it will not be exactly the same.

  40. Alessandro Padovani

    I am not sure as for daz. But usually the twist bone is driven by the bend bone to relax the skin. If this is the case then we can ignore the twist bone, that is, not set keyframes for it, and it will be driven by the daz rig when we export. We need to verify this.

    update. In daz studio it seems I can’t pose the twist bone, it always gets the values of the bend bone. This should confirm that it is used only to relax the skin. Though I find it odd that the twist value is not exposed to the user.

    update. I exported a test pose with the new “save pose preset” tool. I can confirm that in daz studio the bend bone only gets x z rotations, and the twist bone gets the y rotation. Then the daz interface shows the two bones with the same values but “internally” it is splitted. Tests poses attached both daz and blender. The daz pose I did with daz studio, the blender pose I did with blender.

    important note. When we pose the daz rig in blender the y rotation of the bend bone is not exported with “save pose preset”. And this is good because in daz studio the y rotation is in the twist bone. But this means that the user must be aware he have to use the twist bone for the y rotation. For this reason may be we can lock y on the bend bone and xz on the twist bone in the daz rig to help the user.

    Below the test pose g8f-twist.duf. It is the same in the daz and blender versions. The blender version uses the twist bone for the y rotation. That’s what daz studio does “internally”.

  41. Alessandro Padovani

    @xin @engetudouiti @Thomas Larsson It would be nice to keep the twist bones in the mhx rig to preserve the skin relax in the daz figure. Do you have any idea how this could be done ? I mean for the ik chain to handle it.

  42. Alessandro Padovani

    @Thomas Larsson , it seems I can keep the twist bone in the ik chain easily by locking the ik channels. I am not sure how good it works though since it seems the rotation values are not displayed when the bone is driven by ik. But this may open up possibilities for mhx. Let me know what you think.

    Below a pose example with the locked ik chain. The bend bone is locked for y and the twist bone is locked for xz. Then I’m not sure what’s the best rotation order to avoid gimbal locks or how quaternions would affect this eventually. May be @xin can help ?

  43. engetudouiti

    Alessandro

    About imported default rig at least for this issue, we do not need to change anything, Daz just show controller bend or twist for non actual bend or twist bone at same time,, when it need for just posing easy. then real each rotation prop are hidden as default and locked.

    Then we now hope to pose with Thomas MHX rig or Blender default IK Rig fy . As Thomas confirmed both rig not use 2 bone to represent each rotation. At same time I feel it may not make so hard problem. I remember when I need to import usual rig FBXs for daz double quarternion with separate rotation bone rig, I need to retarget as Thomas mentioned. (I do not know Daz already correct it or not at all, at that time even though export FBX from DAZ and return it not work correctly untill we set rig map)

    of course it not perfectly same animation or pose but after all user can still adjust default pose if it need after transfer action to daz default rig in blender or you may prefer work in daz.

    Then make MHX FK bone change as same bone hieralchy as the DAZ way is one of idea, but I do not think it really need, because blender do with use Preserve volume option only (double quartanion auto circulate bend and twist deform with use one limb bone)

    Of course If Thomas like daz way it is not matter,(it may show more good defomation because general weight map can devided with use 2 bones different weight map) he may challenge it but if he actually think it need not, I may not hope he convert MHX rig as daz manner. I do not think it work well for real IK chain, when we need to change mode often.

    Then it seems natural for me just use the MHX limb twist rotation as twist bone, and use bend rotation (aka main rotation) as daz bend bone bend to convert pose for daz figure. Do some one know actuall rig which use same hieralchy as daz? (devide twist bone and bend bone, for IK FK compatible rig…

  44. engetudouiti

    Thomas about Rigi fy It actually devide twist bone and bend bone for actuall deform bone, when we rotate FK bone. for 4 limgs

    I can confirm it with rotate FK leg, twist second twist bone only, bend will only bend second bend bone.

    Are you using same logic for MHX? (or MHX not devide rotation as 2 bone hieralchy)?

  45. engetudouiti

    So the problem is when convert IK pose to FK or bake IK pose to DEF-bone , it might move un-necessary rotation (which not happen if we use FK bone only) or you means, the bone axis force to align upper and lower, then may cause issue?

    MHX actually devide twist only bone at least for upper arms, but when I twist FK arm, it only rotate deform hand bone. It seems main difference MHX defrom bone and DAZ bones for me.

    As for me what DAZ do for their G3, G8 rig and MHX, rig fy rig seems almost same.. at least for FK pose with deform bone chain)

    In daz when you rotate bend bone, with use daz value, it is simply ignored. but twist bone. then if you bend twist bone, the value is ignored but applied for bend bone. I do not know so Thomas means,, the difference.. (I did not notice about FK arm bone twist may only twist hand for MHX converted G3 rig, though..)

    ==

    I think the way you twist MHX lower arm is not intended? I may make it as separate topic. for MHX rig. Now I confrim it is your intention. you use hand twist to twist Forarm (it is actually more real human like I feel,,) but daz not twist forarm when we twist hand. at same time use the forarm twist directly. and twist hand bone separately.

  46. engetudouiti

    Actually MHX retarget IK FK mix animation directly to the default rig work very well.

    I use the linked add on, then set bone map , now my default rig driven auto with MHX animation

    even though I edit MHX animation with add new keys, it directly reflect for daz importer rig.

    Actuall problem is, even though I use the add on offered bake tool or blender offered bake tool,, it seems cause issue for hand and leg (with active visuall transform)

    the default rig now only animate with driver. then basically I believe I can bake animation (then remove driver) which pose def rig with use visual keying, but could not. (corrupt about hand and foot when I use bake animation )

    I thought you once tried to make action bake tool . then stop it. can you re-think it again? Retarget MHX (IK FK mix) animation >> to def rig, then bake the animation for Def rig. It is not only for some apricaiton. but can export MHX animation easier.

  47. Rakete

    I am trying to find a way to animate using rigify/mhx and then export that animation back to daz too. @engetudouiti could you send me the mapping of those bones or maybe the entire .blend file? I’ve been looking at the source code of diffeomorphic and how it exports poses to daz and would like to take a look at how you are retargeting mhx to the diffeomorphic rig.

  48. engetudouiti

    Rakete , have you downloaded the linked tool? , at current I stop to pray retarget animaiton, but I confirmed it worked well for MHX rig.

    then I may up-load my retarget map. But I only play G3 rig though. if MHX convert G8 rest pose not same as def rig, I think you need to set rest pose first (so it can work better, untill retarget)

    https://github.com/Mwni/blender-animation-retargeting

    Then though Retarget and baking worked well for me (only some version blender miss bake animation , but current 2.93 should work I suppose)

    there remain some problem. the Retarget tool force to change all bone rotation order as XYZ, then when I save and load animation in daz studio, actually it cause issue for me.

    I serched add on which can convert animation (eg quartanion to Euler or Euler XYZ to Euler YZX, , but it not worked well. (I see wrong converted animation in blender, between key to key.

    That means, with the retarget tool, you can retarget>> bake animation without driver and constrain,, but when save and load animation in daz studio,, for some case it show strange bone rotation

    I can not assert, it caused by add on save pose (and load) function or not though.

    Anyway I attach config file for G3, so if you compare MHX rig, and default rig, you should notice, which bone I use to retarget.

    (though actually I have tried 2 or 3 options , but basially it should work as start test)

    Then to get best retarget, you may need to un-lock rotation, for both rig. (it cause issue when retarget IK pose to def rig)

    and use these setting. of retarget add on. it make stable retarget for MHX IK pose.

    show my setting, with pic.

    .

    About G3 MHX , it use special constrain to manage foot tarsal but you may need not it for G8 and, the retarget tool offer to set IK correctly for def rig, so you can retarget it well I suppose.

    (I actually use the option of retarget tool, then IK or FK pose perfectly retarget well)

    About this mapping, I do not use tweak bone, = not use twk bones for MHX pose ,

    but even though you map twk bones. (deform bones), I suppose it should work.

  49. engetudouiti

    And one thing, about the retarget add on, after you set bone map,, it need to set (circulate) rest pose.

    Aka Rest Alignment,, but to work it, you at least select one map bone (target = default rig) then pose a little. then apply,.

    eg select one spain bone of def rig, , then rotate as 0.0001 in pose mode., if you keep zero pose for all bone, add on think there is no difference, then can not set it correctly. (add on author confrimed it but still not solve this issue)

    Then if you need to know more option detail etc,, ask again pelase, I can offer some tips which I have tried already to get better animation file for daz. (but still not work perfeclty, so not expect much, may need more work with compare difference. after retarget… (eg twist bone and bend bone ,daz stirictly use them, but when retarget,, bend bone contain twsit rotation, it may cause issue, when import)

  50. Xin

    If the import back to daz works with the rig that this addon creates when you first import it, why not just create copy transforms constraints from the deform bones of the MHX/Rigify rig (in hidden bone layers) to the bones of the original imported rig? then you just bake the constraints into an action and export the action from the regular rig. You shouldn’t need addons to do that.

    This is the typical process you use when you export Rigify/MHX actions to game engines too (game engines don’t support Rigify/MHX kind of rigs).

  51. Rakete

    @engetudouiti Thanks, that was already very helpful. I just tried and it works quite well using G8F. I am not entirely sure I’ve yet understood exactly what the difference between FK and IK is in the context of a rig, but I think I am just using IK (when I move a hand, the arm moves with it, which would be IK, instead of the other way around, which would be FK), and for that it seems to “just work”, though I just tested it only briefly. I also could bake and export a simple animation to daz without a problem.

  52. engetudouiti

    @Rakete

    If it worked well for you no problem. 😀 as for me, I saw some reverse rotation (key to key) when export and import to daz as save load pose.duf,, and sometimes not rotate as same as blender animation. maybe it relate with twist bone.

    I requested and Thomas offer new option, but I still not try it. So if you keep working (make more long animation with use full IK , FK in blender then try to import daz), tell me please if it worked almost perfect or not. I may need to ask your setting and how you set MHX options.

    Btw I recommend MHX more than rig-fy because this year, I concentrate MHX snap IK <> FK work perfect , and get good pole way. with keep current some functions. (bone stretch on and off ), then it already improved much by Thomas. if you snap IK FK rig and convert animation often, you may prefer MHX.

  53. Rakete

    @xin I actually tried using copy transform constraints, and it works well enough. But I decided to keep using the retargeting addon because its more flexible. The retargeting addon uses drivers on the transform properties of each bone, and the driver expression is a python function. So its relatively straightforward to adjust the behaviour of the retargeting by changing the python code.

    What I found is that its necessary to make sure the bend/twist bones really only receive bend(x,z) and twist(y) rotations, with the retargeting addon you can just delete the drivers from the locked transform in the target rig. So for the arm twist bones in the DAZ armature, just open the item tab thingie on the right side of the viewport, and delete the drivers on the locked Y rotation property. (I guess the same could be achieved with a copy rotation constraint that has the Y axis disabled).

    One additional problem I remember having with the copy transform constraint is that its not as easy to just save the animation. With the retargeting addon the drivers modify the transform properties of the bones directly, so you can see the changes, and also saving the animation/pose will just use those driven transforms. With a copy transform constraint the transform properties won’t change, you need to bake the constraint into the bone armature for the properties to actually change, and that makes it more difficult to use.

  54. Log in to comment