Alpha of glass makes opaque objects transparent in GPU mode

Hi,

something doesn’t work right with the alpha of glass material. If I choose for the refraction layer “affect color+alpha” than I CPU mode opaque objects behind the glass stay opaque. In GPU mode the objects behind get a transparency. Attached an example from a project, the glass needs to be transparent for other areas of the rendering, so I can’t disable the effect.

Also here a simplified example - left CPU rendered and right GPU rendered. The RGB channel looks fine, but the alpha channel looks wrong.

I hope the basic problem can be easy fixed.

Best -
Micha




@Micha

Could you please share a sample file so we can take a look at it?

Everything was OK on my end with a Generic VRayBRDF material

Hi @georgi.georgiev , attached my simplified test file-

-Micha
Glass-Alpha-GPU-Bug.zip (26.5 KB)

Hi,

Thank you for providing the sample file!

Because the glass material has a tint, the alpha is no longer in greyscale and the GPU render engine does not support color alpha.

Could you please elaborate how the alpha channel is intended to be used?

OK, I understand the problem. If no colored alpha is supported than it should keep opaque objects behind the glass still opaque. And areas without objects behind the glass could be transparent like in CPU mode, but without color saturation (so far the fully CPU functionality isn’t implement).

@georgi.georgiev Also if no tint is used the alpha of the opaque bar is not 100% white. Is this a know bug, maybe already fixed for the latest V-Ray core?

This is a similar issue as this post Reflections causing incorrect Alpha - Issues - Chaos Forum
So it occurs if the glass has reflections :frowning:
I noted that the alpha is fine using a colour in the refraction and a colour fog, as shown in this grab, even if it’s unsupported as a coloured alpha - it’s just the reflection which screws it up.

You could get around this behaviour by having different glass materials for each part, with appropriate settings - that may or may not be a solution depending on othe object
occlusions going on with the parts which actually need the proper transparency, if you get my meaning :slight_smile:

I am having the same problem. The alpha calculation for glass -- when you see through to the opposite side -- does not work correctly / the same as it used to work. How does it work now?