Metal material scripted node

Forum for OctaneRender Lua scripting examples, discussion and support.
User avatar
roeland
OctaneRender Team
Posts: 1823
Joined: Wed Mar 09, 2011 10:09 pm

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 1104 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.
Tugpsx
Licensed Customer
Posts: 1150
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL
Contact:

Super nice so we can go wild and add this database to a pick list.

A complete IOR list
Win 11 64GB | NVIDIA RTX3060 12GB
User avatar
Elvissuperstar007
Licensed Customer
Posts: 2506
Joined: Thu May 20, 2010 8:20 am
Location: Ukraine/Russia
Contact:

better to add this feature in octane
win 7 /64x C2Quad 6600 2.4/ Nvidia 9800 GX2 1gb 512 bit + Asus 480 GTX/ DDR2 8Gb / NVIDIA 460 GTX 2GB/2x NVIDIA 580 GTX 3GB
Page octane render " В Контакте " http://vkontakte.ru/club17913093
polytek
Licensed Customer
Posts: 95
Joined: Sun Mar 20, 2011 12:27 pm
Location: Belgium

I agree, add it standard to octane...pretty please

Regards,
Poly
win 8.2 / 64 / systemmem 27Gb / gtx 750Ti & asus stricks Gtx 780 6Gb
User avatar
Jaberwocky
Licensed Customer
Posts: 976
Joined: Tue Sep 07, 2010 3:03 pm

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 ;)
CPU:-AMD 1055T 6 core, Motherboard:-Gigabyte 990FXA-UD3 AM3+, Gigabyte GTX 460-1GB, RAM:-8GB Kingston hyper X Genesis DDR3 1600Mhz D/Ch, Hard Disk:-500GB samsung F3 , OS:-Win7 64bit
User avatar
bepeg4d
Octane Guru
Posts: 10340
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

wow thanks for sharing, Lua scripted graph nodes are unbelievably powerfull :o
ciao beppe
prodviz
Licensed Customer
Posts: 543
Joined: Sun Jul 14, 2013 6:00 pm

Cool, cheers.

Agree, this would be a great addition to the default package or shader library.
User avatar
stratified
OctaneRender Team
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

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
User avatar
Jaberwocky
Licensed Customer
Posts: 976
Joined: Tue Sep 07, 2010 3:03 pm

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.
CPU:-AMD 1055T 6 core, Motherboard:-Gigabyte 990FXA-UD3 AM3+, Gigabyte GTX 460-1GB, RAM:-8GB Kingston hyper X Genesis DDR3 1600Mhz D/Ch, Hard Disk:-500GB samsung F3 , OS:-Win7 64bit
User avatar
roeland
OctaneRender Team
Posts: 1823
Joined: Wed Mar 09, 2011 10:09 pm

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
Post Reply

Return to “Lua Scripting”