Shell color lost

Issue #249 resolved
Mesus created an issue

Hi, can you help me figure out how to import and apply genitalia shells correctly ? i never get the pinkish color of the shell no matter what. I tried with golden palace, new genitalia for victoria8 and also dicktator

Comments (29)

  1. Alessandro Padovani

    Everything seems to work fine here. Do you mean you don’t know how to do it in daz studio ?

  2. Thomas Larsson repo owner

    The geometry shell in DS corresponds to a node group in the genitals material in Blender. It should be present just before the output in the node tree. Is it there?

  3. Alessandro Padovani

    Please don’t upload blender files since this violates the daz eula. Just duf files for testing are fine. Below is golden palace in my viewport it works fine. The rendering is fine too. Tested both the bsdf and principled options with both cycles and eevee. Plugin commit f622444 with blender 2.90.1. Test scene included.

    Please state your specs. May be you’re using an old version of the plugin or a beta version of blender.

  4. Mesus reporter

    still not working even with your file i’m using last commit of the plugin blender 2.91 beta, daz 4.12.1 beta windows 8.1 . i tried with the 2.90 version still the same thing

    the nodes on the genitals for your gold file

  5. Alessandro Padovani

    From your pictures it seems the shells are not generated. No idea why. I see strange names in your materials list though, what’s 2254 ? Below it is what I get in my shader editor after merging materials. That’s the gold.duf.

    edit. For some strange reason I have to save and reload the scene two times before the unused materials get flushed. In the image below the shell has two users after merging materials that’s fine for rectum and torso.

  6. Thomas Larsson repo owner

    2254 is the number of vertices in GoldenPalace. Not sure why it appears in the node group name, though, here is doesn’t.

    Mesus seems to be using a very recent version from today, where the material name is added to the name of the shell. Recently when I actually started to use the plugin, I immediately ran into problems with competing geometry shells, and this has triggered some changes. With a single shell there should not be any problems, though.

  7. Alessandro Padovani

    Thomas, as for commit 02ff059 it seems merge materials doesn’t work anymore for shells. I mean in commit f622444 after merging I get rectum and torso as shown above that’s fine. While in commit 02ff059 it seems merge have no effect on shell materials. It merges fine the G8F materials though.

    Apart merging not working the shell materials are fine though, and no strange names here.

    Steps:

    1. import gold.duf
    2. merge the golden palace materials

    edit. Also, would you please explain what do you mean by competing shells and may be do an example ? If you mean multiple geografts on the same figure then the visibility is to be fixed to allow the shell to be shared in daz studio. This is done for example with the fix tool by Meipe. Then to mix other geografts the fix is to be done by hand, for example the realistic nipples in #70. I mean if we don’t do this then we get artifacts in blender as well as in daz studio itself.

  8. Thomas Larsson repo owner

    No problems with merging materials here, except that the small preview icon is missing. Renders are ok, though. The new thing is that the material name has been added to the node group name.

    As for the competing shells, I have a problem when I add several geoshells (more precisely, genitals and blood) to the same character. The problem already arises in DS, but I am much more confortable to deal with it in Blender.

  9. Alessandro Padovani

    Thomas, as for merging materials I see in your picture that the geograft materials are not merged. After merging only GP_Torso-1 and GP_Rectum-1 should be there. While you have all the materials. This is the issue I was pointing out. Then I agree that the materials work fine.

    I have no missing previews. The preview may be delayed if the cpu is slow.

    As for competing shells I’m not sure I get what you did. If the plugin automatically fixes the visibility without the need to fix it in daz studio first, then I believe this should be documented. Also personally I don’t like it since an importer is not supposed to alter anything. If the issue is there in daz studio it should be there in blender too.

    If I understand what you mean that may not be so. May be an example with some pictures will make it clear if you don’t mind.

    edit. As for the shell name in daz studio it is GoldenPalace_Shell and we have one single shell for the geograft. So I’m not sure I understand why you need to add multiple shell names in blender. In commit f622444 both the shell name and merge materials were fine.

    For example in daz studio if we use both golden palace and headlight by Meipe then we get two shells and we need to run the shell fix tool by Meipe to fix the visibility. So just two shell names are needed. But all of this was working fine already there’s no need to fix anything. Again if I understand correctly what you mean.

  10. Alessandro Padovani

    Also I see an option in the global panel to merge shells. I found no docs on this but I suppose if unchecked it should import the shell geometry. If my guess is correct then there’s a bug because the shell offset is ignored so the shell geometry is not imported fine.

    Below an example with the headlight geograft by Meipe where I changed the shell offset to 0.5 cm. We can see the shell offset in daz studio but we don’t get it in blender with the merge option unchecked. Test scene included gold-2.duf where there’s golden palace + headlights.

  11. Thomas Larsson repo owner

    Alessandro, in DS a shell is an empty mesh which holds material info, and thus it can never render in Blender. The Merge Shells option is only for debugging so I can view the materials as normal materials rather than node groups. You will notice that the shell mesh doesn’t have any vertices.

    The push modifier (offset distance) is currently ignored. Often it is used to keep clothes above skin, but we have better options for that in Blender. It is not so clear how to use it for shell which is only materials. Perhaps it could be translated into a displacement node.

    Adding the material names to the node group is useful in the following situation. I have an asset which adds blood to face, torso, arms and legs. It is one shell but four distinct node groups, since the textures are different. Combining this asset with genitals causes problems already in DS, at least for me.

  12. engetudouiti

    Thomas

    actually we can export shell as obj. (I do not test with collada etc, but maybe it can export I suppose as real object (with mesh)

    But it is static. (so to work as same as daz shell I need to transfer weight etc, as same as other clothing.

    I notice Thomas do unique aploach (mimic it only with material and shader nodes)

    at same time I feel, to represent shell thickness as same as daz , you may need to duplicate actor mesh, then add thickness (expand with normal) then hide or cut un-necessary part, with keep custom scale.

    then it will conver real mesh, and may follow morphed shape (which need to transfer from original mesh)

  13. engetudouiti

    And actually ds almost do same thing. only difference is it seems instance. but can apply different UV individually, (but can not change material group and vertex group. it simply copy source mesh data)

    if duplicate mesh not bother user, actually it can do more than daz shell.

    because duplicated mesh can apply individual surface group, and vert group as same as original (souce) and can apply material as we need. only difficulity is I suppose we need to use edit-mode, to change shell thick ness. (and need to expand as normal direction. not can do it by simply scale all verts as gloval)

  14. engetudouiti

    Then I found (but please do not try it seriously) way to reproduce shell.

    1. duplicate mesh (actor etc)
    2. . apply displacement modifier, then set parameter.

    3 so, this mesh can use as shell mesh. with change thickness

    I do not test, displacement modifier may work with normal map etc (because we already have displacement shader , so I seldom use it, only I need to make strange groupd etc, but basically it work.

    (though save data should be huge)

    4 in ds we can hide unnecessary part, so I add mask modifier, then may recreate group which I hide in ds

    (or vendor product, eg like sweat shell etc, it usually mix use with cut-out opacity map, and you see sweat with real small thickness with bump and normal to create realistic sweat etc (but it not show so clean mat I feel)

  15. Alessandro Padovani

    Thomas, thank you for nice the explanation, now I understand what’s the plugin idea. Just a couple of points though.

    1 shells. It is not exact that a shell in daz studio is an empty mesh, it is actually an instance of the object mesh, that also has a displacement. As shown in the headlight example we can use a shell in daz studio as an extra geometry layer, that is not possible to import with the plugin.

    Then I do understand that it is better in most cases to import the shell as an extra material layer without geometry as the plugin actually does. I do like it and it is clean and optimized for animation. Nevertheless, to have an option to import the actual shell geometry, may be nice for special shell effects. So the merge shell option could be used for this.

    2 merge materials. As explained above that doesn’t work anymore for shells. I have it working in commit f622444.

    3 blood. Could you please link the blood asset you’re using so may be I can do some tests and understand what’s wrong ?

  16. Thomas Larsson repo owner

    Alessandro, blood is included in this asset: https://www.daz3d.com/sy-a-big-mess-for-genesis-8.

    Geoshells always seem to have zero verts in the duf file. If you decode it, you find lines like this in the geometry library:

                "id" : "geometry",
                "name" : "geometry",
                "type" : "polygon_mesh",
                "vertices" : {
                    "count" : 0,
                    "values" : [
                    ]
                },
    

    which clearly describes an empty mesh. However, I just noted that the shell meshes are not empty in the dbz file. In gold.dbz, meshes have the following number of vertices:

     Mesh                   # vertices
     Genesis8Female              16556
     Genesis8FemaleEyelashes       464
     HeadLight_R_608               608
     HeadLight_L_608               608
     GoldenPalace_2254            2254
     All Shells                  20026
    

    We note that the number of vertices in G8F + all geoshells geografts (but not the lashes) = 20026. So the export script finds the body with all geografts added. This is useless, however, since we don’t have the face info for the merged mesh, and we don’t want to import a big extra mesh in Blender anyway. I will try to remove the shells from the export script.

  17. Thomas Larsson repo owner

    OK, figured out how to do it. Now the export scripts don’t export shells. On my test character (who is quite extreme, nude body + geografts + several shells) the size of the dbz file went from 2551 kB to 530 kB.

  18. Thomas Larsson repo owner

    If you really want it, you should be able to export the shell geometry with the HD exporter, if you turn down the subd level to zero. The HD mesh contains the faces and uvs needed to build it in Blender.

  19. Alessandro Padovani

    @Mesus I believe I got it. If you have merge shells unchecked in the global options then the shell material is not generated. Please be sure to have it checked. As Thomas explained that is a debug option so having it unchecked does not make sense for us users. From your first picture it is visible that you have the GoldenPalace_Shell empty mesh so this is your issue.

  20. Alessandro Padovani

    Thomas, as for the shell offset I believe the idea by @engetudouiti in #254 is good so I’ll contribute there. I agree that it makes no sense to export shells in the dbz. This will make the export process much slower especially for HD meshes and it is not needed. I’m not sure how the latest commits are supposed to export a shell with an offset. I tried the HD exporter with no luck.

    The idea in #254 works both for base and HD meshes, and without the need to export anything in the dbz, so please give it a look.

    edit. As for commit a2b83a6 merge materials stills not working for shells as explained above.

  21. Thomas Larsson repo owner

    Alessandro, I read merge geografts when you wrote merge materials, and could’t figure out what was wrong about it. Merge materials should work now.

  22. Alessandro Padovani

    I can confirm that commit a835aa0 works fine as for merging materials. May be we can mark as resolved this one and eventually improve shells with #254.

  23. Log in to comment