Makeup problem

Issue #48 resolved
Thomas Larsson repo owner created an issue

Reported by dream3 on BA: https://blenderartists.org/t/daz-importer/684697/557

Sort of fixed it by mixing diffuse overlay with diffuse before adding translucency. Alessandro, is this the same as mixing the diffuse and overlay textures? Translucency before diffuse overlay seems to add artefacts.

Comments (9)

  1. Alessandro Padovani

    Thomas I was pretty sure the diffuse overlay goes after translucency see #24 latest comments. In that case the artifacts were due to low settings in cycles. This evening I’ll look at the specific issue with the makeup though and let you know what I find out. If I understand correctly the issue is with the Olympia 8 makeups so I’ll use her as reference.

  2. Alessandro Padovani

    Ok I believe I got it.

    First I can confirm that the diffuse overlay goes after translucency so the fix in commit aeb36d7 is wrong. Then I found that the key to the issue is the weight squared option in the overlay channel.

    I did tests both with Olympia and with other characters so the solution below is not specific to Olympia.

    What the squared option does is to power the overlay weight, now since it is an alpha channel then when it is squared it is more transparent so the makeup is less visible. I also found out that daz studio seems to power the alpha channel by two when the suared option is off, and power by four when the squared option is on. At least this is it when compared to cycles.

    Below the equation then the daz and cycles materials. Please note that I added a green tint to the translucency just to show better the interaction between overlay and translucency that we'll see later.

    if diffuse overlay weight squared = off
        cycles overlay power = 2
    else
        cycles overlay power = 4
    endif
    

    Then below there's the comparison of the Olympia makeup with the above fix applied. First iray then cycles with squared on then off. We can see it works fine.

    Then below there's the wrong fix in commit aeb36d7 that gets the diffuse overlay before translucency. We can see it doesn't work.

  3. Alessandro Padovani

    NOTE. As a side note the Olympia lips will be different in cycles. This has nothing to do with the diffuse overlay. The difference is because iray uses a 0.38 metallicity factor that’s not actually supported by the plugin. That is, metallicity is supposed to be either 0 or 1, and it is also how it should be used for a pbr material so 0.38 is really in the domain of “fantastic” not realistic materials.

    If we set metallicity to zero then the lips will match fine enough.

  4. Thomas Larsson reporter

    Thank you Alessandro for clarifying things. Not only were the nodes placed in the wrong order, but I had missed that you needed to insert a power node for the alpha channel. The latest commit should work correctly.

    Although my renders don’t look like yours, even if the node tree is the same. In order to see the green tint I must disconnect the volume socket in the material output and only use the surface. Do you have any idea why this happens?

  5. Thomas Larsson reporter

    As for metallicity, the add-on chooses a principled node if metallicity > 0.5. However, even if the value for the lips were above 0.5, the add-on would still use bsdf nodes in this case, because the material uses dual lobe and translucency which override metallicity. The thinking here is that all skin materials should always use the same kind of nodes, so there are no seams between different skin materials.

  6. Thomas Larsson reporter

    Never mind. I had turned down Max Bounces for Volume to 0. When I increase it to 4 it looks right.

  7. Alessandro Padovani

    Yes the power node is new we didn't catch it in #24 since we didn't test makeups.

    As for metallic the general issue is that the uber shader allows for a wide range of non-pbr materials that are difficult to mimic in cycles. This flexibility is useful for conversion of G1-G3 characters using the 3delight shaders and indeed the iray conversion is really good. But unfortunately most daz artists don't understand what they are really doing when using the uber shader and they end up with nonsense materials from a pbr point of view.

    The uber shader guide itself states that metallicity should be either zero or one. But daz artists don't seem to care too much.

    Well commit d419003 seems to work fine I’d mark as resolved. Please Thomas feel free to ask whenever there are issues with materials I may be able to help. I'm not too experienced in other fields such as rigging.

    Below an example of Olympia makeup in commit d419003 first iray then cycles.

  8. Log in to comment