Armature doesn't follow morphs that resize the model.

Issue #715 resolved
Eder Rogerio Deana Juliette created an issue

I'm not sure if it is a limitation of the addon or if I'm missing something. But when I apply a morph that changes the model's size, the armature doesn't follow it.

In my workflow, those morphs are essential to creating fast variations of characters inside the blender.

Comments (27)

  1. Alessandro Padovani

    This is a blender limitation. In blender, armatures can’t animate the rest pose as genesis does. The intended workflow is to bake the actor shape to dbz then only import the pose morphs. This also has the advantage that you don’t deal with a thousand of actor morphs as daz studio does.

    But this way you can’t morph one actor into another as genesis can do.

  2. Eder Rogerio Deana Juliette reporter

    Thanks for the explanation, Alessandro. But, considering some tests I did, first applying the morphs to the mesh, and then adjusting the armature by hand to the new mesh(Only scaling), I got satisfactory results. And considering others addons that fit armatures to the meshes, I'm pretty sure that this task could be done by code. At least when we have a morph that does it keeping the mesh proportions (As the Height Morph in the examples above)and not changing each member arbitrarily.

    Anyway, I don't know the viability of it. Or even if Thomas is interested in work on this issue. I'll leave the request open until he gives his position.

  3. Alessandro Padovani

    Yes of course it is possible to adjust the armature to the mesh but this will not work in animation. That is, the rest pose is not keyframable. Perhaps I didn’t get what you asked for in the first place. If it is a “transfer morph to rest pose” tool it may be possible but I’m not sure.

    Yep you better wait the answer by Thomas.

  4. Eder Rogerio Deana Juliette reporter

    Anyway, what I said above about adjusting the armature when the morph doesn't change the proportion of the model makes no sense. For just a model to be bigger or smaller, but keeping its proportions, I only need to rescale it by the armature, and it will remain all its functions. I already do this in my workflow.

    In fact, the problem is for morphs that change the proportions of the model. Including its limbs and joint positions, as for the Werwulf morph in the image attached.

    And if I get it right, Alessandro. Yes, the armature/model adjustment would be required just once when you apply the morph for the first time to the rest pose and not for a transforming animation.

  5. Alessandro Padovani

    While we wait for Thomas to reply. As a side note, if you don’t need to animate the rest pose, I don’t see how this is different from shaping in daz studio then export to dbz, that’s the intended workflow.

    I mean, as I understand it, we don’t aim to get the genesis platform into blender thus turning blender into a character generator replacing daz studio. We rather aim to use daz studio as a character generator then import in blender to animate and render.

    From this point of view your request doesn’t make much sense. But this is just my opinion of course.

  6. Eder Rogerio Deana Juliette reporter

    Alessandro, each one has his needs. For example, you have been doing hard work with Thomas to get good shaders/final renders. In my workflow, I don't even need to render my scenes.

    That said, I started the thread asking if this problem is a limitation of the addon or if I'm missing something when applying the morph once all the other morphs I tested so far worked fine inside the blender. So, I'm not demanding it to works inside the blender, just asking about the possibility.

    In my workflow, sometimes I need to create the most number of characters as fast as possible, which makes this task not so doable creating one by one in Daz and then importing them to blender even with the easy import.

    So far, to have a base character inside the blender that I can set morphs and then apply them to the mesh is the fast way I find to create a large number of variations. The tools are there and work amazing except for this kind of morph. So I'm not doing something wrong.

  7. Thomas Larsson repo owner

    As Alessandro said, morphs that change the proportions of the armature are not implemented today, so it is a limitation of the addon. I think it can be done in principle, by adding an update function which toggles into edit mode. Such functions are part of the mhx_rts addon, so I know how to set them up. However, we certainly don’t want to add update functions to every morph, because it will be a quite expensive operation.

    I need to think about this.

  8. Eder Rogerio Deana Juliette reporter

    I didn't give good examples of how useful it would be to have the armature following the shapes. In my case, with the Aging and growing-up morphs from the ZevO(plus the other morphs that already work with the addon), I would be able to create an infinite number of characters directly inside the blender.

    In fact, they work great inside blender except for the armatures problem.

    Anyway, if that is too much problem and so far I'm the only one requesting it. Probably it's better don't carry about it. I'll find my way.

    The addon is great and useful as it is. Thanks, Thomas.

  9. Alessandro Padovani

    Thomas, if I understand it correctly, the request by Eder is not to support morphing armatures as genesis does, but rather to have a tool to apply a morph to the rest pose. I mean outside of animation. This way he can use some full body morphs to fit the armature, as the growing up by Zev0.

    If full body morphs get the start and end points for the bones they change, may be this is doable.

  10. Eder Rogerio Deana Juliette reporter

    I'm not sure if Thomas may get it wrong, as pointed by Alessandro. But to reinforce, I would need a tool to fit the armature (in rest pose)to the final result of a morphed body. Not necessarily a function that resizes the armature in real-time while we set the morphs sliders as happens inside the DS if that makes more sense.

  11. Eder Rogerio Deana Juliette reporter

    But, once more. If that is not useful for others users, maybe it is better to left it behind.

  12. Xin

    Any real time resizing of a rest pose would be very bad in terms of performance in Blender right now, I don’t recommend it. For example, the most flexible animation nodes addon for Blender relies on constantly calling an “update” function with a timer because Blender’s update functions are not well integrated with the drivers system and the animation system. There are a lot of bugs there, which will be eventually solved when Blender officially implements nodes for animation.

    So it’s better to wait for next versions of Blender rather than tank performance or introduce a lot of bugs with any attempt at real time resizing. I think good viewport playback is a must for animation, and the benefits of being able to morph in “real-time” the rest pose of a rig (a rather unusual thing) are not worth it right now.

    As for the other request, a non-real time “fit” operator, that would be more viable and not affect performance. Even then, as Alessandro said, it’s not that big of a deal since for most uses exporting it from daz already solves the issue.

  13. Thomas Larsson repo owner

    I gave this a try, and it sort of works. Once the morphs have been set, the Morph Armature button updates the armature to the new rest pose. The overhead is moderate. Drivers are created for one float vector property for each bone, but only if there is a morph that changes the center point. Two more float vector properties are created when the armature is actually morphed, to store the original head and tail of the bone.

    However, I’m not sure how useful this is, because the armature morph is not animatable. So if you create an animation where a man turns into a werewolf, you need to manually click on Morph Armature for each frame. An update function would be needed to fix that.

  14. Alessandro Padovani

    I am very basic as for rigging. But why adding new drivers, shouldn’t we just edit the rest pose in edit mode ? Or is the new way intended for animation with an update function, that Xin advised against if I get it correctly.

  15. Thomas Larsson repo owner

    The float vector property is driven by multiple morphs. Then you use this single property to update the bone locations in edit mode.

    Morphing armatures are animatable in the last commit. This isn’t done with update functions, which would be terribly expensive, but with an application handler that is called on frame change. This is still expensive, but one only has to toggle in and out of edit mode once for each frame.

    Only selected armatures are updated, because only these enter edit mode. One can use that to control performance. In a test animation with two characters which both move and morph, I got the following benchmarks depending on the number of selected armatures:

    0: 54 fps

    1: 8 fps

    2: 7 fps

    The small difference between one and two characters indicate that the main cost is going in and out of edit mode.

    We probably want to turn this feature off by default.

  16. Thomas Larsson repo owner

    The file with the application handler can be executed in stand-alone mode. You need to include it in your file if you intend to use it with the plugin disabled, e.g. in a render farm.

  17. Xin

    Would be nice if there was an option to disable all this including the drivers and extra properties to restore the old behavior (even non-driven properties can affect viewport playback), because for most use cases this is not needed and you wouldn’t want to affect performance negatively. A typical daz character with standard morphs is already quite costly by typical animation standards.

    Although I don’t see myself ever using this, thanks for giving more options Thomas.

  18. Alessandro Padovani

    Thomas that is insanely great if we now have morphing armatures. This is a feature mostly requested in the daz forum. Going to do some tests myself asap to check how this works.

    Thank you so much.

  19. Thomas Larsson repo owner

    Xin, there is now a global option that needs to be enabled. If it is disabled, the only additions are three float vector properties to the PoseBone class, but they are only converted to id properties for the actual posebones if ERC morphs is enabled. That should give next to none additional overhead, I think.

  20. Alessandro Padovani

    update. Tested with the height full body morph for G8F and it works great here. Both the morph armature tool and the morph armature script. Animation test included g8f-height.duf, if it can be useful.

  21. Eder Rogerio Deana Juliette reporter

    Thanks, Thomas, for the fast implementation. I will not have the time to test it all before the weekend. But after a basic test, it looks like you went beyond what I needed, which is good too for other users, as mentioned by Alessandro. I'll test it by the weekend and give feedback, probably marking the thread as resolved.

  22. Eder Rogerio Deana Juliette reporter

    As far as I tested, it works great. Thomas, Thank you for the hard work on this implementation.

  23. Log in to comment