trying to create a metal shader without textures.

Started by Beep the Meep, January 21, 2020, 04:55:13 PM

Previous topic - Next topic

Beep the Meep

trying to create a metal shader without textures just power fractal for roughness and color.


WAS

Trying bringing your Index of Refraction above 2. It will give stronger metallic like shines.



WAS

Quote from: Beep the Meep on January 21, 2020, 06:05:02 PMincreased IOR to 2.9 metalIOR.jpg

Very nice. Much more metallic looking. The PF roughness looks nice as well.

KyL

For metal you might go much higher. Try something like 10 or 15. Also if you put your fractal color in the specular color and set the diffuse to black, it should really look like a metal!

WAS

Quote from: KyL on January 21, 2020, 10:46:36 PMFor metal you might go much higher. Try something like 10 or 15. Also if you put your fractal color in the specular color and set the diffuse to black, it should really look like a metal!

I'd say that's quite high. I haven't even seen that used for gold/silver etc. But for rough metal like this it might also be pretty high in general. More a chrome look (which btw I have also not seen with a index so high).

Curious if you have examples? I'd like to see.

Dune

Higher values certainly look better, but real refraction indices are never that high, strangely.

KyL

Indeed this is counter intuitive but it had to do with the way we use a fresnel approach for our metals. Metal responds to light differently and some renderers have a dedicated shader/mode to that.


If you look at this graph, the visible light the human can see will start roughly at 400nm. For most metals, especially Aluminum, this will mean a reflectance close to 1. The fact that metals reflectivity ramps up so quickly depending on the wavelenght means that it's mostly pure reflections. To simulate this behavior you would have to crank up your IOR pretty high, between 20 or even 50. Chromium, on the other hand, is more a coating than pure metal and won't need such a high IOR. 5 should be enough.

I do not know which BRDF the default shader uses for specular reflection, but I assume it to be a Ward or something similar. I may be plainly wrong here and I hope Matt would correct me, but I've seen this approach used on many other renderers on many scenarios!

Tangled-Universe

KyL's right.
Since TG does not offer shader models which can make a distinction between dielectrics (sand, plastic) and conductors we assume the visibility of a metal is due to its reflectivity and thus diffuse is 0.
Increasing IOR then assures we get an entirely reflective surface.
That's where KyL's suggestions came from.

When using a shader model capable of handling conductors then IOR is not needed to increase the reflectivity and a more physically plausible value can be used.
In the end the index of refraction is the difference in speed of light between a vacuum and a material and it's not that the speed of light is 20 or 50 times slower in metals, it's just that TG's shader model is dielectric, so we need to cheat.

Here's a nice little read which popped up in my mind:
https://www.chaosgroup.com/blog/understanding-metalness

@KyL 
I believe the reflective shader model can be chosen? Blinn or Blinn-Beckmann if I recall correctly.
I don't know the default method for speculars in -say- a default shader...hmmm...makes me wonder.
It's an approximated BRDF I'm pretty sure of, since we can't control fresnel for instance.
You can make a fresnel-like shader though from blue nodes and feed that into a reflective shader's roughness input (with roughness set to 1 iirc)

KyL

Great article, thanks for sharing.

Yes I remember that you can chose in the reflective shader, but now I almost never use it, except for a clear coat layer. Maybe Matt can shed some light on the BRDF the default shader uses!

Dune


WAS

#13
I'm simply referring to how metals are done in TG for desired looks. For example. Download my metal shaders or Hannes or anyone elses..those values are excessive. I thought that would have been obvious from veterans.

When he already has looks pretty much like painted rough metal. Going higher would start to kill that look and be a colored chrome, and wouldn't make much sense with the roughness of the sphere.

Additionally because this is coloured metal zero diffuse doesn't apply, unless this is actual green hued metal itself.

WAS

#14
Here's one of my old rusted chrome balls, good example of rough metal that's shiny, and a IOR of 7 is plenty.

BTW this is PT as well.

Edit: I took a look at Martin's article, and it's a great resource, but doesn't apply to Terragen. For example the IOR for silver and gold right out the door in even their revised chart, would not work in Terragen. In fact they're in the range I use for dull rock and wood type stuff.