mimic daz geometry shell items

Issue #254 closed
engetudouiti created an issue

1 duplicate mesh after import morph etc only where you need to make shell.

2 basically it still keep morph and armature modifer weighted map for verts

3. rename it as shell

4. add displacement modifier, without any texture but adjust parameter. (test yourself please) then make thickness as you need

5. add mask modifier then limit visible part as same as daz geometry shell.

( you can make it as you like, ds shell only offer visible part by surface group or face group (node base), mask modifier can apply as you like with custom vertex group

6. then you can use the mesh as shell, with apply new texture change material etc.
(you can free change material slot (daz surface group) because it perfectly different mesh)

it is only mini tutorial if someone try to mimic more perfectly daz shell.

(of course it need huge data, because duplicated mesh is not instance, and it need different material, but work as same as DS (can adjust thicknes, and can set different UV etc etc, and can edit more, if you need,, but follow pose, and basically do samething (so follow morphed shape, at least untill it keep same morph and controller of original mesh)

The above way use copy and duplicate mesh data. (so data become double) but we can use same mesh (link mesh data) for shell too.

To work it, we need to change material link with Object. as default blender link material with Object Data (mesh) then if you link mesh for shell , shell and object use same material .

Then we need to set material of each slot to link with Object , then we can apply different material for shell (which link duplicate original mesh) , and can apply Displace modifier Mask modifier separately for each shell. (each shell can adjust the off-set, and mask part, as same as daz studio)

Comments (42)

  1. Alessandro Padovani

    May be we can use shrinkwrap, that also has an offset option, to avoid duplicating the weightmaps and morphs on the shell geometry. See #226. Then I’m not sure we can’t use a geometry instance in blender I’ll need to do some tests.

  2. Mesus

    A shell in daz is just a material container no ? Why not just mix the materials of the shell and the concerned area with a mix node ? We ca use the base geometry to do the uv mapping for both materials no?

  3. engetudouiti reporter

    Do not think much, but I think you may not need to use shiwrink wrap, because geometry shell not shwrink wrap, but only have thickness (you may adjust it as almost zero. but some case you may need to adjust thickness (eg shell underwear) then shell do not use smooth modifier.

    I have never tried it in ds so if shell can use smooth modifier separately, it is interesting for me.

    the above pic only show, the thickness as we can see. but the Displace (not shader, but modifier) actually do same as shell ds thickness parameter.

    Then @Mesus

    Yes you can think so. it is insatnce mesh which follow original morph and pose etc.. unfortunately I can not find same tool for blender, which can change thickness for mesh instance, and apply different materials , with original mesh.

    But blender can apply material for Object too. If we do not need to adjust thickness for normal poligon direction (use zero) I suppose I can set same mesh but can apply different material for shell obj. but it need to change default setting . (attach material for object not mesh data)

    But I do not remember well, mesh instance can apply different UV set or not.

    If there is more better way, (to reproduce it in blender), I hope to learn.

    (I think some one can make it as add on,, generate daz geometry shell, with all functions = adjust thickness, hide part with node and material group, can add different UV, as mesh data instance. though maybe most of blender user do not know why it need at all ^^;)

    Then I found we can use surface modifier for shell, to better follow original mesh move without armature modifier,. when the shell already cut out and need to follow grafuted item merged vertices location,,

    but I do not check if it follow the shape key morph. and maybe,, grafted item shell may show issue, for merged parts (do not know shell can follow well or not.. because my procedure is not instance,, it need different mesh)

  4. engetudouiti reporter

    Then blender offer solid fy modifer, it can add double face without rim (option) and it can apply different material for base and new added (front or back) faces. but to use it, all material for new mesh need to be attached first for the original. (without assgin face group) then do not think, new added mesh (as modifier), can use different UV set or not.

    and I suppose it may cause normal issue.. because solid fy modifier not offer option, to adjust normal separately.. (flip all or return) it is not supposed to use as shell.. then back and front may face opositte normal. I think.

  5. engetudouiti reporter

    I could almost same thing with use same mesh data. (soft duplicate)

    because displacement modifer can be attached for object. so can use same mesh data (Linked data), but apply the modifier only for the shell object.

    To use different material I needed to change material setting from Object data to object. for shell .(needed to duplicate, then change one by one,,) then we can apply different mat for each material-slot.

    then can set different UV for each material (I do not test many, but basically it work)

    I hoped to test with mask modifier,(if it can only hide shell ) but when I try it ,blender shut down. then did not know how it will work.

    Yes it worked. Only annoying part is, with cycles view change material (data to object) etc,, blender often shut down. but all modifer work separately..

    So use duplicated link mesh + mask (hide with face . node group) + displacement (adjust thickness) + set mateiral to Object. can do almost same thing, what daz do.

    (of course, only use shader node as layer work for you, it is good . no need to try it. both way have pro and con. )

  6. Alessandro Padovani

    @engetudouiti That seems to work great. The idea I was going to test is similar but with shrinkwrap instead of displacement. I agree that displacement is better in this case. I’m not sure I understand your mask part. If we duplicate the geograft then apply the shell material it already has the transparency map. Below the result I got with the headlight geograft.

    Please note that for displacement to work fine we have to use a zero midlevel. Also please note that the geometry is linked so it’s not duplicated, nevertheless the scene statistics will show the added faces when we duplicate linked the geograft. So I’m not sure if this is a real instance or just a shortcut in the scene description. Nevertheless the idea works great. Personally I believe this should be an option though. Since the actual plugin implementation for shells as an extra material layer is very good and great to optimize the figure for animation in most cases.

    Please Thomas let us know what you think.

  7. engetudouiti reporter

    @Alessandro

    Yes maybe I need not hide poligons first with mask modifier,

    but I tried to the shell work as same as daz manner. though I do not know how many assets actually use it, but daz shell can limit surface (or face) as hidden, untill set material. maybe it can reduce render time etc, I feel. eg if I make full merge shell, I may first limit the shell with mask modifier. (in daz we can on and off with mat group and vertex group, then after limit visible part, we may apply map only for the visible material group .

    I think, shwrink wrap can mix use if it need. (Though I still did not test with shell)

    The trouble part seems apply material for shell which need to change material setting for each (gloval not work, after we import scene, I suppose, a long time ago, I asked thomas if there is option, to import material with link object (to make material library easy with duplicate instance mesh attached) but it is not so improtant, then I forget the request.

    But to work this shell (mesh instance), we need to set material link with Object. or both (oriiginal and instance) keep show same material. blender, if I change material from data to object, it temporally remove. so I need to set all again. just for the purpose I make script, to exchange all material of mesh. after that, duplicate and edit them in shell.

    Then I am not real shell user, so I do not request it . When I see thomas way,, I just hoped to make geometry shell in blender, as same as daz as twekable mesh.

  8. Thomas Larsson repo owner

    Usually you eventually want to merge the geograft to the mesh; otherwise there is not reason why it is not just another mesh. You need to apply the displace modifier before merging, because otherwise it is lost.

  9. Alessandro Padovani

    Yes agreed. Below it’s after merging geografts with the shell that retains the original HeadLight_L geometry.

  10. engetudouiti reporter

    Though I have a few idea about grafted + shell item, but actualy I do not have those shell grafted item, then I can not confirm if it will work for others. this topic is just mimic daz shell in blender as same as daz way.

    why I use mask modifier, it mimic this sweat product for g3

    My shell daz products are sweat and blood (though I do not think it should offer better result than shader work or iray decal, but anyway I have such shell products, which use shell for sweat or some blood and wound print. and there were a few shell under-wear. (though seldom use it)

    and I had experienced, adjust the shell thichness offer more better result with render. or see some strange shadow with transmissive material.

    As for me, even though it is not useful for daz item import, I have some idea to use for my render. But I do not push this as request because I do not know when use merged grafted item, how shell part may work.

  11. Alessandro Padovani

    @engetudouiti Yes setting the visibility is also common when using multiple geografts and it is what the fix tool by Meipe does for headlights and golden palace for example. The plugin already handles correctly the shell visibility when importing shells.

    Thomas, the issue with blood is that it is not supposed to work with geografts. That is, the blood shell works with the G8F geometry and uv map. Once we add a geograft that is excluded from the blood shell because the geometry and uv map changes. For what I know the best you can do is to set the shell visibility as it's common when using multiple geografts.

    Below an example of blood + headlights where I set the blood visibility to exclude headlights so they can work together. But the headlight geograft can't get the blood shell. Setting the visibility works fine both in daz studio and blender when we import the asset.

    It is not clear to me if/how do you want to improve this.

  12. engetudouiti reporter

    I had not tried the shader aploach of plug in, but I think (if I do not use shader ) after all grafted item will be merged in plug in.

    If so I simply use the mreged mesh linked copy, for each assets. with mask modifier, and adjust thickness.

    merged_actor + shell1 + shell 2 … each shell is duplicated insance mesh. then have same material slots.

    but can apply different mat with adjust thickness and visible part. so it not remove other-grated item surface. they use same geometry then can visible. with control. But after all I think I need to adjust each material carefully with check original.

    So if current plug in offer almost of them, I may prefer to use it.

    maybe only about full shell (like sweat or tatoo etc), I add later manually.

  13. Alessandro Padovani

    Thomas, on a first view I really can’t understand how the plugin gets to do it, it seems magic to me right now. I mean the geograft has a different geometry and uv map, how do you get to map the blood over it, without bad distortions ? Going to study your new update ..

    edit. Please @engetudouiti if you can leave this open, since the shell geometry is not implemented so I don’t see why closing this one. It may be a useful discussion to anyone interested. I mean duplicate linked + displacement is a good idea.

  14. engetudouiti reporter

    hm I thought almost same things seems already offered as shader work.

    then about this case, I can not check how it will change or difference (because I do not have those product, (grafted + shell) so I can not check it ) But anyway open again, (As for me I hope Thomas check other issue of rigi-fy requests ^^;

    (I really hope to save current meta-rig setting as blender scene, untill convert rig-fy,, ,, without it I can not stop work.. untill generate ,,,)

  15. Alessandro Padovani

    I still have no idea why it works. But I found the way to do it in daz studio so it works both in daz studio and in blender. It is also very simple to do. Below an example where I used golden palace + headlights + a body shell over them. The body shell uses a squared path texture because I needed to verify the uv continuity over the geografts so the blood shell was not optimal. Test scene included.

    Well first we load the body shell over the G8F and we see how it works for the torso geometry and uv map.

    Then we load the headlights and golden palace geografts and we see that they replace the body shell as expected. Of course I also used the fix tool by Meipe to adjust the shells visibility. This is common when using multiple geografts. But this is not enough since the body shell overlays them. Now we have to fix the body shell.

    The trick is to go to the body shell and just copy the torso material to the headlights and golden palace materials. This will overlay the body shell to the geografts. It also imports fine in blender without any additional work required.

    What I can't understand is why it works. The geografts geometry and uv map are different so I'd expect the body shell to break over the geografts. But this doesn't happen and everything works fine. I also tested other geografts having a very different uv map and geometry such as futalicious, it works there too. Of course I also tested the blood shell and it works as well.

  16. engetudouiti reporter

    @Alessandro

    It seems usuall for me.

    Because about daz material (each face group) can use different UV map with material.

    So if you copy and paste the shell UVmap and texture will copy and paste for the actor material (so the material only change UV map as same as the shell)

    Then same thing can do it for blender.. (we just need UVmap node, and change for each material part)

  17. engetudouiti reporter

    About your case, textures for nipple part and under gen main body part can be layered on same UV island of body torso, so About merged parts (or layered parts) they can use same UV set and material of the body .

    It seems same, when we apply body material (body with Aiko UV and textures) for Victoria female genital products. the gen products are made to fit Victoria female UV.

    About surfaces which used for both (body and female gen) = torso, we can simply copy and paste Aiko UV witth material. non merged parts (genital parts) still use original (G3F or V6) uvset, and textures, then it work..

    Because most of female gens, added part (not locate on same UV islands) are clear divided as different surface group (material sots) , so we do not see heavy issue usually.

    But if you have men genital products and shell, you can not do it. because about men genital products, stem and torso part can not be separated. then we can not just apply different UV set for stem and torso parts.

  18. Thomas Larsson repo owner

    Alessandro, my trick works since many modern geografts have two uv maps: one that matches the underlying body and one for the specifics. In that way the geograft can use the underlying skin shader for the body, which makes it work with any skin. Older geografts only had a single uv map which was not compatible with the body mesh. They could only be used if vendors bothered to make textures for genitals, which many did not.

    My trick does not work with such older geografts, and I doubt that yours will either.

  19. Alessandro Padovani

    Thomas, I believe the “trick” is the same but I do it in daz studio while you do it in blender. In my opinion doing it in daz studio is the correct way because the asset works in both worlds and the importer just imports the figure as it is supposed to do.

    I also believe that a note in the user docs would be fine, explaining that doing it in daz studio is possible and better (and also easier).

    As for why it works, I understand that modern geografts have two uv maps to allow merging materials. But this is required to work only on the merge area by shell transparency. In my opinion the short answer is that it works by luck. Because daz artists are forced to start from the daz geometry to define the graft area where the geograft merges. So the uv map tends to work in some extent as far as the artist “morphs” the old uv map instead of replacing it.

    For example in headlights the geograft is fully mapped in default uvs in a way that is quite compatible with the G8F base female uvmap. Please note that this is not required for the geograft to work nor to define an area for merging materials. It is only the good work of the artist. So we may not expect a shell overlay to work with geografts in general.

    Also thank you @engetudouiti for the nice explanations.

  20. Thomas Larsson repo owner

    I haven’t made a geoshell myself before, but I followed your steps and it seems to work. The only drawback compared to my method is that you create six different node-trees in Blender instead of a single one.

    I will write a follow-up post in my blog later. Or maybe you want to write it, and I can publish it as a guest post.

  21. Alessandro Padovani

    Thomas, as for the note to the users please feel free to do as you wish. Or you may just copy and paste my post above with the procedure to follow, or post a link here.

    I’m not sure what do you mean by node trees. If you mean the shells in blender then they are the same as in daz studio. That is, in daz studio you select the visibility by surface in the shell, so to only affect the surfaces you want, that’s what you do with remove shells in blender. Then in daz studio we copy and paste materials as shown above, that’s what you do with replace shells in blender. So the two “tricks” are exactly the same but you do it in daz studio instead of blender.

    Please note that if you fix shells in daz studio then you don’t need to define multiple custom groups in blender for the shells. That is, if you have three shells in daz studio then you only need three custom groups in blender. That’s how the plugin worked before. In my opinion generating so many custom groups is not good, if it can be avoided.

  22. Alessandro Padovani

    p.s. Apart fixing overlapping shells, any chance to implement true geometry shells as an option as suggested by @engetudouiti ?

  23. Thomas Larsson repo owner

    I think you can run into problems if you reduce a shell to a single node group in Blender. Consider the blood asset mentioned before. When I import it into Blender, the importer creates the following node trees:

    The blue ones belong to geografts and should be replaced by node trees for the body. But the yellow trees belong to the body and are not equivalent, since they contain different textures. Face+Ears+Lips, Arms+Fingernails, and Legs+Toenails are probably the same, but we are still left with four distinct node groups. Mapping a shell to a single node group is not a good idea in this case.

  24. Thomas Larsson repo owner

    OTOH, it is not a good idea to create separate node trees when it is not needed. So the Face, Ears, and Lips node trees should be the same. With the latest commit, they are.

    I think that with the last commit, shells do work as they did before, except that a material name is added to the shell name. A user can choose between fixing everything in DS, or use my tools to fix them in Blender later.

  25. Alessandro Padovani

    Right now I’m in the middle of house renewal so I do construction work plus my usual job and I get very little time. I’m not sure I follow entirely but I’ll check the commit in the afternoon and let you know. Thank you Thomas for your nice work as always.

  26. Alessandro Padovani

    As for commit 387a707 it seems to me there are a couple of issues. I included a test scene shell-r2.duf, it uses the same squares-2.jpg texture. The test scene gets a squares shell for torso arms and legs, plus the usual goldenpalace and headlights.

    Steps

    1. import shell-r2
    2. merge armatures
    3. merge geografts
    4. merge materials

    Now the rendering is fine and the shells and materials are good.

    What’s odd is the shell custom groups.

    I get a “Squares_Torso-4” used for Torso-4 Arms-4 and Legs-4, plus goldenpalace and headlights. That I can’t understand why is named after the torso, since it’s shared among materials then just “Squares” is good that’s the same name in daz studio.

    Then I get a “GoldenPalace_Shell_GP_Torso_Back-1” that’s not used anywhere.

    Then I get a “GoldenPalace_Shell_GP_Torso-1” used for GP_Torso-1 and GP_Rectum-1, that again just “GoldenPalace_Shell” would be enough that’s the same name in daz studio.

    Same for Headlights Shell_Nipples-2.

    As I said there’s no need to add the material names to the shells since custom groups are instanced and shared among different materials. So we just need as many custom groups as there are shells in daz studio, named after the shell name without adding the material name that does not make sense since the shell is shared among different materials.

  27. Thomas Larsson repo owner

    Torso and torso-back are different in DS: Glossy Layered Weight is 2.0 in torso and 1.0 in torso-back. So they must correspond to different node groups. If we don’t include the material name in the node group name, Blender would do it for us, by adding .001 as usual. Though it is not clear to me why the rectum material survives merging and not torso-back.

    Similarly, the blood asset creates different node groups for torso, arms, legs and face, because the textures are different. Your example does not show that because all materials use the same texture, but then the seams are very visible.

  28. Alessandro Padovani

    Thank you Thomas for the explanation now I believe I understand. If the shell uses multiple materials then it is needed one group for each material. I didn’t get it because usually geografts use one material only. For the common case we can use the daz shell name though.

    Also I didn’t notice Torso_Back is different, so merge materials may also need a fix.

  29. Thomas Larsson repo owner

    Now the material name is only added when needed, i.e. if the shell defines several distinct materials. The merge bug should be gone too. The rectum material survived because it had another viewport color.

  30. Alessandro Padovani

    Commit 2d95b7d seems to work fine in my tests.

    Please Thomas let us know if you plan to add an option to import the shell geometry, that’s what this discussion is for. Otherwise we can always do it by hand following the method by @engetudouiti , but then to adjust materials takes some time so having an option in the plugin would be useful.

  31. Thomas Larsson repo owner

    Well, now shells work good enough for myself, so I don’t plan to add something like this, at least not in the near future.

  32. engetudouiti reporter

    So now I hope to set this as closed Alessandro OK? 😉 I hope to keep topics as visible which I hope Thomas consider (only topics I really hope it need for my wrokflow,,)

    actually I do not think it is easy to make it as automate, and I still not confirm (may be I can not ) it work for grated items merge too. (so Current Thomas material workflow already work well,, it may need not push (if there is case, it work good for purpose, open again please)

    At same time I may request to offer option to change material link with Object (for some purpose),, but it is not current main issue for me,,, And thanks all closed request seems remain (thanks) as hidden , then we can request or open when we need it again

    (and can check when it had changed with Commits)

  33. Alessandro Padovani

    Yep it’s ok we can always point interested people here even if it’s closed. Thank you Thomas for the nice update to shells.

  34. Log in to comment