Can't use 8.1 with PBR skin.

Issue #743 resolved
Regruver created an issue

Blender 3.0/2.93.5. Diffeomorphic 1.6.1.0647.

I tried 4 different characters with PBR skin and always get this.

Comments (16)

  1. Agust Svensson

    I had the same with “Mercy HD” and it had something to do with the mixing of normal maps, if I remember correctly. I changed normal from “tangent” to “object” and it looked OK in my eyes. Not sure if that’s the correct way though.

  2. Regruver reporter

    Unfortunately it doesn't work for me. The lines almost disappear if I set the normal maps to zero. This only happens with PBR skin, if I use figure 8.1 without PBR, the skin looks great

  3. Alessandro Padovani

    Ok I believe I got it.

    The issue is that normal maps are multiplied and this is not good. A normal map has always to be ovelayed as explained in #406. We can’t multiply a normal map.

    Below an example with Mercy 8.1. We see that the normal map for the Face material gets a 0.5 factor. This is converted with a multiply node in blender. Plus for some reason the multiply factor is used in the normal map node too, thus it is used twice and in a wrong way.

    Then below how it should be done, following #406. The normal map is overlayed with the neutral color for normal maps, that’s (0.5,0.5,1.0), and it is given a mix factor of 0.5 to get its intensity. Please note that the mix order is important otherwise we reverse the intensity.

    Then below it’s Mercy before and after the fix where I fixed the Face and Head materials. Test scene included mercy-81.duf.

  4. Regruver reporter

    Thank you for such a detailed explanation. I did everything as you said and I think now everything is working as it should.

  5. Thomas Larsson repo owner
    • changed status to open

    Opening the issue so Alessandro can check the last commit, which I think solves it.

  6. Alessandro Padovani

    Commit 7ed9eee works great, thank you Thomas for the fast fix. If Regruver and Agust have nothing to add we may mark as resolved.

  7. Alessandro Padovani

    Oops .. sorry commit 7ed9eee is not good. The mix order is reversed. It is important that the fac drives the normal map. So we must have the normal map in color 2 and the “blue“ color in color 1.

  8. Thomas Larsson repo owner

    Yes, the order was changed because it simplified the code, but the factor was changed accordingly. You will see that if you test with a factor != 0.5.

  9. Alessandro Padovani

    I’m not sure that reversing the factor will do the same with normal maps. I’ll do some tests and let you know.

    In any case personally I’d prefer the fac to drive the normal map because it makes more sense to me from a material point of view. But if this makes the code much more complex then I understand it may not be worth.

  10. Alessandro Padovani

    Thomas, from the code I assume that the formula you’re using is

    mix1 = self.mixNormals(1.0-strength, None, link.from_socket, None, col=2)

    Unfortunately in my test it doesn’t seem that reversing the factor gives the same result. Below an example where I used the face normal map from Mercy without any other map, that is, on a plain gray diffuse surface. With the direct 0.5 factor we get a soft normal map, with the reversed 0.5 factor we get a more harsh normal map. So I don’t think reversing is good.

  11. Log in to comment