Page 3 of 4

Re: Metal Material

Posted: Sat Feb 06, 2021 11:09 pm
by Martini
Artistus wrote: Sat Feb 06, 2021 5:47 pm Sorry, I'm relatively new to LuxCore.
Welcome! :D
Artistus wrote: Sat Feb 06, 2021 5:47 pm
B.Y.O.B. wrote: Sat Feb 06, 2021 2:22 pm I added a "Custom n, k Values" mode to the fresnel texture:
But you told above that custom numbers are not exposed in BlendLuxCore. Any chance to have them exposed in Blender any soon, maybe at least in some beta version? Or do you mean you have added those custom numbers already to latest beta?
Yeah, the devs here are so efficient, it's quite amazing actually. :P Usually when they say "I've added/fixed x", within a few hours it's already available for download here:

https://github.com/LuxCoreRender/BlendLuxCore/releases

Custom n, k values are in the latest release right now :ugeek:

Re: Metal Material

Posted: Sat Feb 06, 2021 11:50 pm
by B.Y.O.B.
I don't know how the n, k values work exactly or why they are colors, maybe Dade can answer that.

Re: Metal Material

Posted: Sun Feb 07, 2021 10:10 am
by Artistus
Martini wrote: Sat Feb 06, 2021 11:09 pm Welcome! :D
...
Yeah, the devs here are so efficient, it's quite amazing actually. :P Usually when they say "I've added/fixed x", within a few hours it's already available for download here:

https://github.com/LuxCoreRender/BlendLuxCore/releases

Custom n, k values are in the latest release right now :ugeek:
B.Y.O.B. wrote: Sat Feb 06, 2021 11:50 pm I don't know how the n, k values work exactly or why they are colors, maybe Dade can answer that.
Amazing! Huge respect for great job!

For me it seems like custom 'n,k' values in LuxCore are similar to Maxwell's 'Reflectance 0' and 'Reflectance 90' colors, so I'd name them 'custom n,k colors' in LuxCore (if I understand it right). And in Maxwell you can load some textures there instead of plain colors.

Maxwell has Nd and K fields separately, and those numbers have huge influence on material reflectivity Fresnel function. Actually Nd in Maxwell is actually the same thing as IOR, but it changes also reflection intensity for metals and other non-transparent surfaces. If you load SOPRA measured data files there - they override all layer BSDF properties, so Nd (IOR) and K (extinction coefficient) values as well as color data are taken from measured data.
Maxwell Material Editor.png

Re: Metal Material

Posted: Sun Feb 07, 2021 10:43 am
by Artistus
Though I can't achieve the same color with measured data or Copper preset so far.
The rendering times here were the same 11 minutes on my 80-threaded system.
Maxwell's image is a bit clearer from noise, I expected the opposite.
I used BlendLuxCore v2.4 here on the right.

Brushed metal is the subject for further tryouts to make it similar.
Although overall rose gold metal looks the same, but because of lack of some controls I was unable to achieve the identical look.
Some issues were with light materials setup as well. And I figured out that the mask textures for lights have to have gamma set as 1.0 in the image node.

BUT!!! It's pretty close to Maxwell and this is a huge achievement regarding the Maxwell's price tag.
Though, I'll make few other tryouts with custom n,k colors in latest release (and hopefully upcoming Nd, K numeric values in next ones if possible).
Maxwell_5_1_vs_BlendLuxCore_2_4.png

Re: Metal Material

Posted: Sat Feb 13, 2021 3:26 pm
by CodeHD
B.Y.O.B. wrote: Sat Feb 06, 2021 11:50 pm I don't know how the n, k values work exactly or why they are colors, maybe Dade can answer that.
It's as Artisus implicitly wrote: n is what is otherwise known as IOR and k the extinction coefficient. Together, they form a complex index of refraction N = n + ik.

For glass, you normally only use the IOR because k is extremely low (like 1e-7). Only in metals it becomes important, because despite what the name "extinction" suggests, a high k value causes a high reflaction according to the (complex) Fresnel equation. (If you want a deeper explanation for this you will have to look at wave theory of light. It follows from the boundary conditions at the surface between different materials.)

It is specified with color-data because of dispersion. Again as Artisus indicated, SOPRA files and the like contain spectral data, which are converted to RGB in Lux.

Re: Metal Material

