Page 1 of 3

Would it be possible to get Alpha on Glass Materials?

Posted: Sun May 09, 2021 5:44 pm
by MCurto
Don't really know the inner workings or how much work it would take or even if its possible considering the differences between the way Cycles and Lux calculate light, but in Cycles its kind of easy to get an Alpha trough Glass materials.Considering Lux is much more suited for the kind of renders in glass and liquids it seems it lacks on this area.At least to my knowledge and apart using Architectural option there's no way to get that Alpha, which really doesn't look that great.
I know I can get the Alpha from Cycles and use it on Lux render but was wondering if there's at least a possibility that this "feature" could make it eventually to some future LuxCore version?

Just a simple Glass Teapot, Lux Glass default:
Screenshot 2021-05-09 at 18.11.16.jpg
Cycles default (made IOR 1.5):
Screenshot 2021-05-09 at 18.27.36.jpg
Lux Glass Architectural, really lacks detail/realism (no diference between black/white shadow):
Screenshot 2021-05-09 at 18.16.37.jpg

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

Posted: Sun May 09, 2021 8:17 pm
by JulianoLisboa
This feature would be very important for those who work with product visualization like me.

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

Posted: Sun May 09, 2021 8:42 pm
by TAO
It will be great to have transparency with glass. that's a good feature to have.

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

Posted: Sun May 09, 2021 8:52 pm
by Dade
You have just to use Glass + material transparency (probably called opacity in Blender) and you get a Cycles-like alpha channel.

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

Posted: Sun May 09, 2021 9:04 pm
by TAO
I give it a try and that's the result.
Glass with 0.5 transparency
Screenshot 2021-05-09 230521.jpg
Glass with 1.0 transparency
Screenshot 2021-05-09 230534.jpg
Orginal render frame buffer with 1.0 transparency
Screenshot 2021-05-09 230655.jpg

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

Posted: Sun May 09, 2021 9:26 pm
by JulianoLisboa
This does not solve Dade, for example a bottle has to be transparent where I have no liquid. I cannot change the transparency of the whole bottle.


Luxcore glass turns white without transparency
image_2021-05-08_17-14-36.png

Cycles is correct, with transparency using holdout or shadow catcher in the background.
image_2021-05-08_17-13-52.png
The same behavior of Cycles can be achieved in corona and Fstorm in 3ds Max.

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

Posted: Sun May 09, 2021 9:36 pm
by MCurto
Dade wrote: Sun May 09, 2021 8:52 pm You have just to use Glass + material transparency (probably called opacity in Blender) and you get a Cycles-like alpha channel.
I don't even think Cycles is ok, its closer but not ok.The light reflections really shouldnt keep that much Alpha, those are reflections on a glossy surface that should cancel the transparency. Think Lux just could "do it better". Putting transparency on a glossy light reflection is a bit "weird".

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

Posted: Sun May 09, 2021 10:29 pm
by Dade
You can not have the rays follow the refracted direction and go straight at the same time without any kind of mix (for instance 50% and 50%). Otherwise you would create energy out of thin air (i.e. breaking the energy conservation law).

Given the rendering of a glass sphere over a plane with a sky, post how you would like to have the RGB and Alpha result.

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

Posted: Sun May 09, 2021 11:15 pm
by MCurto
Not sure I understand your proposition,Im a post-producer/retoucher that took interest in 3D not long ago, I'm obviously not very skilled at 3D and certainly not a physicist, but being a unbiased rendering engine+physically based just stating that giving transparency to a whole object material is probably not the way to go as light reflections shouldn't carry the same transparency change.At least as far as my logic goes.And I don't mean any disrespect by that, I honestly ignore the inner workings of that.

I can composite my way out of it, mixing black and white blackground+ diference in both and inverting the result for a mask and a bit of tweak for shadows reflectionns..whatever...this is actually kind of what I was expecting in the first place:
Screenshot 2021-05-10 at 00.05.02.jpg
Just stating that its obviously possible to get better results, as Cycles does to some extend, but again: I dont know the differences between the two, maybe its not possible in Lux?

A Glass over a plane with Sky?I

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

Posted: Mon May 10, 2021 2:41 am
by JulianoLisboa
I will post here images of the corona shadow catcher with transparent glass with refraction.


Corona Beauty pass
corona.jpg
Corona shadow catcher transparent mode
corona_shadow_catcher_transparent_mode.jpg
Corona alpha
corona_alpha.jpg
Within the settings of the corona shadow catcher material, we can choose between solid (such as luxcore, without glass transparency), composition (with shadows) and the always transparent mode (with transparent glass and alpha channel).

corona Shadow catcher material.jpg
Hope this helps

Juliano Lisboa