Handling of relative refractive indices
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
-
- Posts: 234
- Joined: Thu Jan 18, 2018 6:02 pm
Handling of relative refractive indices
Hi,
This is my situation...
I have a very glossy refractive surface. Its like a piano black finish.
This face uses the "use IOR" option with an IOR of 1.5. It's diffuse color is set to perfect black.
It's roughness is 0.001.
The exterior volume of this face is a clear acrylic volume, also using an IOR of 1.5.
In theory the ratio between those two indices becomes 1. So the resulting Fresnels becomes 0 for all incidence angles.
Is this behaviour integrated in lux core? I've the strange feeling that the calculated amount of Fresnel reflections is calculated against air (IOR 1) everytime.
Thanks for your hints
BR
This is my situation...
I have a very glossy refractive surface. Its like a piano black finish.
This face uses the "use IOR" option with an IOR of 1.5. It's diffuse color is set to perfect black.
It's roughness is 0.001.
The exterior volume of this face is a clear acrylic volume, also using an IOR of 1.5.
In theory the ratio between those two indices becomes 1. So the resulting Fresnels becomes 0 for all incidence angles.
Is this behaviour integrated in lux core? I've the strange feeling that the calculated amount of Fresnel reflections is calculated against air (IOR 1) everytime.
Thanks for your hints
BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
Re: Handling of relative refractive indices
Maybe Glossy Coating + something
Could you please, post an image of an issue and a material, best would be a test scene to tackle with.
Could you please, post an image of an issue and a material, best would be a test scene to tackle with.
-
- Donor
- Posts: 790
- Joined: Thu Oct 04, 2018 6:06 am
Re: Handling of relative refractive indices
But an IOR setting can be activated (I assume this does activate angle dependent (fresnel) reflection).
The question is what happens when inside a volume with the same or a different IOR, how is the fresnel effect calculated?
Re: Handling of relative refractive indices
The related code: https://github.com/LuxCoreRender/LuxCor ... y2.cpp#L69epilectrolytics wrote: ↑Wed Apr 03, 2019 3:18 pm But an IOR setting can be activated (I assume this does activate angle dependent (fresnel) reflection).
The question is what happens when inside a volume with the same or a different IOR, how is the fresnel effect calculated?
The IOR parameter only affects the glossy2 specularity and it doesn't use any external information (like inner/outer volumes IORs). So yes, the result is always the same no matter of the volume IOR you are inside.
-
- Posts: 234
- Joined: Thu Jan 18, 2018 6:02 pm
Re: Handling of relative refractive indices
Hi,
Thanks for answering...
Well, the situation described by epilectrolytics is what I meant.
From my opinion you have to calculate the relative IOR before calculating the amount of reflected light.
IOR relative should be IOR of media 1 devided by IOR of media 2.
If result IOR is smaller 1 than use the value reciprocal.
Interesting question that comes up...
Does total inner reflection happen in case of having a smaller IOR on the reflective surface compared to the external media IOR?
Thanks for answering...
Well, the situation described by epilectrolytics is what I meant.
If this is really the case the result is wrong...So yes, the result is always the same no matter of the volume IOR you are inside.
From my opinion you have to calculate the relative IOR before calculating the amount of reflected light.
IOR relative should be IOR of media 1 devided by IOR of media 2.
If result IOR is smaller 1 than use the value reciprocal.
Interesting question that comes up...
Does total inner reflection happen in case of having a smaller IOR on the reflective surface compared to the external media IOR?
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
Re: Handling of relative refractive indices
It does for glass.lighting_freak wrote: ↑Wed Apr 03, 2019 8:28 pm Does total inner reflection happen in case of having a smaller IOR on the reflective surface compared to the external media IOR?
-
- Posts: 234
- Joined: Thu Jan 18, 2018 6:02 pm
Re: Handling of relative refractive indices
Hi,
Back to the main topic.
Do you think this fresnel behaviour could be fixed soon? Do I have to have separated faces (pointing to world volume AND those that point to the external volume) or will lux core determine this automatically?
BR
This means that one could have an light guide effect of a glass tube surrounded by some black acrylic cladding? At least for a very narrow (almost parallel) beam pattern it should work... I'll investigate that a bit...It does for glass.
Back to the main topic.
Do you think this fresnel behaviour could be fixed soon? Do I have to have separated faces (pointing to world volume AND those that point to the external volume) or will lux core determine this automatically?
BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
Re: Handling of relative refractive indices
Yes but be careful with very near surfaces, it is a situation easily prone to numerical errors.lighting_freak wrote: ↑Thu Apr 04, 2019 1:55 pm This means that one could have an light guide effect of a glass tube surrounded by some black acrylic cladding? At least for a very narrow (almost parallel) beam pattern it should work... I'll investigate that a bit...
I don't think that the glossy2 original index parameter was really intended for this purpose. You may have more success recreating the situation you are trying to simulated with volumes. I mean, if you are trying to have some kind of tiny surface coating, you could try to model both the geometry of the coating and the volume (however it may be very challenging for numerical precision as I wrote).lighting_freak wrote: ↑Thu Apr 04, 2019 1:55 pm Back to the main topic.
Do you think this fresnel behaviour could be fixed soon? Do I have to have separated faces (pointing to world volume AND those that point to the external volume) or will lux core determine this automatically?
-
- Posts: 234
- Joined: Thu Jan 18, 2018 6:02 pm
Re: Handling of relative refractive indices
Hi,
I'm not talking about small tiny surfaces. It's a plastic part that is made in 2 shot process. One shot is a clear polycarbonate and the second shot is a black acrylic...
This part is later on illuminated (through the clear element) by few LED
In real life the intermediate face of those two volumes appears simply black. The difference between those two IOR very little so fresnels are very little as well.
But in Luxcore it glows a lot. By far too much.
My first test defined this particular surface being perfectly black. That works for the glow, but it is not correct anyway... and very hard to apply on each area af a complex part.
Further more 3 shot process is also possible. Setup becomes even harder.
BR
I'm not talking about small tiny surfaces. It's a plastic part that is made in 2 shot process. One shot is a clear polycarbonate and the second shot is a black acrylic...
This part is later on illuminated (through the clear element) by few LED
In real life the intermediate face of those two volumes appears simply black. The difference between those two IOR very little so fresnels are very little as well.
But in Luxcore it glows a lot. By far too much.
My first test defined this particular surface being perfectly black. That works for the glow, but it is not correct anyway... and very hard to apply on each area af a complex part.
Further more 3 shot process is also possible. Setup becomes even harder.
BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease