Hi, just wondering of anyone has or can make a script to batch convert a folder full of obj files into orbx format?
With most users having accumulated libraries of hundreds of obj files over the years, this would be pretty tedious to do manually, but being so repetitive, it seems a logical candidate for automation?
Lua script to batch convert obj to orbx?
Octane Render for ArchiCAD 22 plugin v4.x | Octane Standalone 4.x
( 2x Nvidia 980 Ti) x 6MB VRAM | Intel I7 4470K | 32GB RAM | Windows 10
( 2x Nvidia 980 Ti) x 6MB VRAM | Intel I7 4470K | 32GB RAM | Windows 10
Hi,
did you see this old script?
viewtopic.php?f=73&t=37617#p165882
Let me know if you have issues with it.
ciao beppe
did you see this old script?
viewtopic.php?f=73&t=37617#p165882
Let me know if you have issues with it.
ciao beppe
Hi thanks bepeg4dbepeg4d wrote:Hi,
did you see this old script?
viewtopic.php?f=73&t=37617#p165882
Let me know if you have issues with it.
ciao beppe
Just scanning through that thread, it looks like the script was not working? not for current version of octane? & not for creating a bunch of individual orbx files?
I know almost nothing about Octane standalone or really the concepts it uses (I am just a wysiwyg ArchiCAD plugin user) - but from another thread got the impression an orbx file using an obj mesh needs a placement and geometry out node added by any such script for it to be usable as a proxy?
Octane Render for ArchiCAD 22 plugin v4.x | Octane Standalone 4.x
( 2x Nvidia 980 Ti) x 6MB VRAM | Intel I7 4470K | 32GB RAM | Windows 10
( 2x Nvidia 980 Ti) x 6MB VRAM | Intel I7 4470K | 32GB RAM | Windows 10
A basic script to create an ORBX file would look like this:
Which can be executed from the command line (see docs):
You can use
-Roeland
Code: Select all
-- get filename from the first script argument
-- arg contains the arguments passed in via the command line using the -a switch
local obj = arg[1]
local orbx = obj:gsub("%.%w%w%w%w?$", ".orbx")
local name = octane.file.getFileNameWithoutExtension(obj)
-- create the nodes
local G = octane.nodegraph.createRootGraph(name)
local M = octane.node.create{type=octane.NT_GEO_MESH, name=name, position={0, 0}, graphOwner=G}
M:setAttribute("filename", obj)
local P = octane.node.create{type=octane.NT_GEO_PLACEMENT, name=name.." position", position={0, 50}, graphOwner=G}
P:connectTo("geometry", M)
-- export to an ORBX file in the same directory
G:exportToFile(orbx)
print("exported to "..orbx)
Code: Select all
octane --stop-after-script --script export.lua -a path/to/mesh.obj
octane.file.listDirectory
to loop through a directory:Code: Select all
for _, obj in ipairs(octane.file.listDirectory(path, true, false, true, recursive, "*.obj")) do
-- do stuff
end
Thanks Roeland!
Octane Render for ArchiCAD 22 plugin v4.x | Octane Standalone 4.x
( 2x Nvidia 980 Ti) x 6MB VRAM | Intel I7 4470K | 32GB RAM | Windows 10
( 2x Nvidia 980 Ti) x 6MB VRAM | Intel I7 4470K | 32GB RAM | Windows 10
Is it possible for someone to explain how to load the script in OCTANE Standalone.
Seems that that script is in pieces. Is it possible to put as a whole correctly???
Unfortunately I have absolutely no idea with this script finction...
Thank you Archiprime.
Seems that that script is in pieces. Is it possible to put as a whole correctly???
Unfortunately I have absolutely no idea with this script finction...
Thank you Archiprime.
ASUS Z10 PE-D8 WS/2 x XEON E5-2680 V4/64GB RAM/1xQuadro M5000/2x NVIDIA GTX TITAN Pascal/ Windows 10/ Archicad 20
Hi Jasonr, it may need to be someone other than myself who advises (perhaps Roeland?) - I got side tracked by actual paying work, so never managed to follow up or delve further
Octane Render for ArchiCAD 22 plugin v4.x | Octane Standalone 4.x
( 2x Nvidia 980 Ti) x 6MB VRAM | Intel I7 4470K | 32GB RAM | Windows 10
( 2x Nvidia 980 Ti) x 6MB VRAM | Intel I7 4470K | 32GB RAM | Windows 10