Morphs with same name

Issue #769 resolved
Miki3d created an issue

Hi there!

I have a problem with the headlights geografts from meipex (breasts props).
The two breasts have morphs named the same way, they work well in daz because they are in different folders, but when I import in blender, I can’t use the morphs separately, since they have the same id.
I tried importing them in separate categories, but when I move one breast slider, the one on the other breast changes too.
I also tried to create two new geografts in daz with different names for morphs, renaming them with an _L and _R suffix on the morph parameters setting (both label and name), but the problem is that the morph id doesn’t change, and if change manually with a text editor, the morph in daz is not visible anymore.
I wonder if a solution could be adding the name of the geograft as a suffix of the imported morphs, or a custom suffix that could be added in the morph import panel.

Thanks 🙂

Comments (21)

  1. Thomas Larsson repo owner

    Import Custom Morphs now has a new option: Unique Morph Names. If enabled, a hex string which depends on the file path is added to the morph name. This should distinquish between morphs with the same name from different files.

    This option breaks connections between morphs defined in different files, so it should only be used if it is really needed. Besides, it also makes the morph names ugly.

  2. Alessandro Padovani

    It is quite unexpected that ids are not unique. I wonder if this is a bug in the specific asset.

    edit. It may be that ids are relative to the armature. So different armatures can have the same id. In this case headlights provides separate armatures for the left and right geografts that we merge together. The separate morphs work fine until we merge the geografts.

  3. Alessandro Padovani

    May be instead of an hex string we may use the same method as for merging rigs. That is, when we merge rigs the two nipple bones are renamed “HeadLight_R:Nipple“ and “HeadLight_L:Nipple“ with the duplicate option. Otherwise the left nipple gets deleted because they get the same bone name “Nipple“. We may do the same with morphs when we merge geografts, so different geografts can keep their own morphs even if they have the same name.

    Then the hex string works fine but looks more like a workaround. I don’t believe this should be optional. We should always keep separated morphs for separated geografts when we merge them, as we do with duplicate bones. I mean the “duplicate“ option should be in merge geografts as it is in merge rigs, not when loading morphs since the separate morphs work fine until we merge geografts.

    Please Thomas let us know what you think.

  4. Miki3d reporter

    Thanks Thomas for the solution, it works!
    True that the morphs gone if you merge the armatures as Alessandro Padonavani said, but I did some tests using easy importer that automatically merges them.
    But now I have another “issue” ^_^'
    Since I use to import animations from Daz, if I save the two headlights shape presets, only the first one is imported.
    This is what I do:

    • DAZ: I save the headlight shapes separately and I export the model with the default headlight shapes

    • Blender: I import the model using easy import, and then I import the geograft morphs into two separate categories

    • I import the shapes via the “import action” panel, but they get imported in the right headlight only

    Maybe a solution could be having a drop down menu in the “import pose/action” panels where you choose the morph category where to apply the imported shapes

    Thanks again for making this tool awesome!
    Miki

  5. Thomas Larsson repo owner

    Alessandro, yes of course it is much better to add the mesh name to morph instead of an anonymous hex string. It should actually work better for morph driving morphs. The mesh name is added after the morph name, since that is normally more interesting. The only problem is the 64-character limit; a long morph name plus a long mesh name will easily exceed that. But that could happen with just morph names.

    Miki, I will look into pose presets later. But I just made unique morph names optional again to avoid this problem if it isn’t necessary.

  6. Miki3d reporter

    Thank you, Thomas!
    As I said before I also tried a workaround in Daz and now it works!
    I renamed all the morphs (name and label) adding the _L and _R suffix in order to have unique names, then I saved the headlights as new props and changed the id manually (for some reason they are not changed when saving morphs).
    Anyway, a feature in diffeomorphic that can handle these particular cases would be nice to have, as a prop maker I try to write very unique names for morphs, but it can happen to have similar morph names in the whole library of Daz props.

    Thanks again,

    Miki

  7. Thomas Larsson repo owner

    The left and right morphs now have different names, but apparently the original name is loaded as an alias, and that is overwritten. I agree that an extra option should be added, but one which selects the original figure rather than a category. A shape preset could affect morphs in several categories, but only a single figure. WIll look into that tomorrow.

  8. Alessandro Padovani

    As for names, to make them short another option would be to add a .001 .999 suffix as blender does when there are duplicates. This way we'd have “Nipple” and “Nipple.001” for example. But this should better be consistent and affect both the bones with “merge rigs“ and the morphs with “merge geografts“.

    Also I’m not sure I made myself clear. I believe the duplicate names may arise both for bones when we merge rigs, and for morphs when we merge geografts. Plus these two are related because most geografts also get rigs. So for example there could be geografts jcms and ercs. We need a way to handle that. Or if it is not possible then document the limitations.

  9. Thomas Larsson repo owner

    In the last commit Load Pose has a new option, where you can select the geograft. For this to work you need to reload the figure, because necessary info is stored in the mesh when geografts are merged.

    This only works for geografts, but I don’t think it is a problem. Things that you might want to merge with the body, e.g. eyelashes, eyebrows, or beards, usually don’t have morphs of their own, at least not with conflicting names. And if they do, just don’t merge them.

  10. Miki3d reporter

    Very nice Thomas! It works good!
    I just got one “bug”, if I save the morphs as favorite morphs and I load them (manually or using easy import) the Headlight_L and Headlight_R reference is lost, and the morphs do not work separately anymore.
    Thanks,

    Miki

  11. Miki3d reporter

    Works fine now! Thank you so much!
    One last thing, I wonder if it would be possible to have the “Unique Morph Names” flag back in the import morphs panel, set as true by default to avoid problems as you said before.
    I know it can sound weird, but sometimes I have multiple copies of the same geograft (the second is not merged, of course) that should be drived by the same morph slider 😅
    Thanks,
    Miki

  12. Alessandro Padovani

    I also agree to get back the option if possible, because the long names are really annoying, though necessary to make things work. About the long names, may we use the morph categories to keep separated morphs ? That is, for example, load the “nipple scale all” morph into “headlight_l” and “headlight_r” categories, that’s one category for each geograft. Instead of having long names on the morphs.

    Just an idea don’t know if this makes sense or it’s doable at all.

  13. Thomas Larsson repo owner

    Unique morph names are now optional again, both for load custom morphs, load favo morphs, and easy import.

  14. Miki3d reporter

    Just tested the morphs import and it works good!
    Also using super short names for the headlights (Like just L and R) helps to not have issues with long names and it’s also very readable.
    Here are the headlights imported using unique names:

    And here are NewGen morphs imported without unique names:

    The only issue I found is that the mixed morphs setup is not supported when importing favorite morphs.
    They must be all unique or not, so the case like I did above doesn’t work, if I want unique names for headlights, NewGen gets them too:

    And as a side note, I also noticed that NewGen names imported with unique names are without the initial part, I guess you are clamping then, right?

    Thanks,
    Miki

  15. Thomas Larsson repo owner

    Renaming the geografts in DS is a neat trick. Will remember that.

    Whether to add a geograft suffix is decided when the morphs are loaded, so that info is not stored in the favo morph file. Therefore it is not possible to mix suffix and no suffix in easy import, although I agree that it would be useful. But easy import is designed to facilitate import in the most common cases. If you want to do something nonstandard you can always do the various steps manually instead.

    The missing initial part was a bug. Should be fixed now.

  16. Alessandro Padovani

    Of course we can also rename in blender, before importing the morphs. This leaves the daz scene unchanged.

  17. Miki3d reporter

    Using manual steps works fine.
    I saved a fav preset for headlights and I use unique names when loading, same thing for the newgen morphs but without unique names:

    I also confirm that the initial part bug is fixed.
    Thanks 🙂

  18. Log in to comment