Create random textures over instances

Forums: Create random textures over instances
Forum for OctaneRender Lua scripting examples, discussion and support.

Re: Create random textures over instances

Postby calus » Wed Mar 22, 2017 9:02 am

calus Wed Mar 22, 2017 9:02 am
smicha wrote:Huge wish to OTOY - please code it into Octane nodes, not LUA.

Sorry Smicha if this is not your issue but you can already have random textures on instances with Octane nodes:

Plug all textures at different value in a gradient node set to interpolation none,
then add a random node in the input texture of the gradient node,
that's it :)
(obviously this is not scanning automatically a folder, textures nodes still have to be created by hand)


Also LUA support /scripted graph support in the plugins, is coming in 3.06 or is maybe already here:
abstrax wrote:Switch from LuaJIT 5.1 to Lua 5.3
Since LuaJIT isn't developed anymore and still only uses 32bit memory management, we had to switch to "normal" Lua. The missing FFI functionality has been added via a separate FFI module that is available in Octane out-of-the-box. This will finally allow Lua script graphs to be used in Octane plugins on all platforms.

viewtopic.php?f=33&t=60014
Pascal ANDRE
--------------------
Maya 2018.4, Windows 7, 128 GB RAM
4x GTX 1070, driver 390.77
--------------------

--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
--------------------
calus
Licensed Customer
Licensed Customer
 
Posts: 1164
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: Create random textures over instances

Postby smicha » Wed Mar 22, 2017 9:16 am

smicha Wed Mar 22, 2017 9:16 am
calus wrote:
smicha wrote:Huge wish to OTOY - please code it into Octane nodes, not LUA.

Sorry Smicha if this is not your issue but you can already have random textures on instances with Octane nodes:

Plug all textures at different value in a gradient node set to interpolation none,
then add a random node in the input texture of the gradient node,
that's it :)
(obviously this is not scanning automatically a folder, textures nodes still have to be created by hand)


Also LUA support /scripted graph support in the plugins, is coming in 3.06 or is maybe already here:
abstrax wrote:Switch from LuaJIT 5.1 to Lua 5.3
Since LuaJIT isn't developed anymore and still only uses 32bit memory management, we had to switch to "normal" Lua. The missing FFI functionality has been added via a separate FFI module that is available in Octane out-of-the-box. This will finally allow Lua script graphs to be used in Octane plugins on all platforms.

viewtopic.php?f=33&t=60014


I am talking about a node that would replace the script I gave idea to.
Win7, Modo 10.1, Octane for Modo and Sketchup, nVidia latest, TITAN+3x780 6GB, 2600K, P8P67WS, 32GB, 1350W
SMH10, EK, Airplex_480, SR1_560, 20xNB_PL2, 2xD5, Aquaero 6XT
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
smicha
Licensed Customer
Licensed Customer
 
Posts: 3133
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Re: Create random textures over instances

Postby calus » Wed Mar 22, 2017 9:28 am

calus Wed Mar 22, 2017 9:28 am
smicha wrote:I am talking about a node that would replace the script I gave idea to.

oh I get it, you want a scripted node graph with the exact same features as the script...
Pascal ANDRE
--------------------
Maya 2018.4, Windows 7, 128 GB RAM
4x GTX 1070, driver 390.77
--------------------

--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
--------------------
calus
Licensed Customer
Licensed Customer
 
Posts: 1164
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: Create random textures over instances

Postby smicha » Wed Mar 22, 2017 9:29 am

smicha Wed Mar 22, 2017 9:29 am
calus wrote:
smicha wrote:I am talking about a node that would replace the script I gave idea to.

oh I get it, you want a scripted node graph with the exact same features as the script...


Yes - that would work instantly when changing parameters - can you help?
Win7, Modo 10.1, Octane for Modo and Sketchup, nVidia latest, TITAN+3x780 6GB, 2600K, P8P67WS, 32GB, 1350W
SMH10, EK, Airplex_480, SR1_560, 20xNB_PL2, 2xD5, Aquaero 6XT
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
smicha
Licensed Customer
Licensed Customer
 
Posts: 3133
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Re: Create random textures over instances

Postby calus » Wed Mar 22, 2017 9:32 am

calus Wed Mar 22, 2017 9:32 am
smicha wrote:Yes - that would work instantly when changing parameters - can you help?

Yes I can help, except I have no idea how to do the scanning path folder part in a scripted node...
Maybe Bepe can give us some advices here ?
Pascal ANDRE
--------------------
Maya 2018.4, Windows 7, 128 GB RAM
4x GTX 1070, driver 390.77
--------------------

