Page 1 of 1

Rendering colored metals (like gold).

PostPosted: Mon Jun 10, 2013 2:59 am
by roeland
Hi,

This post explains how to use the index and specular color inputs of glossy materials. The index input is the index of refraction (IOR) of the material while the specular color input simply applies a color to the specular reflection.

glossy materials.png


Plastics

For clear dielectric materials, like plastics, glass or water, the IOR usually is a real number. Any absorption in these materials is usually due to dyeing the material. For these materials you can pick a diffuse color, leave the glossy color to white and set the IOR to some value you may find for this material. You then get a material like the left teapot.

Metals

For metals it works quite differently. They also have an index of refraction, but it is a complex number, which determines both the reflection and the absorption of light in the material. The complex part of this number is called the extinction coefficient. Octane doesn't support a complex IOR, you have to approximate this by either setting an index of refraction greater than 1.0 (for grey metals), or by setting it to 1.0 and using a mix texture + falloff map as glossy reflection.

Take for example gold. The index of refraction of gold is 0.17 + 3.14j at 650nm (see http://refractiveindex.info/?group=METALS&material=Gold). Octane doesn't support a complex IOR like this. Approximating with a IOR of 0.17 (without the complex part) gives a totally different effect, it would look more like an air bubble in water than like a metal. Any IOR values for metals you find are not usable in Octane, only in renderers which support a complex index of refraction.

The second issue, especially with gold, is that the IOR is dependent on the wavelength. There is no approximate formula for this variation like Cauchy's equation we are using in specular materials. You can look at the graphs on the linked page. For pure gold it varies from (1.47 + 1.95j) at 400nm to (0.13 + 4.06j) at 700nm. This gives gold it yellow or reddish color.

The third issue is that gold is usually alloyed with other metals, which affects the color (see http://en.wikipedia.org/wiki/Colored_gold).

The recommended way to render gold is to set the IOR to 1.0, diffuse color to 0.0, and use a mix texture + falloff map for the glossy color. The falloff map will simulate the Fresnel effect on the material.

metal setup.png


There is a material in LiveDB (Materials » Non-Organic » Metal » Colored metal) containing this setup. Materials like this will look like the teapot on the right.

As a comparison the middle teapot is a specular material with the glossy color set to a plain RGB color without falloff. Note the missing Fresnel effect at the edges of the object.

And finally, if you use direct lighting, remember to set the glossy depth high enough if you have lots of reflections between metals.

--
Roeland

Re: Rendering colored metals (like gold).

PostPosted: Mon Feb 29, 2016 5:23 pm
by thorwaldhoffmann
Thanks for your advice. was very useful for me to create gold material.
coming from vray, thinks are totally different ;)

Re: Rendering colored metals (like gold).

PostPosted: Tue Mar 22, 2016 12:53 am
by Sorel
Would the falloff index ever have to change?

Re: Rendering colored metals (like gold).

PostPosted: Tue Mar 22, 2016 8:38 am
by bepeg4d
Hi Sorel,
do you mean creating complex IOR as described in this discussion?
viewtopic.php?f=73&t=43973
ciao beppe

Re: Rendering colored metals (like gold).

PostPosted: Fri Jul 15, 2016 9:04 pm
by blackshore
Thanks for this guide!

Re: Rendering colored metals (like gold).

PostPosted: Fri Jul 15, 2016 11:20 pm
by omardex
http://www.silverwing-vfx.de/free_stuff.html


Greetings.

Raphael Rau Posted a Material scene where he created some metals, specially the Gold one, I hope this could be useful.

Best Regards.

Omar.