hidden nodes don't work fine

Issue #516 resolved
Alessandro Padovani created an issue

There’s a bug when importing hidden nodes.

That is, in daz studio the hidden property hides the geometry only if there’s a defined selection group for the node, in this case the selection group is hidden. If there’s no selection group then only the bone is hidden and not the geometry.

In blender a hidden node always hides the geometry, even if a selection group is not defined in daz studio. Test scene included hidden.duf, it’s a G8F with the upper face rig hidden.

Comments (17)

  1. Thomas Larsson repo owner

    Now vertices are only hidden if their vertex group belongs to the mesh’s list of polygon_groups. Also child bones are not hidden if their parents are, which was the behaviour before.

    The selection groups are face groups rather than vertex groups. As an approximation vertices assigned to the group with the biggest weight for hiding purposes.

  2. Alessandro Padovani reporter

    Commit 9b7e49b doesn’t work fine.

    I’m not sure to understand how things are managed by the plugin. Specifically to match hidden face groups with hidden vertex groups in blender we have to take the inner vertices and let out the boundary vertices. What’s “the biggest weight” ?

    In daz studio the selection group is what is used to select the bone and what is hidden with the bone. If the bone has no selection group then no geometry is hidden because no geometry is associated with the bone. I am not sure what you mean by “polygon groups”. In the daz geometry editor there are “face groups“ and “surfaces” and “regions”, and only “face groups” can be assigned to “selection groups”.

    Below an example with the temari figure also in #515. First daz then blender. The temari figure hides a set of bones but this has no effect on the geometry because the hidden bones have no selection groups. The G8F face behind the temari face is only hidden by the face material with opacity zero.

    While the blender version does hide geometry with the HIDDEN group.

  3. Alessandro Padovani reporter

    update. I see it is not always possible to translate polygon groups into vertex groups for hiding. So may be it is not a good idea to import hidden polygons. I’ll see if I can find something but it seems blender doesn’t support hidden polygons in object mode.

  4. Alessandro Padovani reporter

    There are face maps in blender that I can assign in edit mode. But it doesn’t seem I can use them to hide some geometry in object mode. Then I don’t know if this is possible via python.

  5. Alessandro Padovani reporter

    Here is another example hidden-2.duf where I hide the G8F “head” and “left shoulder twist” bones in daz studio. So I get their selection sets hidden. Please note that hidden selection sets are not rendered in daz studio so they get an “invisible” material.

    May be the best option in this case is to use an “invisible” material for the hidden selection sets, rather than using the mask modifier. Then I can use the face map above in edit mode to assign the invisible material.

  6. Alessandro Padovani reporter

    Commit 5c34e27 works great. Just a couple of minor notes.

    1. The invisible material is not “invisible” in solid mode, we need the material preview to see it invisible. I’m not sure if there’s a way to make it work in solid mode, there was in 2.8 but it seems it’s no more possible in 2.9. But we can set the viewport color to black so the user at least gets a hint for it.
    2. The invisible material is generated also if there isn’t any invisible face, see hidden.duf as example.
    3. Very minor but “HIDDEN” or “DAZ Hidden“ as material name will stand out better, to stress this is not a normal material.

  7. jeroen b

    Why not set alpha to zero for stuff you do not wish to see in solid view, incl eye-moisture etc.

  8. Alessandro Padovani reporter

    Yep this works fine it was too easy thank you Jeroen for pointing this out. We just need to set alpha to zero in the viewport color.

  9. Thomas Larsson repo owner

    Fixed in last commit. And thank you Jeroen for your comment. Finally we can see the eyes in the viewport.

  10. Alessandro Padovani reporter

    Commit 57478fd works perfect.

    I see that the suggestion by Jeroen to use the viewport alpha for transparent and refractive materials is not implemented yet. So I’ll keep this open for now. Also it works fine for material colors, but it seems it doesn’t work for texture colors.

    Jeroen do you have any suggestion ?

  11. jeroen b

    I never use textured view myself Alessandro, use material preview instead. No idea why this happens.

  12. Alessandro Padovani reporter

    Thank you Jeroen it was just to be sure we wasn’t missing something. Of course material preview shows everything fine, but since here we’re trying to enhance the solid mode I asked. Then I guess this is it.

    Will wait the viewport alpha for transparent materials then I’ll mark as resolved.

    Or, Thomas if you’re not interested to transparent materials in solid mode please let me know it so I’ll mark as resolved anyway. I mean, since the solid mode is intended as “basic” it may be acceptable to don’t have transparency, but personally I believe it would be nice.

  13. Thomas Larsson repo owner

    There is now viewport transparency for transparent materials, with the same alpha. Also for refractive materials, where I arbitrarily set alpha = 0.1 for thin film and alpha = 0.4 otherwise.

  14. Log in to comment