Page 1 of 4

Metal material scripted node

PostPosted: Mon Dec 15, 2014 11:42 pm
by roeland
Scripted graphs can be used to simulate other types of material nodes. The following script simulates a metal using its complex index of refraction.

First a note about the index of refraction. The index input on a specular material is a real value, which can be used to simulate dielectric materials. For instance common glass has an IOR around 1.45 and water has 1.33.

For metals you may also find an IOR, for instance you may find Gold has an IOR of 0.47. This number alone is useless, as metals have a complex index of refraction. You should get two values, called N and K. These are the real and imaginary parts of the IOR. For gold these values are around 0.47 and 2.25.

Also for some metals, like gold, the IOR is dependent on the wavelength. The script assumes the given IOR is for green light (around 550 nm).

Download here:

metal.orbx
(13.97 KiB) Downloaded 684 times


Using the script:

The scripted node has two inputs determining the glossy reflectance:

The color can be used to give the metal some color. The brightness of the color will be changed according to the IOR. Most metals will be gray, so you can leave the color input white. Only RGB colors and greyscale colors are supported.

The index of refraction are the n and k values you find for the metal.

The rest of the inputs are the same as the inputs on glossy materials.

Re: Metal material scripted node

PostPosted: Tue Dec 16, 2014 5:02 am
by Tugpsx
Super nice so we can go wild and add this database to a pick list.

A complete IOR list

Re: Metal material scripted node

PostPosted: Tue Dec 16, 2014 7:47 am
by Elvissuperstar007
better to add this feature in octane

Re: Metal material scripted node

PostPosted: Tue Dec 16, 2014 8:13 am
by polytek
I agree, add it standard to octane...pretty please

Regards,
Poly

Re: Metal material scripted node

PostPosted: Tue Dec 16, 2014 8:58 am
by Jaberwocky
I can't seem to get this to work in V1.55 Standalone

Is this because it uses a scripted Nodes?

If this is the case, any chance of a version for 1.55 ?

Cheers ...Jaba ;)

Re: Metal material scripted node

PostPosted: Tue Dec 16, 2014 12:03 pm
by bepeg4d
wow thanks for sharing, Lua scripted graph nodes are unbelievably powerfull :o
ciao beppe

Re: Metal material scripted node

PostPosted: Tue Dec 16, 2014 1:26 pm
by prodviz
Cool, cheers.

Agree, this would be a great addition to the default package or shader library.

Re: Metal material scripted node

PostPosted: Tue Dec 16, 2014 7:19 pm
by stratified
Jaberwocky wrote:I can't seem to get this to work in V1.55 Standalone

Is this because it uses a scripted Nodes?

If this is the case, any chance of a version for 1.55 ?

Cheers ...Jaba ;)


Scripted nodegraphs is a 2.x feature -- it won't work in 1.55.

cheers,
Thomas

Re: Metal material scripted node

PostPosted: Tue Dec 16, 2014 11:00 pm
by Jaberwocky
stratified wrote:
Jaberwocky wrote:I can't seem to get this to work in V1.55 Standalone

Is this because it uses a scripted Nodes?

If this is the case, any chance of a version for 1.55 ?

Cheers ...Jaba ;)


Scripted nodegraphs is a 2.x feature -- it won't work in 1.55.

cheers,
Thomas



Ok, thanks Thomas...I suspected as much.

Re: Metal material scripted node

PostPosted: Fri Dec 19, 2014 3:16 am
by roeland
Tugpsx wrote:Super nice so we can go wild and add this database to a pick list.

A complete IOR list


You can use the indices in this list in the specular material node for things like glass or liquids. The values for metals are not useful because it doesn't include the K values.

--
Roeland