Geografts mesh position mismatch

Issue #1556 duplicate
Rosen S.P. created an issue

Merging geografts produces a mismatch around the geograft’s area/border, once merged usually appears as a depression where the geograft and the base model meet. On 0 subdivision is difficult to notice if you don’t pay attention to the zone, but at higher subdivisions is very evident.

I tried many settings and ways to export and import the characters, tried many combinations of options, meshes and possible workarounds, at the end making zero difference at all, the results are always the same.

To me it seems the geografts are imported into blender at “Base“ resolution and kept that way after the import is done, as they are usually “Over“ the mesh, specially the edges of it, which is very noticeable when using heavily morphed characters, and less noticeable when moving closer to the default model, but even at base/zeroed character the problem is exactly the same, just the geograft hovers at a closer distance to the body mesh, but once merged the end result is still quite noticeable.

Blender: 3.5
DazStudio: 4.21.0.5
Diffeomorphic: 1.7 release (i tried master branch too)

Comments (16)

  1. Alessandro Padovani

    daz studio 4.21.0.5, blender 3.5.1, diffeomorphic 1.7.1.1571

    https://www.daz3d.com/victoria-8-hd-add-on

    https://www.renderotica.com/store/sku/57579_Headlights-For-Genesis-8-Female

    Tested with Victoria 8 HD + Headlights and everything works fine here. Please do the same steps and let me know if it works for you.

    steps:

    1. in daz studio load Victoria 8 HD + Headlights
    2. set the viewport subdivision for Victoria 8 to 3 then set Headlights to base resolution
    3. enter the geometry editor then export HD to blender
    4. exit the geometry editor then save the scene
    5. in blender import as dbz then merge rigs then merge geografts

    Be sure that in the global settings you have both HD and multires enabled.

    WHAT HAPPENS.

    Then here is in details what happens. Most geografts including headlights are not HD, in that they don’t provide dhdm files aka HD information. In this case the geograft will be conformed to the figure resolution in daz studio, so it can be at base resolution. We have to enter the geometry editor to export the figure and geografts separately so they can be merged back in blender. When we enter the geometry editor we see the gap between the figure and the geograft that’s exported to blender.

    Back in blender we get the same gap as exported by daz studio. But this will be fixed by multires when we merge the geografts, that’s the same that daz studio does when we exit the geometry editor.

    Specifically, the geograft border that’s the graft area, is smoothed at multires base resolution, so it blends in nicely.

  2. Alessandro Padovani

    note. True HD. If you use true HD, meaning you don’t use multires, then multires can’t correct the gap and you get the seam when you merge. That’s probably what’s happening to you. You need to use multires, since true HD has issues with geografts, both for the geometry and the uv map if you export the geograft as HD too. True HD is only good without geografts. This is a known limitation.

  3. Rosen S.P. reporter

    Sorry if i’m not understanding your answer, but is your post with the steps and the “WHAT HAPPENS“ the “way i should do it” and the “result of doing it like that“, or “the way i should do it“ and “what happens otherwise if i don’t do it like that“, or both are the steps of “how to reproduce the problem”?

    Because i’m confused, those are the steps i usually use to do the process, and i tried many more with the same result(yes i even tested it again using your exact steps). The only thing that i think might be happening is that you consider the images you posted below the “WHAT HAPPENS“ a success… which it isn’t, if you look closely, on the edge there is a depression that should not exist, in that specific case where the graft meets the body at an angle might be confusing to you, as it looks as an protruded areola and not a depression so it doesn’t look off, but that doesn’t look good at all when the geograft’s surface is parallel to the main model’s surface.

    About the “True HD”, i never tried to export and import that, i always have been using “Multires“ since it’s implementation, and as you can see in my first image “00_G9_Wireframe_Comparison“, the model has the multires modifier.

    Edit: I tried playing with the “Smooth“ modifier and found that upping the “Repeat“ count makes the problem less noticeable, but to level the edges of my grafts close to the surface of the main model i had yo use a values over “150“ to make it not noticeable to the eye, which i don’t think is optimal, and when looking it at an angle there is still a romanent of the depression, which might be considered a “work around” for some grafts till there is a better solution, but i really hope we can find a better way.

  4. Alessandro Padovani

    Yes that is how you should do it and it works fine here for any geograft I tested so far. For example golden palace doesn’t come “at an angle“ and doesn’t get seams. If there’s a specific geograft that doesn’t work with a specific figure we may test that and eventually try to improve the actual method. If Thomas agrees.

    Feel free to contribute if you have ideas.

  5. Rosen S.P. reporter

    I will go and try all the geografts i can find, and test more G8 ones, because the only one prior to G9 i tried was the one in the screenshot i uploaded in the main post, and i did it just to confirm it was not a G9 specific. So i will check if it’s more of a G9 problem or geograft specific or what, but till now all grafts i tested for G9 present the problem(which are not many, 3 or 4, but still is a weird coincidence). In some is more acute, on others is milder, but at the end the result is the same… :/ will update when done.

  6. Rosen S.P. reporter

    Well, i did quite a broad testing, and the seams appear in each and every geograft’s border after merging, it’s just that the “Smooth“ modifier masks very well the problem in some cases and “well enough” in some others (more so when the character is already smooth on the affected zone), which makes sense, as it was put there for this exact reason, but as any workaround, it doesn’t work well in every case, and actually if you know what are you looking for, even in the best cases you can still see it… it’s like that saying “once you see it, you can’t unsee it“…

    As far as i could understand it, the main problem is that, as you said previously “Most geografts … are not HD, … they don’t provide dhdm files aka HD information.“, which if i understand it correctly, means the multires replicates the “HD model“ of the specific SubD of the model applying the HD info present in the files stored in the content folder of the morphs used, but because the geografts are conforming, they don’t have those files in the folder, so when at base resolution(or SubD=0) they match, but when the multires is higher than 0, the vertices corresponding to the base model move to their corresponding “HD“ position, but as the geograft is not mapped in that “HD morph/blendshape/shape“ of the multires of that level, it’s vertices do not move, and there appears the mismatch we see, which is partially masked by the smoothing of the surrounding area of the graft where both pieces connects…

    I don’t know how all this “mumbo jumbo magic” works internally (neither Daz’s exporter nor Blender’s importer plugins), and maybe my question might seem basic or already researched, but either way i will try;
    We already have the HD model of the geografts inside the scene in DS, is there a reason for using the “not HD conformed” version at export time? I know that exporting an OBJ or FBX exports the model as it appears in the viewport, with all the details and stuff. With the FBX you even have the duplicates of the geografts aparat from the already merged ones into the base model, only problem with that is that the rigging is broken in the FBX and completely missing in the OBJ, but the model has all the details, we don’t need the rigging, just the vertex data, so there must be a way to transfer the vertex positions and create highest HD version of the geografts too, then just decimate to recreate lower HD versions…

    IDK how that might be done and apology for not giving something more specific, but i’m not a pro neither in blender nor daz…

  7. Rosen S.P. reporter

    I dug some more into all this “HD stuff“, the “dhdm” files are just “tangent-space displacement maps”, if those are like “normal displacement maps” with an extra dimension(like the brushes of zbrush or the new blender brushes), that means that they work in UV space, and don’t contain “specific vertex info”, which makes sense actually. So if my understanding of the matter is correct, all the geografts that matters CAN use that “tangent-space displacement maps” too, even if it’s not made for them specifically, because if it’s part of the body, it already occupies the same UV space as the hidden part that is supposed to replace, because if it were not, the normal textures would not work. So, if we apply the dhdm files that are applied to the body to the geografts too, we would not need to use the “Smooth“ operation and the model will not be distorted!

    The only problem i see here is that all geografts i have seen occupy the U0V0, while the different parts of the body occupy different cells, which i think is already dealt with inside blender with the “Fix UV Tiles“ inside the “Merge Geografts“ modal when you click it if i’m not mistaken, so that problem is not a problem.

  8. Alessandro Padovani

    Well I have to admit I’m not a fan of HD figures so generally I tend to avoid them as well as G9 that's HD by default. So I didn’t test HD or G9 extensively and never G9 geografts. On a quick test with G9 I see you’re right, that is, there are seams. Fact is, the same seams are in daz studio itself, you can see them in the smooth shaded viewport, setting the viewport subdivision to HD. It’s less visible in render because of the textures and sss. So as you say “once you see it, you can’t unsee it“.

    Below an example with Victoria 9 HD and the free STX nipples and navel.

    https://www.renderotica.com/store/sku/66761_STX-Nipples-And-Navel-For-Genesis-9

    My understanding of this effect is that, when you add a non-HD geograft to a HD figure, you have no HD details on the geograft so this becomes visible especially on the borders. Think of two meshes one with a normal map and one without it’s the same. Since this artifact comes directly from daz studio and specifically because of how the geograft is designed, I believe the importer does its work.

    You can try to minimize the issue by playing with the smooth modifier. Then again if someone has ideas is welcome to contribute. Personally I believe the smooth modifier is a good approximation. We can also wait for a reply by @Thomas Larsson if he can do something.

  9. Thomas Larsson repo owner

    Alessandros explanation sounds plausible to me. But I don’t really use G9 either so I haven’t had any problems with this. You need to use the multires version of the HD mesh if you have geografts, because there is an error if you try to merge the geograft to a true HD mesh due to vertex number mismatch. The geograft knows about the number of vertices of the mesh that it want to merge to, and a true HD mesh has too many vertices.

  10. Rosen S.P. reporter

    As i have explained, it’s not a G9 specific, and I understand why you might have skipped the big wall of text above so i will try to TL;DR

    Problem exists for all geografts, true hd not the problem, all tests made with multires.

    Reason: Geografts don’t have “tangent-space displacement maps”, main body displaces on multires higher than 0 mimicking Daz HD system, geografts dosn’t. You tried to fix it with the “Smooth“ modifier for the edges of the geograft, the trick does it’s job well most of the times on G8 and down, not so much on G9, and it doesn’t work for geografts that are not perfectly(or at least very well) aligned to the surface already, and/or are in problematic zones.

    Possible solution: Try to apply the “tangent-space displacement maps” from the body to the geografts and remove the “Smooth“ modifier.

  11. Alessandro Padovani

    You miss to understand that the same issue is in daz studio as explained above. Your possible solution doesn’t seem possible to me.

  12. Rosen S.P. reporter

    Yea, that sucks, i did not have seen it by myself till i just did some specific tests and saw that the HD morphs don’t apply to geografts in daz AT ALL, did the tests with the “Vascularity HD for Genesis 9” product and yea… it looked horrendous… and i did read you when you said it in one of your previous posts and had that in mind when wrote my post, but until i just tested it i have not realized that it was completely broken feature inside daz to begin with, like literally, how is daz pushing modularity with geografts with the new figure as one of it’s main features when it’s not even completely functional? it’s not like they did not have the time, resources or the technology to make it work in all those years…

    Anyways i still think it can be done in blender by projecting the “dhdm” to the geografts, even if they don’t do it inside daz, but i might have misunderstood the way Thomas is generating the multires with the blender importer plugin, i thought he was using some “magic“ searching the files from the library path to find the “dhdm“ maps and generating the different LOD inside daz with values about the used morphs stored in the “dbz” file that his Daz plugin generates, but i think he is doing it in reverse, he is generating everything from the “Highest poly” model exported from daz down to the “Base“ and then using that generated “low poly base” as the main model and then the rest of the generated models and the highest poly model as multires data sources, so it might take more time than i thought and might be not worth, even if it IS indeed possible, the data is there, daz is just not using it…

    idk, maybe i should just forget it and move on… thanks anyway for your time.

  13. Alessandro Padovani

    There’s no magic, Thomas is using the unsubdivide feature of multires to get the base mesh. Then in blender multires doesn’t support HD morphs you can only use base resolution morphs. As for projecting the HD map to the geograft this is not possible in the general case. If the geograft somewhat conforms closely to the figure then projection may have sense, otherwise it will fail, think of futalicious for example.

    You can however use base resolution figures and bake the HD details to normal maps, that’s the recommended workflow for animation. Though multires works fine enough in my opinion, the seams are not so visible in render, you may need to adjust the smoothing depending on the case, or just sculpt a little if you really need to.

    https://bitbucket.org/Diffeomorphic/import_daz/wiki/Advanced/HD Meshes

  14. Rosen S.P. reporter

    Yea, as i have already explained in me previous post i already have figured out that by myself, the process is relatively simple, no need more clarifications.

    About the projection, there is many ways to project details, and sometimes the “issue“ you are talking about “failing when not close to the surface“ is more like something desirable than actually a problem, i would not want to bake per example a vein that goes across the crouch/breast all over the entire penis/nipple, but only to the part that is closer to the skin itself, same would go for tails, spikes, horns, wings etc.. you would want the detail baked over the contact zone with the main body, not the entire geograft.

    About the last part, i have not noticed the “HDMesh“'s options before, but as i can see from the link, Thomas already knows about the work of Xin, who is working in a plugin to export/import those HD maps from/to Daz Studio, i might take a look and check if i can integrate them somehow to fix the problem or at least transfer HD details to the geografts and fix the problem by other means.

    BTW, un-subdividing the “merged with geografts True HD model” with the multires is a viable solution to fix the problem in many cases, very easy to implement and has exactly the same drawbacks as merging geografts with the current system after the import process, but with the benefit that this would fix the border issue(which is the main problem), and i know that this can’t be done with ALL geografts, some have very messy topology, but MANY have perfect topology, so would be nice to have that option at import time, because right now, the plugin appears to just check if the HD model has some specific polycount, and if not just throws a message Could not rebuild subdivisions for the following HD objects:, i’m pretty sure because i tried the exact same model imported as FBX and OBJ and both un-subdivide perfectly fine with multires…

    I don’t know if i should submit this last part as a separate issue categorized as “proposal” and close this “bug report“ so doesn’t clutter the track record…

  15. Log in to comment