interesting idea for morphing armatures

Issue #1874 resolved
Alessandro Padovani created an issue

This is reported by @AlternateDreams in the daz forum. Basically the idea is, instead of entering edit mode and changing the rest pose, we apply the morphed armature as a pose, then use a corrective shapekey to fix the mesh. The corrective shapekey is easily generated in blender using the armature deformation as base, as explained in the video below.

https://www.daz3d.com/forums/discussion/632636/

https://www.youtube.com/watch?v=Qoboh-da_9Q

There are some drawbacks I can foresee, as the shape may not match for intermediate poses since the bones and mesh interpolations are different, also mixing pose/scale animations may be troublesome. Nevertheless this could be an interesting idea to explore. Given two source and target figures having the same armature and mesh, the tool could generate the armature pose and corrective shapekey for the source to match the target. Then a mixer could also be generated to switch the source materials with the target, for example to turn G8F into Victoria 8.

Thomas let us know what you think.

p.s. Personally I'm not interested in morphing armatures and I don't use them in blender, I rather do a figure switching if I need to that's much easier and efficient. But again the idea above is interesting.

Comments (33)

  1. Alessandro Padovani reporter

    Please note that, in animation, we could use the morphing figure only for the sequence where the source turns into the target, then for the rest of the animation we can use the source or target figures that are easier to handle.

    In a limited way the effect could also be achieved by saving a baked source and target then mixing as shapekey, but that would work only for a single pose.

  2. Maneki

    On paper this doesn’t sound like a good replacement to the current solution for me. Especially when the rig is just used as a proxy to apply ERC morphs for a HD mesh. More complex animations where the rig change isn’t very linear could also cause easier problems. I’d like to test it but I wouldn’t develop it as a replacement right now, just as a option in beta, I guess.

  3. Alessandro Padovani reporter

    I agree, the current solution provided by Thomas is much more advanced. The idea above could provide an approximate and “fast“ way to generate a morphing figure from a source to a target, when there’s no need to be exact or compatible with a daz ERC animation.

  4. Thomas Larsson repo owner

    There is a first implementation now. The option is called “ERC morphs as translations”. So far it is only available for Import Custom Morphs and Import DAZ Favorites. Perhaps it could be added to other tools as well, but I don’t think any standard morphs really needs it. Facs morphs use a lot of ERC morphs to change the pivot points, but the effect is hardly noticable.

    This was fun and it works surprisingly well. Since the ERC morphs are implemented as pure translations, the bone orientations are preserved which makes it possible to load poses. However, one limitation is that if the morph mixes ERC morphs with ordinary translations, the latter are ignored. This is because in the end the armature modifier is applied as a shapekey, and that shapekey would include the effect of translations. The G8F legs length morph consists of ERC morphs for the leg and foot bones, plus an ordinary hip translation. The latter is ignored because otherwise the armature and mesh would not line up.

    The old way of doing ERC morphs by going in and out of edit mode is still there, but it doesn’t work if ERC morphs as translations is enabled. You can have one or the other, but not both.

  5. Alessandro Padovani reporter

    Commit 3c7d541.

    I tried to morph G8F into Victoria 8 and it works great here. I see that instead of making the ERC relative to the armature deformation, you set the armature deformation to -1 that in the end produces the same effect.

    possible improvement. interface. In my opinion the ERC options would be better placed in the global settings, that is, we either have “ERCs as rest pose” or “ERCs as animation pose (experimental)“, then the “morph armature“ and “auto morph“ buttons are only needed for “ERCs as rest pose“. But this is minor.

    possible improvement. target figure. It may happen that we simply want to turn a figure into another, the target could be composed of multiple ERCs and custom morphs, also using a mix of multiple daz figures. In this case it would be much easier to load the source and target as dbz, then add the target as a single ERC morph to the source. We could also add the target materials as material groups to mix to the source, so the transformation would affect both the mesh and the materials.

    In any case the proposal above is intended as “extra feature“, the current implementation works great as ERC. Let us know what you think.

  6. Thomas Larsson repo owner

    There are some improvements in the last commit.

    1. It is now possible to combine ERC and ordinary morphs, but not for the same bone.
    2. If the morph already has a shapekey, which is normally the case, the armature shapekey is subtracted from it. So there is only one shapekey.
    3. ERC morphs are now controlled by a single global setting, "ERC Method", with three values: None, Translation, and Armature.

    I will think about your other ideas tomorrow.

  7. Thomas Larsson repo owner

    The Import DBZ Morphs button can now import ERC morphs too. It has a local ERC method option which differs from the global setting. The idea is that for most morphs, like FACS, you can ignore the bone movements and still get a good result, so the global ERC method defaults to None (i.e. ignore). But when you load morphs from a dbz file, you probably want the bones to match the character in the file.

  8. Alessandro Padovani reporter

    Commit 89d24af works fine here, I tried to load a Victoria 8 dbz over a G8F and the mesh and armature morphed fine with the “translation“ method. As for materials we can easily copy and paste them by hand if we need to. Though using two source and target figures as described above would be easier.

    If there’s nothing to add I guess we can close as resolved. Thank you for this nice new feature.

  9. Maneki

    I did a first test and I love it so far. On first glance it looks exactly like how Daz morphs work but I’ve to stresstest it. Is there a downside I’ve to be aware of?

  10. Thomas Larsson repo owner

    It won’t work with mhx or rigify. But that’s the same thing for the other way of doing erc morphs, and for body morphs too (except the mhx compatible ones).

  11. Alessandro Padovani reporter

    The advantage of the new method is we can export ERCs to game engines, for example via fbx, because they are animation poses instead of rest poses. The disadvantage is the morphs are not exact for intermediate values since bones and meshes interpolate differently, so for example a 50% ERC may look off compared to daz. Also poses and animations may be limited to bone rotations since translations are used for ERCs, but this is not a issue for the common case.

  12. Maneki

    I found a bug with the new ERC feature. When I import head morphs as favorites with easy import, the morphs are all messed up, not only changing the head but also the body and the rig adjustment is extremely off/doesn’t work. When I import the same head morphs manually with the custom morphs tab by hand, they work normally.

  13. Maneki

    Manual import doesn’t seem to work either. Here’s a comparison between ERC armature vs ERC translation. The head morph is at 100%. It looks like with ERC translation the eyes getting ignored:

  14. Thomas Larsson repo owner

    Is this a G9 character? I.e., are the eyes a separate mesh? When I try with a G8 with Aiko 8 morphs, the main mesh looks fine but the eyelashes seems to be double affected if I transfer the head shapekey.

  15. Maneki

    Yes, it's a G9 character (Zack), I tested it with other G9 characters and it's the same. The eyelashes are double affected on G9 too.

  16. Thomas Larsson repo owner

    OK, I have identified the culprit for the Aiko8 eyelashes. When I transfer FHMAiko8 to the lashes with Vendor Morphs enabled, the plugin uses the morph file that moves the lashes down. But that is already done by the bone translations. If Vendor Morphs is disabled, the eyelashes are only displaced once.

  17. Thomas Larsson repo owner

    What happens to the eyes if you disable “Transfer to Face Meshes” in easy import. And perhaps do a manual transfer afterwards without vendor morphs?

  18. Alessandro Padovani reporter

    Yes these are the issues I foresaw with translations. Where there’s translations both in the ERC and the morphs/poses then it becomes difficult to manage both. In general some manual fix may be required for these cases with the new ERC.

    Unless Thomas finds some clever way.

  19. Maneki

    I did another test. When I only load the Zack headmorph I don’t have this issue but I noticed that the bodymorph changes the eyes. I compared the FACE with no morphs at all and just the body morph (no face morphs) and the body morphs makes the eyes pop out slightly (it’s minimalistic but you can see the character looking more staring):

  20. Thomas Larsson repo owner

    OK, let us test another idea. The plugin now transfers all shapekeys to all child meshes first. It is fine to use vendor morphs at this point. Then corrective shapekeys are created for all meshes, not just the main character. At least this seems to work for the Aiko 8 eyelashes. However, I’m not sure if corrective shapes for children should be generated even if no shapekey is transferred.

    To avoid that easy import overwrites shapekeys generated when the morphs were loaded, it now calls the transfer morphs operator with overwrite disabled.

  21. Alessandro Padovani reporter

    Just to point out, again, that with two dbz source and target figures this is much easier since everything is baked and we just need a single ERC with one corrective shapekey per mesh. This may be the domain where the new ERC can work fine. That is, not to replace the old method which works fine in general, but to provide a new method for a simplified transformation effect.

    Essentially this limits the new ERC to dbz morphs.

  22. Thomas Larsson repo owner

    Yes, I can confirm that there is a problem with the face rig. Especially the eyes have sunk in and the eyelids are pushed out. The problem is very visible in the massive monster that I used in the blog post.

    The problem has to do with the bones and not with the corrective shapekey. If we compare the bone locations with the same bones changed in edit mode, most of the face bones are pushed back. The difference is quite big in side view. The main exceptions are the eye and eyelid bones, which are located at about the place they should-

    If we mute the shapekeys, we see that the eye globes stick out. The corrective shapekey then seems to overcompensate for that, so combined with the shapekeys the eyes are such in instead.

  23. Thomas Larsson repo owner

    Bone drivers don’t work well with ERC morphs. This particularly affects the eye region since the eyelid rotations are given by the eye rotation. Things become a lot better if you disable Make All Bones Posable when importing the character with easy import. There is still a discrepancy in the face bone location, but the mesh looks a lot better.

  24. Thomas Larsson repo owner

    Now the face bones end up in the right position. The culprit was the limit location constraints. Limiting location relative to the original rig doesn’t make sense if the rest pose is changed, so now the limit location constraints of affected bones are muted when and ERC morph is loaded. And we still have to disable posable bones in easy import.

    But as Alessandro pointed out, ERC morphs should not be overused even if they work correctly. Importing a character with all morph baked is simpler and more stable, and most characters don’t undergo shape transformations. At least not mine.

    Here is a comparison between the massive monster, baked with a dbz file (orange bones) and as a custom morph (yellow bones).

  25. Maneki

    My characters almost exclusively change shape. Is it possible to load a character with armature ERC and switch to translation on the fly for some cases where translation isn’t stable enough?

  26. Maneki

    Fullbody morph controllers don’t work. I don’t really use them myself but the rig is really off when they get used. I just wanted to mention it.

  27. Thomas Larsson repo owner

    No, switching between the two ways of doing ERC morphs is not possible, at least not for the same morphs. Different morphs can probably be loaded with different settings, but I haven’t tried that.

    What you perhaps could do is to keep different versions of the character in separate blend files, and link or append them into the scene when needed.

  28. Maneki

    Would it be possible to uncheck poseable bones as standard, when the ERC Translation option is activated in global settings? Or even deactivate the option when you can’t use both together.

  29. Thomas Larsson repo owner

    The Make All Bones Posable option has been removed from the easy import settings when the ERC method = Translation. If you for some reason want to do that anyway, use the button in the Finishing panel.

  30. Log in to comment