Metal material scripted node

Forums: Metal material scripted node
Forum for OctaneRender Lua scripting examples, discussion and support.

Metal material scripted node

Postby roeland » Mon Dec 15, 2014 11:42 pm

roeland Mon Dec 15, 2014 11:42 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 632 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.
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1741
Joined: Wed Mar 09, 2011 10:09 pm

Re: Metal material scripted node

Postby Tugpsx » Tue Dec 16, 2014 5:02 am

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

A complete IOR list
Dell Win Vista 32 | NVIDIA Quadro NVS135M | Core2 Duo T7500 2.20GHz | 4GB
CyberPowerPC Win 7 64| NVIDIA GTX660Ti (3G) GTX480(1.5G) | 16GB
Tugpsx
Licensed Customer
Licensed Customer
 
Posts: 1059
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL

Re: Metal material scripted node

Postby Elvissuperstar007 » Tue Dec 16, 2014 7:47 am

Elvissuperstar007 Tue Dec 16, 2014 7:47 am
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
User avatar
Elvissuperstar007
Licensed Customer
Licensed Customer
 
Posts: 2295
Joined: Thu May 20, 2010 8:20 am
Location: Ukraine/Russia

Re: Metal material scripted node

Postby polytek » Tue Dec 16, 2014 8:13 am

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

Regards,
Poly
win 8.2 / 64 / systemmem 27Gb / gtx 750Ti & asus stricks Gtx 780 6Gb
polytek
Licensed Customer
Licensed Customer
 
Posts: 95
Joined: Sun Mar 20, 2011 12:27 pm
Location: Belgium

Re: Metal material scripted node

Postby Jaberwocky » Tue Dec 16, 2014 8:58 am

Jaberwocky Tue Dec 16, 2014 8:58 am
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
Jaberwocky
Licensed Customer
Licensed Customer
 
Posts: 976
Joined: Tue Sep 07, 2010 3:03 pm

Re: Metal material scripted node

Postby bepeg4d » Tue Dec 16, 2014 12:03 pm

bepeg4d Tue Dec 16, 2014 12:03 pm
wow thanks for sharing, Lua scripted graph nodes are unbelievably powerfull :o
ciao beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 6762
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Metal material scripted node

Postby prodviz » Tue Dec 16, 2014 1:26 pm

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

Agree, this would be a great addition to the default package or shader library.
prodviz
Licensed Customer
Licensed Customer
 
Posts: 543
Joined: Sun Jul 14, 2013 6:00 pm

Re: Metal material scripted node

Postby stratified » Tue Dec 16, 2014 7:19 pm

stratified Tue Dec 16, 2014 7:19 pm
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
stratified
OctaneRender Team
OctaneRender Team
 
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

Re: Metal material scripted node

Postby Jaberwocky » Tue Dec 16, 2014 11:00 pm

Jaberwocky Tue Dec 16, 2014 11:00 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
Jaberwocky
Licensed Customer
Licensed Customer
 
Posts: 976
Joined: Tue Sep 07, 2010 3:03 pm

Re: Metal material scripted node

Postby roeland » Fri Dec 19, 2014 3:16 am

roeland Fri Dec 19, 2014 3:16 am
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
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1741
Joined: Wed Mar 09, 2011 10:09 pm
Next

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 1 guest

Thu Dec 12, 2019 12:22 am [ UTC ]