Cycles - Principled BSDF Shader - Transparency is not working as expected
Closed, ResolvedPublic

Description

System Information
Ubuntu 17.04

Blender Version
Broken: 2836003f6b

Short description of error
Transparency on the Principled BSDF shader is not working as expected

Exact steps for others to reproduce the error

  1. Open attached blend file
  2. Go into rendered mode

Image plane on the left is using a normal diffuse / transparency combo, that is how I want it to work
Image plane on the right is using the principled BSDF shader, setting it up we noticed that transparency is acting more like reflections. Its transparency value is 1, so it should be totally transparent instead of being reflective

Plugging the alpha from the billboard.png into the transparency input also doesnt work as expected either.

Sergey Sharybin (sergey) triaged this task as Normal priority.May 4 2017, 4:40 PM

Principled transparency is more a real glass transparency, which is different from transparent BSDF.

To me it seems Principled BSDF is for the real-life objects, while transparent BSDF can be used for tricks like you use for trees.

Final decision i'll leave up to @Brecht Van Lommel (brecht) and @Pascal Schön (VanCantus).

To follow Cycles naming conventions I suggest we rename this socket to "Transmission" (and "Transmission Roughness"). It's a trade-off between following the Disney naming convention and our own, but I think in this case clearly distinguishing from the Transparent BSDF is more important.

Both cutout transparency and transmission are useful, they're just different things. I think it would even make sense to add a support for cutout transparency (and emission) to the Principled BSDF eventually.

I will do the changes as Brecht stated and I will also figure out how to do the cutout transparency. I can also add the emission shading if this is a liked feature for the principled shader.

I will do the changes as Brecht stated and I will also figure out how to do the cutout transparency. I can also add the emission shading if this is a liked feature for the principled shader.

We can then the principled shader only. Awesome :)

I can also add the emission shading if this is a liked feature for the principled shader.

It is :)

Well, I think that emission and cutout transparency (i.e. holes) can be handled perfectly well by mixing in other nodes, unlike translucency (diffuse transmission, which should share energy with diffuse after glossy), so it's not a priority; and the node may have enough parameters already. Also, is somebody writing a manual entry for it already? ;)

I think we definitely need to make the Principled BSDF complete enough that you don't need to mix in other closures, that's kind of the whole point. To make it faster for users to set up materials, and to provide a standard node for things like texture painting and material import/export. Not saying it has to be done right now or as part of this bug report, but certainly at some point.

If I understand the physics correctly, the Transparency node should be basically equivalent to 'glass-type' transparency with IOR exactly equal to 1: all reflection and refraction effects (including microfacet roughness) disappear, and only surface absorption remains. If so, maybe the node could potentially use the transparency closure as a special case if the index of refraction is set to 1. Even now, it seems to work as you would expect: no reflections/refractions, and the transmitted light is multiplied by color.

The main problem in using this for cutouts is that transparency shares the base color with the rest of the shader, whereas for alpha transparency you want the transparency component to use pure white.

We interpret transparency as the absence of geometry, it should not be considered the same as refraction with IOR 1.
https://docs.blender.org/manual/en/dev/render/cycles/settings/light_paths.html#transparency

I renamed the inputs as @Brecht Van Lommel (brecht) suggested. For the additional inputs I will first create a new differential which then can be approved and committed.

Well, I think that emission and cutout transparency (i.e. holes) can be handled perfectly well by mixing in other nodes, unlike translucency (diffuse transmission, which should share energy with diffuse after glossy), so it's not a priority; and the node may have enough parameters already. Also, is somebody writing a manual entry for it already? ;)

I could be wrong but my understanding is that there are problems with combining the Principled shader with the transparent node. To create a transparent but glossy material the nodes need to mix the diffuse and transparent nodes and then mix the result with glossy, if the mixing is done the other way the alpha transparency will remove the glossiness. But the output of the transparent node is BSDF and the input to Principled is color so there is no way to put the transparent node before the Principled node in order to preserve the specular reflections that Principled creates. Also, if you use base color of white and transmission of 1 and IOR of 1.0 you can achieve (near?) complete transparency but it takes a lot of samples to reduce the very prominent noise, even after 1000 samples you could still see where the transparent mesh was if you looked for it. With a texture with an alpha channel the RGB channels are all black when the alpha channel creates complete transparency so if they are fed into the base color you end up with an opaque black surface because transmission is multiplied by base color. For complete transparency you can work around that by mixing the color from the image texture with white, using the alpha channel as the factor, but that doesn't work for partial transparency.

So, using diffuse textures with an alpha channel with the Principled shader is problematic. So some sort of extra input on the Principled shader that handles alpha transparency would be very useful. I've been trying to generate node networks that use the Principled shader for MakeHuman, but I don't think it is currently possible because MakeHuman uses a lot of alpha transparency including partial transparency.

My apologies if I've got this all wrong or if the way MakeHuman uses transparency is inappropriate.