--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
--------------------
calus
Licensed Customer
Licensed Customer
 
Posts: 1164
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: Create random textures over instances

Postby smicha » Wed Mar 22, 2017 2:15 pm

smicha Wed Mar 22, 2017 2:15 pm
calus wrote:
smicha wrote:Yes - that would work instantly when changing parameters - can you help?

Yes I can help, except I have no idea how to do the scanning path folder part in a scripted node...
Maybe Bepe can give us some advices here ?



I PMed beppe. Let's see.
Win7, Modo 10.1, Octane for Modo and Sketchup, nVidia latest, TITAN+3x780 6GB, 2600K, P8P67WS, 32GB, 1350W
SMH10, EK, Airplex_480, SR1_560, 20xNB_PL2, 2xD5, Aquaero 6XT
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
smicha
Licensed Customer
Licensed Customer
 
Posts: 3133
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Re: Create random textures over instances

Postby bepeg4d » Wed Mar 22, 2017 5:34 pm

bepeg4d Wed Mar 22, 2017 5:34 pm
Hi guys,
sorry I'm very busy with Sketchup beta testing, about the scanning path folder part, maybe you can have a look at this other scripted graph for starting:
viewtopic.php?f=73&t=45692
if you can share a starting version of the script, I can have a look as soon as I can :)
ciao beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 6019
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Create random textures over instances

Postby roeland » Thu Mar 23, 2017 3:16 am

roeland Thu Mar 23, 2017 3:16 am
Yes we haven't implemented an input type for scripted graphs which can take multiple file names. Of course you can make multiple single-file inputs but I suspect that will be too cumbersome to use.

The script already fills up a node graph so with some modification it can be converted to a scripted graph. The biggest changes is removing the UI and adding input pin infos.

Here's a starting point, but I haven't converted all the settings to input pins yet:
random scatter graph.lua
(9.03 KiB) Downloaded 284 times


--
Roeland
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1700
Joined: Wed Mar 09, 2011 10:09 pm

Re: Create random textures over instances

Postby calus » Sun Mar 26, 2017 7:16 pm

calus Sun Mar 26, 2017 7:16 pm
roeland wrote:Here's a starting point, but I haven't converted all the settings to input pins

Thank roeland :) ,

I have added the input pins (grossly).

Also, as changing one input was randomizing all other inputs,
I have changed Randomseed to be the input seed value.

Here is the new script graph:
random scatter graph.zip
(3.16 KiB) Downloaded 331 times


and here is a test scene with the script node inside:
TextureScatterDemo.orbx
(87.95 KiB) Downloaded 307 times


octane_2017-03-26_20-41-53.jpg
Change the File List to textures path on your disk, as they can't be included in the the ORBX ...


@Smicha,
Still not in a easy usable state, but some preliminary feedback ?

_
Pascal ANDRE
--------------------
Maya 2018.4, Windows 7, 128 GB RAM
4x GTX 1070, driver 390.77
--------------------

--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
--------------------
calus
Licensed Customer
Licensed Customer
 
Posts: 1164
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: Create random textures over instances

Postby smicha » Sat May 27, 2017 5:37 pm

smicha Sat May 27, 2017 5:37 pm
calus wrote:
roeland wrote:Here's a starting point, but I haven't converted all the settings to input pins

Thank roeland :) ,

I have added the input pins (grossly).

Also, as changing one input was randomizing all other inputs,
I have changed Randomseed to be the input seed value.

Here is the new script graph:
random scatter graph.zip


and here is a test scene with the script node inside:
TextureScatterDemo.orbx


octane_2017-03-26_20-41-53.jpg


@Smicha,
Still not in a easy usable state, but some preliminary feedback ?

_


Calus,

This is really awesome what you did!!! Fantastic job! Thank you so so much.

Marcus - we've asked about but has anything changed - any chances to see world coordinates for displacement to apply it to the script? Imagine random textures with working displacement :ugeek:
Win7, Modo 10.1, Octane for Modo and Sketchup, nVidia latest, TITAN+3x780 6GB, 2600K, P8P67WS, 32GB, 1350W
SMH10, EK, Airplex_480, SR1_560, 20xNB_PL2, 2xD5, Aquaero 6XT
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
smicha
Licensed Customer
Licensed Customer
 
Posts: 3133
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland
PreviousNext

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 1 guest

Thu Dec 13, 2018 12:36 am [ UTC ]