Page 1 of 1

glass (newbie question)

Posted: Tue Aug 25, 2020 8:35 pm
by jon
Hi All,

Just started playing with LuxCore ... it's amazing :D. Thanks to the development team for all the hard work!

Quick question about glass. I tried creating a simple glass material and applying it to a sphere (foreground) and, well, I failed.
denoised.png
Material is defined as:

Code: Select all

scene.materials.glass_test.type = glass
scene.materials.glass_test.kr = 0.2 0.2 0.2
scene.materials.glass_test.kt = 0.5 0.5 0.5
Should there not be specular reflections? Clearly I've missed something obvious. Can someone steer me in the right direction?

Cheers,

Jon

PS. Not trying to do volume rendering here -- just a thin glass surface.

Re: glass (newbie question)

Posted: Tue Aug 25, 2020 10:44 pm
by Dade
You need to define the glass index of refraction (aka IOR) with the property ".inetriorior": https://github.com/LuxCoreRender/LuxCor ... ll.scn#L23

Re: glass (newbie question)

Posted: Wed Aug 26, 2020 12:20 am
by jon
Ah, got it, thanks. I'd assumed the default value (1.5) would take effect.

Follow up question: What's the physical meaning of kr and kt? I assume kr is a multiplier that acts on the specular-reflection component (which is determined by IORs)? And kt acts on the non-reflected remainder? Just want to make sure I understand the physical basis. (I can also check the source code if this isn't documented elsewhere :).)

Re: glass (newbie question)

Posted: Wed Aug 26, 2020 10:38 am
by Dade
jon wrote: Wed Aug 26, 2020 12:20 am Follow up question: What's the physical meaning of kr and kt? I assume kr is a multiplier that acts on the specular-reflection component (which is determined by IORs)? And kt acts on the non-reflected remainder? Just want to make sure I understand the physical basis. (I can also check the source code if this isn't documented elsewhere :).)
They are the specular reflection and transmission scale factors. You can set both to (1.0, 1.0, 1.0) for a perfect specular transmission/reflection without any kind of attenuation.

Re: glass (newbie question)

Posted: Wed Aug 26, 2020 2:27 pm
by jon
Perfect. Thanks, Dade.