Create random textures over instances

Forum for OctaneRender Lua scripting examples, discussion and support.
calus
Licensed Customer
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

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
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

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.
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
calus
Licensed Customer
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

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
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

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?
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
calus
Licensed Customer
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

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
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

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.
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
bepeg4d
Octane Guru
Posts: 10340
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

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
roeland
OctaneRender Team
Posts: 1823
Joined: Wed Mar 09, 2011 10:09 pm

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 687 times
--
Roeland
calus
Licensed Customer
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

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 770 times
and here is a test scene with the script node inside:
TextureScatterDemo.orbx
(87.95 KiB) Downloaded 737 times
Change the File List to textures path on your disk, as they can't be included in the the ORBX ...
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
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

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:
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
Post Reply

Return to “Lua Scripting”