Page MenuHome

Glass BSDF has colored reflection, what is wrong.
Closed, ArchivedPublic

Description

System Information
CentOS, GTX 1070

Blender Version
Broken: 2.79rc2

Short description of error
For some weird reason i found that colored glass shader has colored reflection. That produces wrong pbr behavior. When you set some color for glass, it should affect only the refraction color, not the reflection.
This bug/feature makes colored glass shader useless as is. In order to get a correct colored glass we have to rebuild glass shader with mixture of refraction bsdf and glossy bsdf via the fresnel node and plug color in the refraction node. Or use the principled bsdf node, but for some reason this node gives a bit different render result and a bit slower also. But may be it's more physically correct, don't know.

Exact steps for others to reproduce the error
Open blender, create the glass shader on an object and choose some color.

Event Timeline

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Archived.Sep 1 2017, 2:32 PM
Brecht Van Lommel (brecht) claimed this task.

There's different physical effects that can happen, it depends what you want to simulate, colored reflection is possible. The behavior you'r expecting is probably more like absorption, for which you can use a volume absorption node.

Nodes can be improved with more options or different behavior, but there's no bug here.

I think you got me wrong. Glass is a dielectric and all dielectrics have reflection not colored. If a shader called Glass, it should behave like glass. Of course, glass can have a colored reflection if it's not a usual silicon glass, but have some metals mixed in it. There's is nothing to do with volume absorption.
The default glass shader should have the white reflection and colored refraction. If we'd like to have a colored reflection, then we mix refraction node with glossy node and so on.

Glass typically has white reflection and refraction, the color comes from absorption. We provide a color for artistic control. The improvement here would be to add absorption support into the glass shader, or provide support for thin surfaces that compute two refractions at once.

Oh, i got your point, thank you.

Thanks to Brecht, there is a quite obvious solution. Use Glass BSDF and plug volume absorption shader in the volume input. We get correct reflection + correct colored absorption in the glass!
And yes, i mentioned that we can use Principled BSDF for colored glass, but it's a bit slower and doesn't provide physically absorption all alone.