Octane standalone is dead?

Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)
User avatar
stratified
OctaneRender Team
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

The weak link here (again) is generating the OCS file, it doesn't matter if you generate it once or multiple times. It's still a brittle approach.

It's a bit hacky but you could actually use lua in the exporter. To generate your initial project, you set it up in lua and save it out (lua can write an OCS file and you're sure it's 100% correct). The exporter script would still be in Python. All it does is drive Octane (by feeding it the script via command lineoctane.exe --script) and interface with blender. The lua scripts would just be strings embedded in Python It's not going to be pretty but it will do the job and it would be rock solid over several releases.

So you would write a scripts for the functionality you want (setting up a project and relinking are really trivial in lua and I could help with these), test them in the standalone. Then you glue the workflow together with your python script.

just my 2 cents.

cheers,
Thomas
User avatar
abstrax
OctaneRender Team
Posts: 5509
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

I think steveps3 is talking of recreating the behaviour of the official exporter in which case the OCS file is created by Octane.

Does this script still work
http://render.otoy.com/forum/viewtopic.php?f=32&t=1610
?

It could be used at least as a starting point.

Cheers,
Marcus
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
steveps3
Licensed Customer
Posts: 1118
Joined: Sat Aug 21, 2010 4:07 pm
Location: England

What Thomas is suggesting sounds ideal. If I can get the python script to generate a bit of LUA which in turn will generate a .OCS in the correct format then that is brilliant.

At the end of the day I am just lazy. All I want though is to be able to press a button and Octane opens with my object and the current Octane materials. i.e. generate the .obj and call Octane with either an existing project if there is one or generate a new project if there is not. Materials, not worried about those as long as the material nodes are available within Octane. I already use the other Blender script to generate scatter patterns and I can manually link those as I do already. I don't do animations so I am not worried about any of that.

Sounds like a plan.

Thomas, if you could give me some LUA that would generate a .OCS with a given name in a given directory then that would be amazing. Again, LUA, completely alien to me.
(HW) Intel i7 2600k, 16GB DDR3, MSI 560GTX ti (2GB) x 3
(SW) Octane (1.50) Blender (2.70) (exporter 2.02)
(OS) Windows 7(64)
User avatar
steveps3
Licensed Customer
Posts: 1118
Joined: Sat Aug 21, 2010 4:07 pm
Location: England

I will check out the original script. You never know it may be so simple that it actually does what I want. The .OCS doesn't need to be 100% correct just as long as it will open in Octane. When I save the project it will write the correct .OCS.
(HW) Intel i7 2600k, 16GB DDR3, MSI 560GTX ti (2GB) x 3
(SW) Octane (1.50) Blender (2.70) (exporter 2.02)
(OS) Windows 7(64)
User avatar
pixelrush
Licensed Customer
Posts: 1618
Joined: Mon Jan 11, 2010 7:11 pm
Location: Nelson, New Zealand

Looking at Lionel's script it appears he uses a template and just inserts values to it.
It ought to be editable for the new ocs but its a fair task.
The difficulty is I think that Octane only considers used pins so the writing out is going to need to be more conditional than it is now. Of course it may all be too much work if soon Otoy change the ocs format.
Using python to run lua to write the ocs might be the best workaround.
i7-3820 @4.3Ghz | 24gb | Win7pro-64
GTS 250 display + 2 x GTX 780 cuda| driver 331.65
Octane v1.55
User avatar
steveps3
Licensed Customer
Posts: 1118
Joined: Sat Aug 21, 2010 4:07 pm
Location: England

Really? I thought that Octane picked up its pins initially from the .OBJ and .OCS file. If your object requires 4 materials then you get 4 pins. This is certainly what happens if you manually add a .OBJ to an existing octane project.

So the new script would be very simple. Generate the .OCS if required, regenerate the .OBJ file, call Octane teling it to render your .OCS. In my head this would initially open with a completely blank project. You would then add a geometry node and link in your .OBJ. You then amend as required and save/close Octane. Next time around Blender does the same thing. The .OCS already exists so it leaves it along, regenerates the .OBJ and calls Octane. This time the .OCS has the geometry etc so it just starts rendering. Any new materials would have node pins.

