Load materials from LocalDB or file system

Forum for OctaneRender Lua scripting examples, discussion and support.
Post Reply
Xantiah
Posts: 6
Joined: Tue Jul 11, 2017 9:42 pm
Location: Wales
Contact:

Hi,
I'm working on a solution to render images in batch mode. To do that I'm importing all geometry (multiple meshes in obj format), settings up scene, creating nodes etc. Unfortunately during that process I hit an issue :

I don't know how to load materials. I got materials stored on my disk in orbx format, but have no idea how to load them. Btw. Is it possible to load them from LocalDB?

I know it's possible to download materials from LiveDB, but that's just not something I would be keen to do (my materials are huge).

Thanks
User avatar
roeland
OctaneRender Team
Posts: 1822
Joined: Wed Mar 09, 2011 10:09 pm

Import from ORBX or OCS/OCM file:

Code: Select all

local rootgraph = octane.nodegraph.createRootGraph(name)
octane.nodegraph.importFromFile(rootgraph, path)
Then you can copy out of the root node graph, similar to what you do with liveDB.
Post Reply

Return to “Lua Scripting”