Posted: Wed Feb 17, 2021 7:10 pm
by daros
Artistus wrote: Sun Feb 07, 2021 10:10 am
Martini wrote: Sat Feb 06, 2021 11:09 pm Welcome! :D
...
Yeah, the devs here are so efficient, it's quite amazing actually. :P Usually when they say "I've added/fixed x", within a few hours it's already available for download here:

https://github.com/LuxCoreRender/BlendLuxCore/releases

Custom n, k values are in the latest release right now :ugeek:
B.Y.O.B. wrote: Sat Feb 06, 2021 11:50 pm I don't know how the n, k values work exactly or why they are colors, maybe Dade can answer that.
Amazing! Huge respect for great job!

For me it seems like custom 'n,k' values in LuxCore are similar to Maxwell's 'Reflectance 0' and 'Reflectance 90' colors, so I'd name them 'custom n,k colors' in LuxCore (if I understand it right). And in Maxwell you can load some textures there instead of plain colors.

Maxwell has Nd and K fields separately, and those numbers have huge influence on material reflectivity Fresnel function. Actually Nd in Maxwell is actually the same thing as IOR, but it changes also reflection intensity for metals and other non-transparent surfaces. If you load SOPRA measured data files there - they override all layer BSDF properties, so Nd (IOR) and K (extinction coefficient) values as well as color data are taken from measured data.

Maxwell Material Editor.png
My preferred way to deal with Maxwell's reflectance values is by ignoring completely force fresnel and K. I use only ND (force fresnel off) in conjunction with R2 values, R0 andd R90. This gives me predictable variables and results and a good margin of intervention on the fresnel intensities.

Re: Metal Material

Posted: Wed Feb 17, 2021 7:42 pm
by daros
Artistus wrote: Sun Feb 07, 2021 10:43 am Though I can't achieve the same color with measured data or Copper preset so far.
The rendering times here were the same 11 minutes on my 80-threaded system.
Maxwell's image is a bit clearer from noise, I expected the opposite.
I used BlendLuxCore v2.4 here on the right.

Brushed metal is the subject for further tryouts to make it similar.
Although overall rose gold metal looks the same, but because of lack of some controls I was unable to achieve the identical look.
Some issues were with light materials setup as well. And I figured out that the mask textures for lights have to have gamma set as 1.0 in the image node.

BUT!!! It's pretty close to Maxwell and this is a huge achievement regarding the Maxwell's price tag.
Though, I'll make few other tryouts with custom n,k colors in latest release (and hopefully upcoming Nd, K numeric values in next ones if possible).

Maxwell_5_1_vs_BlendLuxCore_2_4.png
But Maxwell's antialising is simply unbeatable...

Re: Metal Material

Posted: Tue Feb 23, 2021 8:42 pm
by Artistus
daros wrote: Wed Feb 17, 2021 7:42 pm But Maxwell's antialising is simply unbeatable...
I don't know how it's done, but suppose they could be using floating point screen coordinates for sample color and brightness instead of some special filter and they could summarize all data for every pixel having samples more or less randomly distributed over it's screen area. This approach could avoid the need for any AA filter. But who knows...

Anyways, I'd do it that way if that was possible, but I don't know if it is.

Re: Metal Material

Posted: Wed Apr 13, 2022 12:04 am
by kintuX
Hi, long time no see & yet with all "physical correctness" in mind I'm still bedazzled by this n,k approach. How can data obtained @ https://refractiveindex.info/ be used to get "Physically correct results"?

ie:Corona renderer makes it clear: How to use Complex IOR for Corona Physical Material?

but in BlendLuxCore this still feels much like a gimmick and purely artistic choice
/as previously explained, mimicking M~R behavior w/o any real n,k correlation :?

Re: Metal Material

Posted: Tue Apr 19, 2022 6:54 pm
by CodeHD
kintuX wrote: Wed Apr 13, 2022 12:04 am Hi, long time no see & yet with all "physical correctness" in mind I'm still bedazzled by this n,k approach. How can data obtained @ https://refractiveindex.info/ be used to get "Physically correct results"?

ie:Corona renderer makes it clear: How to use Complex IOR for Corona Physical Material?

but in BlendLuxCore this still feels much like a gimmick and purely artistic choice
/as previously explained, mimicking M~R behavior w/o any real n,k correlation :?
unfortunately, the link isn't working here, so I can't compare what they write.

Also, sicne it's been such a long time ;) maybe you can elaborate a bit on what feels non-realistic to you?