Metal Material

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.
Martini
Posts: 84
Joined: Fri Nov 23, 2018 11:36 am
Location: Australia

Re: Metal Material

Post by Martini » Sat Feb 06, 2021 11:09 pm

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:
i9 9900K @ 5000MHz | 2x Gigabyte AORUS RTX 2080 Ti Extreme Waterforce WB 11G @ 2010MHz
Z390 Aorus Pro | 32GB Kingston HyperX Predator RGB @ 4300MHz

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

Re: Metal Material

Post by B.Y.O.B. » 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.

User avatar
Artistus
Posts: 5
Joined: Mon Jun 08, 2020 2:07 pm

Re: Metal Material

Post by Artistus » 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

User avatar
Artistus
Posts: 5
Joined: Mon Jun 08, 2020 2:07 pm

Re: Metal Material

Post by Artistus » 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

CodeHD
Posts: 408
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Metal Material

Post by CodeHD » Sat Feb 13, 2021 3:26 pm

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.

daros
Posts: 75
Joined: Thu Dec 12, 2019 3:25 pm

Re: Metal Material

Post by daros » Wed Feb 17, 2021 7:10 pm

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.

daros
Posts: 75
Joined: Thu Dec 12, 2019 3:25 pm

Re: Metal Material

Post by daros » Wed Feb 17, 2021 7:42 pm

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...

User avatar
Artistus
Posts: 5
Joined: Mon Jun 08, 2020 2:07 pm

Re: Metal Material

Post by Artistus » Tue Feb 23, 2021 8:42 pm

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.

Post Reply