Is this not how it works?
(HW) Intel i7 2600k, 16GB DDR3, MSI 560GTX ti (2GB) x 3
(SW) Octane (1.50) Blender (2.70) (exporter 2.02)
(OS) Windows 7(64)
User avatar
pixelrush
Licensed Customer
Posts: 1618
Joined: Mon Jan 11, 2010 7:11 pm
Location: Nelson, New Zealand

I mean Lionel is producing a list of everything from his template regardless - this-true, this-true, this-false, this-0.1 0.4 0.5, this-false, this-true...
the new format only has what is actually present/needed, say. this-0.1, 0.4, 0.5
We need to cut all the other stuff out of the writing.
Last edited by pixelrush on Thu Jan 09, 2014 9:10 am, edited 1 time in total.
i7-3820 @4.3Ghz | 24gb | Win7pro-64
GTS 250 display + 2 x GTX 780 cuda| driver 331.65
Octane v1.55
User avatar
abstrax
OctaneRender Team
Posts: 5509
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

As a reference, here are the original exporter "specs" after which the official exporters were written:
exporter_guidelines.txt
(23.23 KiB) Downloaded 221 times
This is the corresponding UI layout that was requested originally:
exporter_UI_example_22b.png
I think the exporter workflow is also described in the manual (see http://render.otoy.com/downloads/Octane ... l_1_20.pdf, starting on page36).

Since then we have added a bunch of more command line options. This is the full list of them:

Code: Select all

USAGE: 

   octane  [--script <string>] [--benchmark] [--no-opengl] [-t <node name>]
           [-m <string>] [-R <node name=filename>] ...  [-r <filename>] [-l
           <filename>] [-n <filename>] [--imager-exposure <float>]
           [--daylight-sundir-z <float>] [--daylight-sundir-y <float>]
           [--daylight-sundir-x <float>] [--cam-lensshift-right <float>]
           [--cam-lensshift-up <float>] [--cam-aperture <float>]
           [--cam-focaldepth <float>] [--cam-scale <float>] [--cam-fov
           <float>] [--cam-motion-up-z <float>] [--cam-motion-up-y <float>]
           [--cam-motion-up-x <float>] [--cam-motion-target-z <float>]
           [--cam-motion-target-y <float>] [--cam-motion-target-x <float>]
           [--cam-motion-pos-z <float>] [--cam-motion-pos-y <float>]
           [--cam-motion-pos-x <float>] [--cam-up-z <float>] [--cam-up-y
           <float>] [--cam-up-x <float>] [--cam-target-z <float>]
           [--cam-target-y <float>] [--cam-target-x <float>] [--cam-pos-z
           <float>] [--cam-pos-y <float>] [--cam-pos-x <float>] [-q] [-g
           <int>] ...  [-s <int>] [--output-exr-tm <filename>]
           [--output-exr <filename>] [--output-png16 <filename>] [-o
           <filename>] [--film-height <int>] [--film-width <int>] [-e] [--]
           [--version] [-h] <filename>


Where: 

   --script <string>
     Filename of the script to execute.

   --benchmark
     Run the benchmark suite.

   --no-opengl
     Force software display

   -t <node name>,  --target-node <node name>
     Name of the render target node to render

   -m <string>,  --mesh-node <string>
     Name of the mesh node to render.

   -R <node name=filename>,  --relink <node name=filename>  (accepted
      multiple times)
     Relink additional mesh nodes in the file.

   -r <filename>,  --relink-meshnode <filename>
     Load the given OBJ mesh file into the mesh node given with
     --mesh-node.

   -l <filename>,  --link-meshnode <filename>
     Create a new mesh node from the given OBJ mesh file

   -n <filename>,  --new <filename>
     Create a new OCS project file from given command line arguments

   --imager-exposure <float>
     Imager Exposure Amount

   --daylight-sundir-z <float>
     Daylight Sun Direction Vector Z Component

   --daylight-sundir-y <float>
     Daylight Sun Direction Vector Y Component

   --daylight-sundir-x <float>
     Daylight Sun Direction Vector X Component

   --cam-lensshift-right <float>
     Lens Shift Right

   --cam-lensshift-up <float>
     Lens Shift Up

   --cam-aperture <float>
     Camera Aperture Radius

   --cam-focaldepth <float>
     Camera Focal Depth

   --cam-scale <float>
     Orthographic Camera Horizontal Scale

   --cam-fov <float>
     Camera Horizontal FOV (degrees)

   --cam-motion-up-z <float>
     Camera Up Motion 2nd Vector Z Component

   --cam-motion-up-y <float>
     Camera Up Motion 2nd Vector Y Component

   --cam-motion-up-x <float>
     Camera Up Motion 2nd Vector X Component

   --cam-motion-target-z <float>
     Camera Target Motion 2nd Position Z Component

   --cam-motion-target-y <float>
     Camera Target Motion 2nd Position Y Component

   --cam-motion-target-x <float>
     Camera Target Motion 2nd Position X Component

   --cam-motion-pos-z <float>
     Camera Motion 2nd Position Z Component

   --cam-motion-pos-y <float>
     Camera Motion 2nd Position Y Component

   --cam-motion-pos-x <float>
     Camera Motion 2nd Position X Component

   --cam-up-z <float>
     Camera Up Vector Z Component

   --cam-up-y <float>
     Camera Up Vector Y Component

   --cam-up-x <float>
     Camera Up Vector X Component

   --cam-target-z <float>
     Camera Target Position Z Component

   --cam-target-y <float>
     Camera Target Position Y Component

   --cam-target-x <float>
     Camera Target Position X Component

   --cam-pos-z <float>
     Camera Position Z Component

   --cam-pos-y <float>
     Camera Position Y Component

   --cam-pos-x <float>
     Camera Position X Component

   -q,  --quiet
     Start Application without splash and minimized window

   -g <int>,  --gpu <int>  (accepted multiple times)
     add GPU device to use for rendering (0 = first)

   -s <int>,  --samples <int>
     Maximum number of samples per pixel (maxsamples)

   --output-exr-tm <filename>
     Output tonemapped EXR image file when maxsamples is reached

   --output-exr <filename>
     Output EXR image file when maxsamples is reached

   --output-png16 <filename>
     Output 16-bit PNG image file when maxsamples is reached

   -o <filename>,  --output-png <filename>
     Output PNG image file when maxsamples is reached

   --film-height <int>
     Film height

   --film-width <int>
     Film width

   -e,  --exit
     Close the application when rendering is done

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.

   <filename>
     .OCS Project scene file
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
pixelrush
Licensed Customer
Posts: 1618
Joined: Mon Jan 11, 2010 7:11 pm
Location: Nelson, New Zealand

right so that seals it! far too much work! :o
we should do a Python+Lua hack instead...
i7-3820 @4.3Ghz | 24gb | Win7pro-64
GTS 250 display + 2 x GTX 780 cuda| driver 331.65
Octane v1.55
User avatar
steveps3
Licensed Customer
Posts: 1118
Joined: Sat Aug 21, 2010 4:07 pm
Location: England

Ok, so getting back to the LUA script. I get python to write the LUA script and then what? Can I then pass that script to Octane via the command line and get it to run the script? Is that the [--script <string>] parameter?

So
when the .OCS doesn't exist, generate the script, call Octane with the --script flag
when the .ocs does exist then call Octane with the .OCS filename


Could I not just use this instead? Wouldn't this just make it future proof?
-n <filename>, --new <filename>
Create a new OCS project file from given command line arguments
(HW) Intel i7 2600k, 16GB DDR3, MSI 560GTX ti (2GB) x 3
(SW) Octane (1.50) Blender (2.70) (exporter 2.02)
(OS) Windows 7(64)
Post Reply

Return to “Blender”