Page 1 of 1

Loading an .obj by Octane command line

Posted: Sun Mar 18, 2012 1:08 am
by pixelrush
Hi folks,
I need some help with something myself today.
I want to have Octane load an .obj by command line.
The instruction would come from a Shell statement in a vba macro running in Solidworks.
My question is, must I have a .ocs just to load it? and how does the command look C:/..../octane.exe - this.obj ... ? :roll:
Its not clear to me from reading the manual what the command should be.
I don't want to have Octane render, just load the .obj automatically so I can tweak materials, camera view etc and then I will start the final rendering manually when I am happy.
Thanks :)

Re: Loading an .obj by Octane command line

Posted: Sun Mar 18, 2012 6:59 am
by Tugpsx

Code: Select all

octane –e –r C:\Temp\NewGeometry.obj –m OctaneTest.obj –s 1000 –o C:\temp\test.png C:\Temp\OctaneTest.ocs
Page 134 of the manual
For example, to open a file (C:\Temp\OctaneTest.ocs),
relink the geometry (C:\Temp\NewGeometry.obj), select
the meshnode (OctaneTest.obj) and render the
frame for 1000 samples per pixel, save the render and
exit:

Re: Loading an .obj by Octane command line

Posted: Sun Mar 18, 2012 7:03 am
by pixelrush
Yeah but that's if you have a .ocs
Can I load a .obj without one?
I'm confused, maybe I should just try it... :roll:

Re: Loading an .obj by Octane command line

Posted: Tue Mar 20, 2012 3:04 am
by roeland
Use: octane -l C:\Temp\NewGeometry.obj

Use the -l option to create a new mesh node. If you specify an OCS file and use -r and -m, the OBJ file is loaded into an existing mesh node.

--
Roeland

Re: Loading an .obj by Octane command line

Posted: Wed Mar 21, 2012 3:46 am
by pixelrush
OK thanks.
This seems to work only when the .obj file is on the C: drive. Is that right? :roll:
Would be handy if could use other drives as well ;)

Re: Loading an .obj by Octane command line

Posted: Wed Mar 21, 2012 4:09 am
by roeland
It should work no matter on which station the file is located. Just give a correct relative or absolute pathname to the OBJ file. (e.g. D:\somewhere\geometry.obj, or ..\somewhereelse\test.obj).

--
Roeland

Re: Loading an .obj by Octane command line

Posted: Wed Mar 21, 2012 5:49 am
by pixelrush
Hmmmm, OK my bad. I found it won't work with spaces in the .obj path.... ;)
A bit inconsistant because the first part of the command with the path to the Octane.exe had spaces.
Be nice if I didnt have to have underscores because I have a lot of files with spaces. :roll:
Thanks for the help :geek:

Re: Loading an .obj by Octane command line

Posted: Wed Mar 21, 2012 11:37 pm
by roeland
You need to make sure your shell doesn't cut filenames with spaces into multiple arguments. Under most shells you need to put these filenames between quotes.

--
Roeland

Re: Loading an .obj by Octane command line

Posted: Thu Mar 22, 2012 12:23 am
by pixelrush
OK thanks again :)
I am a beginner in vba ;)
experiments....... :roll: