Page 1 of 1

Lua scripts with SketchUp 3.06.1.4 Test Release

PostPosted: Sat May 27, 2017 3:48 pm
by bepeg4d
Hi all,
one of the most interesting features introduced by Octane Render for SketchUp 3.06.1.4 Test Release is the possibility to use Lua scripts and Lua Scripted Graph nodes inside Sketchup, to greatly expand and automate your workflow.
First of all, you can start by trying the default Standalone scripts like Daylight or the Turntable animation scripts:
su3.6.1_05.JPG

Note: you need to select the Default View Render Target node with a Daylight node before performing the Daylight animation script, while you need to firstly center the view with the proper picker, and correct the Up-verctor value to 0, 1, 0 before performing th Turntable script:
Screen Shot 2017-05-27 at 17.23.26.jpg


The Batch Rendering script will become useful when we could have different Render Targets in the scene, then we will be able to render multiple RT in one time.


To add new scripts, the best way is to open Octane viewport, then go to menu File/Preferences/Application and change the path of the Lua scripts directory, to easily access the folder, or specify a new more comfortable one:

Then you can check the Lua script repository discussion to find out some interesting scripts.
Note that this feature is just been added, so some errors can occor. Please, let us know about any issue discovered.


Texture2glossy
Here is one of my simple scripts modified to work with Sketchup plugin, it creates a Glossy material starting from a Diffuse image texture path. It is possible to specify the Bump and Specular/Roughness suffix to automatically find the textures, if not found, the diffuse texture in grayscale mode will be used:
su3.6.1_07.JPG

Texture2glossy.lua
(14.35 KiB) Downloaded 529 times

Happy rendering :)
ciao beppe

Re: Lua scripts with SketchUp 3.06.1.4 Test Release

PostPosted: Sat May 27, 2017 7:01 pm
by smicha
Thank you. I am testing the texture scatter LUA now and works great in the scripted graph. The only issue for now is the SU Octane stability. It crashes whenever I copy any component when rendering is on.

Re: Lua scripts with SketchUp 3.06.1.4 Test Release

PostPosted: Tue May 30, 2017 2:32 am
by azen
smicha wrote:Thank you. I am testing the texture scatter LUA now and works great in the scripted graph. The only issue for now is the SU Octane stability. It crashes whenever I copy any component when rendering is on.



Hi,

Just to clarify, is this issue is to do with grouped geometry? This issue is currently under investigation, as this appears to be a consistent issue among testers.

Cheers,
Azen

Re: Lua scripts with SketchUp 3.06.1.4 Test Release

PostPosted: Tue May 30, 2017 5:46 am
by smicha
azen wrote:
smicha wrote:Thank you. I am testing the texture scatter LUA now and works great in the scripted graph. The only issue for now is the SU Octane stability. It crashes whenever I copy any component when rendering is on.



Hi,

Just to clarify, is this issue is to do with grouped geometry? This issue is currently under investigation, as this appears to be a consistent issue among testers.

Cheers,
Azen


Yes - grouped and as components. It crashes but not necessarily all the time.