Page MenuHome

Eevee - No diffuse when using Clearcoat + Add shader
Closed, ResolvedPublic

Description

System Information
Operating system: Win 10 64
Graphics card: Nvidia 1060 6gb

Blender Version
Broken:
blender-2.80.0-git.dc3b5024be1a-windows64

Short description of error
When using Principled BSDF with Clearcoat, an Add Shader node, and Subsurface scattering turned on in the Render properties, the diffuse color turns black. The Material doesn't have to use SSS, mind you. It's just diffuse with no SSS. But the diffuse color still disappears if you turn Subsurface on the render properties itself.

Exact steps for others to reproduce the error
Using the blend file. The red color of the diffuse will come back if:
-You can turn clearcoat to 0
-Change the Add shader node for a Mix shader node, use Principled directly
-Or turn off Subsurface scattering in the render properties


Event Timeline

This comment was removed by Wo!262 (wo262).
William Reynish (billreynish) triaged this task as Confirmed, Medium priority.

Confirmed. But using an Add shader with nothing connected serves no purpose anyway, so not really much of a problem in practice I don't think.

Wo!262 (wo262) added a comment.EditedJan 23 2019, 9:23 PM

I connected nothing in the second socket as a "simplest blend file" example. But in practice I was using it with emmissive shaders, and there it's a deal breaker

Another update. Turns out that plugging a texture into the Subsurface input of Principled BSDF throws another wrench into the mix. Not subsurface radius, which i know is not supported, but Subsurface. Meanwhile, using Subsurface just with a value doesn't break either the diffuse or the subsurface, at least during viewport.... sometimes... and using Separate Albedo in the render properties also can make things worse... sometimes...Let me explain:

It turns out that the render also fairs worse than the viewport, meaning that if in the viewport you have to turn off 1 or 2 of the things that can cause the black diffuse (clearcoat, a texture in Subsurface, separate albedo, mix shader, add shader or both) in rendertime you have to turn off 2 or 3, otherwise you get black in the render despite looking good in the viewport. Honestly, there are many permutations, but turning on subsurface on render properties, and adding or mixing another shader to principled seem to be the constant parts. It'd be a shame if this was just another known limitation considering that mixing Principled BSDF with other shaders is essential

Wo!262 (wo262) added a comment.EditedJan 26 2019, 11:29 PM

Alright, so after some trial and error, I found a workaround, I still ask for this to be considered a bug though.

It seems that switching the sockets of the inputs on the Mix shader fixes this and other related problems, like the cubemaps disappearing from the specular reflection contribution, or reflections disappearing with the the Transparent shader, all the result of using the Mix or Add shader.

What I think it's happening is that, since some things can only be used once per material due to the limitations of Eevee, like screen space refractions/reflections and subsurface scattering, the system used to determine from which shader to use the one-allowed-thing is also disabling things that in principle shouldn't be affected, like diffuse, specular, the only subsurface in the entire nodetree, etc

I ask for this to be considered a bug since in the example nodetrees in the other socket of the Mix shader there are no other subsurface shaders, or other ss reflections. just emmissions, or transparencies...