how to make metal shadet with n and K ?

is there a site that shows how to make metal shader using the n and K values ?

thanks
happy cl

I found this paper with fresnel for metals:
http://sirkan.iit.bme.hu/~szirmay/fresnel.pdf
The equation is on the page three in the black box. It is quite easy to implement it with cycles nodes. The (1-cos(theta)) is the Facing output of the Layer Weight node.
However, I tested that and found out that there is no visible difference between that and the fresnel implementation from CynicatPro in this video. Both values (n and k) affect the front reflection but dont change the shape of the curve. Here is the simplified version of fresnel node from the Cynicat’s video:



and here is the metal shader:


IMHO it is best to use this for metal shaders and for the non metal materials use fresnel node implemented in blender.

I found a free lib a set up using n k for metal
and they look very glossy shiny with some added glossy color

have to experiment a bit more with it
still wondering if it is better in cycles


do you have sample file for testing this for metal ?

thanks for feedback
happy cl

You can’t - at least not easily.

Both n and k values describe how the index of refraction and extinction coefficient varies with wavelength. Since Cycles has no concept of the wavelength of it’s light rays - n and k values would mean nothing to it.

Whether you could simulate it using a complex node setup - a bit like Secrop did with his iridescence shader - I have no idea.

not yet agreed
unless you use OSL I think

hope we get some new nodes to do that effect

happy cl

To do it properly would require re-writing Cycles to be a spectral renderer e.g. Indigo, Luxrender, Mitsuba and Octane

I heard there might be a way to add it somehow
but when it is going to be done is a big question !

for now just an approximation for n K

what do you think the metal look in pic I uploaded ?
sorry still low sample !

for me looks super shiny
so is it more natural or realist ?

I like the iron which looks more like a greyish chrome

and some SS or chrome might look like the osmium one

happy cl

N/k describes the reflecting colors at facing and glazing angles (a bit more complex, but). How polished it is, and how imperfections are organized (which to me is more important to get right than the actual color) will still be up to the user. I would like n/k based metals if I also could do an override to have a more artist friendly approach (dictating facing color and fallout power instead). Isn’t also the color of gold out of sRGB gamut with red component being above 1? :slight_smile:

The true differences of n/k will better show if you show the facing and edge colors clearly separated and as an emission. Try using facing output > 0.5 or something. I use this in my own system as a preview mode.