How to get clear glass?

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
HemiMG
Posts: 2
Joined: Mon Jun 07, 2021 5:47 am

How to get clear glass?

Post by HemiMG » Mon Jun 07, 2021 6:34 am

I'm trying to make an eye shader. The cornea needs to be clear, and it needs to refract the iris. This is giving me headaches. I'm using a glass shader for the out shell with the cornea on it. If is set the glass shader with an opacity of 1, the refraction works great but the eyeball gets dark. If I decrease the opacity of the glass, the eyeball returns to it's normal color but the refraction goes away. I realize glass will always impart some color, but I'm hoping there's a way to minimize it as it's quite strong. I've attached an image that shows the simple switch I created to go between the two shaders and the output both create.
LuxCore1.png

User avatar
B.Y.O.B.
Developer
Posts: 4078
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: How to get clear glass?

Post by B.Y.O.B. » Mon Jun 07, 2021 8:51 am

Try to set the shadow color of the outer shell to white (this setting is in the advanced options in the output node).

HemiMG
Posts: 2
Joined: Mon Jun 07, 2021 5:47 am

Re: How to get clear glass?

Post by HemiMG » Mon Jun 07, 2021 5:15 pm

Thank you! That did indeed work.

User avatar
DionXein
Posts: 56
Joined: Mon Jun 01, 2020 10:22 am

Re: How to get clear glass?

Post by DionXein » Fri Jun 11, 2021 11:36 pm

B.Y.O.B. wrote:
Mon Jun 07, 2021 8:51 am
Try to set the shadow color of the outer shell to white (this setting is in the advanced options in the output node).
May I ask a question - why Glass and volume parameters didn't automatically update shadow color? It's a little bit counterintuitive. And why there is an option such as shadow color?

User avatar
Sharlybg
Donor
Posts: 2783
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: How to get clear glass?

Post by Sharlybg » Sat Jun 12, 2021 8:59 am

DionXein wrote:
Fri Jun 11, 2021 11:36 pm
B.Y.O.B. wrote:
Mon Jun 07, 2021 8:51 am
Try to set the shadow color of the outer shell to white (this setting is in the advanced options in the output node).
May I ask a question - why Glass and volume parameters didn't automatically update shadow color? It's a little bit counterintuitive. And why there is an option such as shadow color?
shadow color is a cheap trick to compute glass simillar to corona hybrid glass. it look physically plausible but
it is not the way thing work in reality. but this trick is look better than archglass for example while saving us a ton of compute time.

it also help to set image background on plane that should let light pass through. same also when you create a light lamp surrounded by
a glass frame or bulb. In this case any light ray from the lamp become expanssive caustics we dont wannt to pay for all the time. So by making
shadow color white you bypass this computation with a nice result at a fair price ;)
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

User avatar
DionXein
Posts: 56
Joined: Mon Jun 01, 2020 10:22 am

Re: How to get clear glass?

Post by DionXein » Sun Jun 13, 2021 9:49 pm

Sharlybg wrote:
Sat Jun 12, 2021 8:59 am
shadow color is a cheap trick to compute glass simillar to corona hybrid glass. it look physically plausible but
it is not the way thing work in reality. but this trick is look better than archglass for example while saving us a ton of compute time.

it also help to set image background on plane that should let light pass through. same also when you create a light lamp surrounded by
a glass frame or bulb. In this case any light ray from the lamp become expanssive caustics we dont wannt to pay for all the time. So by making
shadow color white you bypass this computation with a nice result at a fair price ;)

Okay, sounds legit :roll:

Post Reply