Page 2 of 3

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Mon May 10, 2021 4:08 am
by Dez!
https://i.imgur.com/lE6Kd2p.png
Probably it is wrong

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Mon May 10, 2021 8:41 am
by Dade
JulianoLisboa wrote: Mon May 10, 2021 2:41 am Corona alpha
corona_alpha.jpg
They may have the alpha value related to the amount refraction (more refraction = more white). Can you you run the same test with a sphere and post the alpha channel ?

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Mon May 10, 2021 12:34 pm
by JulianoLisboa
Dade wrote: Mon May 10, 2021 8:41 am
JulianoLisboa wrote: Mon May 10, 2021 2:41 am Corona alpha
corona_alpha.jpg
They may have the alpha value related to the amount refraction (more refraction = more white). Can you you run the same test with a sphere and post the alpha channel ?
Yes sure. Here it is.
sphere_beauty.jpg
sphere_beauty.png

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Mon May 10, 2021 2:24 pm
by Dade
JulianoLisboa wrote: Mon May 10, 2021 12:34 pm Yes sure. Here it is.sphere_beauty.jpgsphere_beauty.png
What is the difference between the 2 spheres ? Is it the amount of reflection ?

It seems to set alpha=0 if the ray is transmitted or alpha 1.0 if it is reflected :idea:

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Mon May 10, 2021 3:38 pm
by JulianoLisboa
Dade wrote: Mon May 10, 2021 2:24 pm
JulianoLisboa wrote: Mon May 10, 2021 12:34 pm Yes sure. Here it is.sphere_beauty.jpgsphere_beauty.png
What is the difference between the 2 spheres ? Is it the amount of reflection ?

It seems to set alpha=0 if the ray is transmitted or alpha 1.0 if it is reflected :idea:
The one on the left is solid and the one on the right is thick (solidify)

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Wed May 12, 2021 2:15 pm
by Dade
JulianoLisboa wrote: Mon May 10, 2021 12:34 pm Yes sure. Here it is.
sphere_beauty.jpg

sphere_beauty.png
This doesn't make sense, you have a solid background in your rendering and the alpha channel of that rendering is, by definition, all white (with or without the 2 glass spheres, it doesn't matter). You are using something else, not the alpha channel. Please render a glass sphere over a plane like this (RGB and Alpha):

normal.jpg
alpha.jpg
alpha.jpg (4.71 KiB) Viewed 3916 times

We can argue about the alpha channel of pixels belonging to the sphere but the alpha of plane pixels must be 1. Otherwise you are using some kind of shadow catcher or similar.

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Wed May 12, 2021 5:01 pm
by JulianoLisboa
Hello Dade, so ... Yes I am using a shadow collector, but that has been talked about since the beginning. The use of this is to be the transparent glass when you have a product in the studio for example. So I believe that it is the shadow collector that has to be changed.
Esfera1.jpg
Esfera_alpha.jpg

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Thu May 13, 2021 12:29 pm
by Dade
JulianoLisboa wrote: Wed May 12, 2021 5:01 pm Yes I am using a shadow collector, but that has been talked about since the beginning.
The first MCurto's post in this thread talks only about alpha channel, they are 2 different topics.

I reworked how alpha channel is handled for purely transmitted eye paths and the result should match what was asked:

normal.jpg
alpha.jpg

This change is available in v2.6 daily builds.

The last question is if this new behavior should be used far all kind of transmitted paths (like in the new code) or only for specular one (i.e. glass but not rough glass, glossy translucent, etc.).

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Thu May 13, 2021 12:50 pm
by MCurto
Hoah!Thaks a lot, will test, and give feed back!Looks great.

I guess because I'm a bit new to the whole scene maybe I'm not calling things by their names but the ability to have transparency (alpha?) on a glass material believe its invaluable for people who are more focused on the kind of studio stills like product rendering and stuff, I work a lot with glass and liquids (photos) and I'm sure this will prove very handy to help me try to integrate 3D more often.

Anyway: thanks!

Re: Would it be possible to get Alpha on Glass Materials?

Posted: Thu May 13, 2021 1:05 pm
by Dade
MCurto wrote: Thu May 13, 2021 12:50 pm I guess because I'm a bit new to the whole scene maybe I'm not calling things by their names but the ability to have transparency (alpha?) on a glass material believe its invaluable for people who are more focused on the kind of studio stills like product rendering and stuff, I work a lot with glass and liquids (photos) and I'm sure this will prove very handy to help me try to integrate 3D more often.
The reason I was not marking the glass as transparent is because you are not seeing directly what is beyond the glass but the ray is refracted and it lands in a different part of the sky.
So, if you use this new alpha channel for some kind of background compositing, you are not really ending with an accurate result. But I guess "something" is till better than "nothing"