adding morphs after geografts

Issue #627 closed
Alessandro Padovani created an issue

This is just an idea that may help to better deal with geografts.

Instead of merging geografts, thus removing geometry, it should be possible to just hide the graft area with an invisible material, then copy the normals from the graft borders to the geograft to hide the connection seam. I also suspect this is what daz studio does.

This way the geometries are not changed and it should be possible to load morphs anytime.

Comments (18)

  1. engetudouiti

    I tried it long time ago, but Even though you do not import any morphs, When you set sub-D, you can not controll 2 separated items border verts position.

    We need to keep grafted items mesh then the border can not fit geometry of the body mesh border any more.

    if we export with sub-D applied, if you change sub-D setting, usually it not fit any more. so you get seam usually. anyway you may test and show render with change sub-D as high quarity.

    though I think there may be way to force graft items edge verts always keep the body mesh edge verts location, but I can not imagine easy way without add new modifier or script anytime when user change sub-D correct it.

    At same time if without merge or remove geometry but try shader work with normal adjustment option may be useful for test . If it work, it should make things more easy.

  2. Alessandro Padovani reporter

    Didn’t think about subd, I agree it’s an issue and have no idea how to deal with it. We may keep the graft border as hard edges of course to match with subd, but this way the connection seam would be visible.

    I’ll keep this one open for a while just to see if someone else may have a good idea.

  3. engetudouiti

    I suppose DS generate merged mesh only when we fit graft items to body mesh.

    Then while the Graft item fit to, another mesh, it work as one mesh. (so we only need to set sub-D for body, then graft items auto change without we change the graft item sub-D) then I suppose connected edges(verts) 2 verts (which we need to set in daz studio) actually merged and replace as one vertex. + hide coverted faces which duplicated.

    with geometry editor on, or un fit graft items , it return mesh as separated. so we need to set same sub-D for daz importer. (it return each mesh as default mesh)

  4. engetudouiti

    Then one option ease the sub-D difference, is

    use keep corners for graft items sub-D setting, but do not know it correctly show sub-D as same as daz. but basically sub-D corner should be the graft connected edges.

    without keep corners it should show such broken part

    at current I use mask modifer only (so no adjustment normal etc for edges) may test later with real figure.

  5. engetudouiti

    No unfortunatelly it only work when body is such 2d plane ^^; with thick volume (round), body sub-D not locate the same place with graft items (with keep corner)

    so it actually not useful (so need to find another way)

  6. Xin

    I’m trying to write a script to generate a “translation table” to translate original vertex orders to merged vertex orders, which would allow people to import morphs (intended for the original mesh) onto the merged mesh. Such “table” is saved as a .json file and only depends on the type of base mesh and geograft (not the specific morphs they use).

    I will eventually post it as part of the HD morphs addon (which additionally requires a “translation table” for face orders too since dhdm morphs rely on face order, not vertex order).

    If it works, then maybe Thomas could do something similar.

  7. engetudouiti

    Thanks Xin, but I still afraid, even though you actually locate same place. with sub-D they may change position (auto smooth work so).

    but I hope it work without problem.

  8. engetudouiti

    Ah,, Yes if you change vertex order, of merged mesh, we may not need to keep default mesh any more. I suppose it may work (expect so)

  9. Xin

    The sub-d is only performed after the shape keys on the base mesh, so if you can correctly translate vertex orders from original mesh to merged mesh (what I mean here is the mesh which import_daz gives after merging geografts), then there should be no problems.

    For .dhdm morphs, subdivision has to be performed externally as usual to account for HD morphs, and in that case you also need face order translation, but it should still work the same.

  10. Xin

    Basically, .dsf files describe the original vertex order to perform the deltas, but you can translate the original vertex order to the new vertex order in the merged mesh, before finally applying the delta.

    For .dhdms the same but with face orders.

  11. Xin

    As for vertex counts, yes, that has to be accounted for in the script if you are using a “translation” file for a merged mesh.

    In fact, each original mesh component (body and geograft), each have a translation entry in the .json . To identify the correct entry for a morph, you look at the vertex count in the morph file, which lets you identify the entry you should use to perform translation.

    For example, a body mesh with a vertex with order 10 might translate to order 450 in the merged mesh. But a geograft mesh with a vertex with order 10 has to be translated to a vertex order other than 450 in the merged mesh.

  12. engetudouiti

    hm I expect if it ease many problem to manage merged rig and character. (I often hope to add new morphs etc after merged)

  13. Xin

    Yes, that seems to be the same, although I’m not sure about the details.

    With the way I’m doing it, you can load morphs on the geograft too, don’t know if what Thomas did is for body only. Also the association is through an external file to avoid storing a lot of data in the mesh (also because the dll needs the information too). This way it can also be reused.

    As for keeping meshes separate, I am not a fan of it due to portability issues. In any case, it would be good as another option so I tried to see if it could work by using creases and such to make subdivision work seamlessly, but it still gives problems.

  14. Thomas Larsson repo owner

    Yes, a translation table between original and merged vertex numbers is stored as a collection property in the mesh. It is only generated when geografts are merged though, so for most meshes it does not consume any space. You can not add any geograft morphs, nor any morphs that affect regions that are covered by the geograft. Those limitations have so far not been a problem for me, though.

  15. engetudouiti

    The good thing if we can keep default meshes data, but show as if they are merged well, we can add free shape keys as we need without change mesh data. Then the shape can be imported as daz morph obj later (with daz morph loader) = convert as daz dsf files and can keep it. . then we can re-import it anytime we need, by add on again. even though I lost the shape key data scene.

    and may be,, I may often hope to swap graft item. (though at current I seldom use complex graft item set, but if it can easy attach, with morphs free, I may often change graft item as same as clothings.

    After all which way will be added, (merged then import all morphs, or keep as separate but show as merged) I appreciate those advance options even though it work with limitation., because even though I keep my custom rule, sometimes I need those option for specific case. usually it happen after generate all morphs, and character. then pray in scene and render and notice I may need to import those morphs or made it for current scene only.

    Though I suppose, I may hope to confrim all options or function which already offered work as stable.

  16. Log in to comment