Page MenuHome

Eevee principled BSDF SSS not mixing correctly with transparent BSDF
Closed, ResolvedPublic

Description

System Information
Operating system: Linux-4.13.10-041310-generic-x86_64-with-debian-stretch-sid 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.67

Blender Version
Broken: version: 2.80 (sub 70), branch: master, commit date: 2019-05-20 06:52, hash: rBf606f588455e

Short description of error
This is a follow up to T64762, so I think @Brecht Van Lommel (brecht) might want to take a look at this.
The problem is a bit hard to pin point, but there still seem to be a problem with linear interpolation of alpha mapped normal maps. This time they are only triggered when a value node, specifically with a value of 0, is used as the input for either Subsurface, Clearcoat or Transmission on the Principled PBR node.
When the value node is muted, or the connections are cut, the issue is gone. That is despite the fact, that the values on the Principled node are the same, as the value coming from the input node.

There is another, perhaps related, darkening issue. If instead of using the transparent shader to mask the object, the alpha inputof the Principled PBR node is use, the entere material darkens.
This again is triggered by the Subsurface, Clearcoat or Transmission inputs, and vanishes when the value node is muted or the connections are cut.

I also think this only happens for non-metallic materials, but I'm not sure.

Please check out the video demo for clarity.

Exact steps for others to reproduce the error

  • open the blend file above
  • notice - what appears like - interpolation issues on the transparent border
  • mute or disconnect the value node, feeding a value of 0 to subsurface, clearcoat and transmission
    • the issue should be gone, but note that the input values are the same as before
  • unmute/reconnect the value node
  • feed the Principled output directly Material Output, to use the shaders own alpha input in favor of the Transparent and Mix shaders
    • now the entire material should darken
    • mute or disconnect value node again, and the material will behave as expected

Details

Type
Bug

Event Timeline

Brecht Van Lommel (brecht) triaged this task as Confirmed, Medium priority.May 20 2019, 6:51 PM

There is indeed something weird going on with Eevee, normally plugging in a Value node or setting the value directly should make no difference.

As far as I can tell, this is unrelated to the normal map as unplugging it gives the same dark border. It is also not clear what the purpose is of using alpha twice in the shader node setup, as using the Alpha socket means it's already mixing with a Transparent BSDF internally.

MACHIN3 (MACHIN3) added a comment.EditedMay 20 2019, 7:01 PM

It is also not clear what the purpose is of using alpha twice in the shader node setup, as using the Alpha socket means it's already mixing with a Transparent BSDF internally.

This is really just my old setup of using the transparecny shader, and then quickly switching it over to the Alpha input. I plan to get rid of the transparent shader, but left it in because it somehow produces a different result.

You are right, it is unrelated to the normal map. I'm updating the title.

MACHIN3 (MACHIN3) renamed this task from linear interpolation + darkness issues with alpha mapped normal maps and the principled BSDF shader to linear interpolation + darkness issues with alpha masked principled BSDF shader.May 20 2019, 7:03 PM
MACHIN3 (MACHIN3) renamed this task from linear interpolation + darkness issues with alpha masked principled BSDF shader to linear interpolation + darkness issues with alpha masked principled BSDF shader + Subsurface, Clearcoat and Transmission inputs.May 20 2019, 7:05 PM

@Clément Foucault (fclem), I think this one is for you.

Here's an example file, unplugging the Value node from Subsurface avoids the black border.

For some reason, the subsurface (and some other) variations of the principled BSDF are not working well when mixed with a Transparent BSDF. This happens without using the new Alpha socket.

Brecht Van Lommel (brecht) renamed this task from linear interpolation + darkness issues with alpha masked principled BSDF shader + Subsurface, Clearcoat and Transmission inputs to Eevee principled BSDF SSS not mixing correctly with transparent BSDF.May 21 2019, 8:58 AM

In an attempt to avoid it being overlooked, I want to point out, that it's not just Subsurface, but also Clear Coat and Transmission causing this. Also, as you can see in the file attached, there is an issue with the Alpha input as well, which leads to darkening of the material.

Fixed by rBdf7f69b8735f.

The only issue then is that the normal map is not in linear mode.

Clément Foucault (fclem) closed this task as Resolved.May 23 2019, 2:40 PM