glass (newbie question)

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
User avatar
jon
Posts: 7
Joined: Tue Aug 25, 2020 8:00 pm

glass (newbie question)

Post 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.
Attachments
GlassTest.zip
(2.28 MiB) Downloaded 135 times
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: glass (newbie question)

Post 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
Support LuxCoreRender project with salts and bounties
User avatar
jon
Posts: 7
Joined: Tue Aug 25, 2020 8:00 pm

Re: glass (newbie question)

Post 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 :).)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: glass (newbie question)

Post 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.
Support LuxCoreRender project with salts and bounties
User avatar
jon
Posts: 7
Joined: Tue Aug 25, 2020 8:00 pm

Re: glass (newbie question)

Post by jon »

Perfect. Thanks, Dade.
Post Reply