Page 5 of 7

Re: Softimage to Octane exporter

PostPosted: Sun May 09, 2010 3:28 pm
by Amplitude
ooooh , neat! :D
can't wait to use that baby in the 6.5 ...

Re: Softimage to Octane exporter

PostPosted: Sun May 09, 2010 7:37 pm
by redmotion
Love the UI - really nice layout! :) Thanks for all the hard work, face. It's nice to see Softimage getting an exporter for a renderer so early on for a change.

PS: While I was trying to write my own exporter (see below), I was considering creating an Octane material in XSI somehow (maybe a rendertree compound?). In the XSI viewports they would appear like lambert/phong materials but when you export the scene to Octane (ie: press render), it would scan the scene and use the settings on the materials to write the OCS file - meaning that everything is set in XSI and Octane ends up working as just your render view (like most other 3rd party renderers).

Would you consider something like this for a future update?

BTW This how far I got with my own exporter (animation was what I tried to get working first), I'm glad you posted yours when you did or I would I wasted quite a few days pulling my hair out over it!:-

Code: Select all
//Octane Camera/Animation Exporter
var root = ActiveSceneRoot;

//Set Variables

//Files
var MeshName = "OBJ01frames";
var MeshNodeName = "Loader";
var OCSName = "AnimationTest.ocs";

var sDirPath = "C:\\3d\\Octane\\Scenes\\AnimationTest\\";
var sFilePath = sDirPath+MeshName+".obj";
var batFilePath = sDirPath+"OBJLoad.bat";

//OBJExportSettings
var Camera = "Camera" ;
var StartFrame = 1790;
var EndFrame = 1825;
var StepFrame = 1;
var PolymshOn = true;
var SurfMshOn = false;
var CurveOn = false;
var CloudOn = false;
var TessilateOn = false;
var MaterialOn = true;
var UVOn = true;
var UserNormOn = false;

//Write OBJs
//ObjExport(sFilePath, 0, 1, StartFrame, EndFrame, StepFrame, PolymshOn, SurfMshOn, CurveOn, CloudOn, 0, TessilateOn, MaterialOn, UVOn, UserNormOn);
for (counter = StartFrame; counter <= EndFrame; counter++)
{
SetValue("PlayControl.Current", counter, null);

sFilePath = sDirPath+MeshName + counter.toString(10)+ ".obj";
ObjExport(sFilePath, null, null, null, null, null, null, null, null, null, 0, false, null, null, false);
}

//Set variables for bat file

var Samples = 256;
var ExitOnEnd = true;
var Filename = "file00";

//Write BAT file
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile(batFilePath, true);
var counter = 0;
logmessage("Write BATfile start.");
for (counter = StartFrame; counter < EndFrame; counter++)
{
a.WriteLine("octane -e -m " + MeshNodeName + " -r " + sDirPath + MeshName + counter.toString(10) + ".obj -s " + Samples.toString(10) + " --output-png " + sDirPath + MeshName + counter.toString(10) + ".png  " + sDirPath+OCSName);
}
logmessage("Write BATfile end.");
a.Close();

Re: Softimage to Octane exporter

PostPosted: Sun May 09, 2010 9:00 pm
by face
redmotion wrote:Love the UI - really nice layout! :) Thanks for all the hard work, face. It's nice to see Softimage getting an exporter for a renderer so early on for a change.

PS: While I was trying to write my own exporter (see below), I was considering creating an Octane material in XSI somehow (maybe a rendertree compound?). In the XSI viewports they would appear like lambert/phong materials but when you export the scene to Octane (ie: press render), it would scan the scene and use the settings on the materials to write the OCS file - meaning that everything is set in XSI and Octane ends up working as just your render view (like most other 3rd party renderers).

Would you consider something like this for a future update?

[size=85]BTW This how far I got with my own exporter (animation was what I tried to get working first), I'm glad you posted yours when you did or I would I wasted quite a few days pulling my hair out over it!:-

My first version have created a tmp.obj(simple cube) with the first used material from the exported mesh, a tmp.mtl and a modified tmp.ocs with the first used material again.
To render it, i have launched the octane.exe, loaded the tmp.ocs and use the -m option to change the tmp.obj with the exported one.
So i have the right materials in the ocs.
The new one have another workflow...

For animation, i lanched the octane.exe and checked the running processes. When the octane.exe process was not running, this tell me octane was finish, i exported the same thing again. Frame for frame till the anim was finisch...

I know, with that technique(i mean the modified ocs), there is no limit to change anything in the scene you want.
The drawback is, is the ocs changed with future releases, it would cost more work as simply insert a new variable in the UI...

I don´t know, which changes in future are coming, but i think, no material ex/import...

I can post my exporter too, but i think you don´t want to read 1500 lines of c++ ;)

face...

Re: Softimage to Octane exporter

PostPosted: Mon May 10, 2010 8:47 am
by redmotion
I know, with that technique(i mean the modified ocs), there is no limit to change anything in the scene you want.
The drawback is, is the ocs changed with future releases, it would cost more work as simply insert a new variable in the UI...


I agree its more work, just thought I'd suggest it!

Cheers.

EDIT: Its probably not necessary considering editing materials in Octane is so fast. Going back and forth between apps with material changes is probably a time waster.

Re: Softimage to Octane exporter

PostPosted: Mon May 10, 2010 2:24 pm
by adrencg
Hey Face, any thoughts on why I get this error, when just using the simple export you described early in the thread?

Image

Re: Softimage to Octane exporter

PostPosted: Mon May 10, 2010 8:27 pm
by face
adrencg wrote:Hey Face, any thoughts on why I get this error, when just using the simple export you described early in the thread?

Image

Sounds that one of these files would not found.
This should be in the temp folder:
tmp.ocs, tmp.obj&mtl and the XSI.obj&mtl
Can you check it and see if the build date/time is the date/time you press the render button?

I worry that i can´t help you more, while i don´t have the old addon. I have it changed to the v2.2

Hope you can wait till the 2.2 is soon out ;)

face...

Re: Softimage to Octane exporter

PostPosted: Wed May 12, 2010 6:20 am
by face
A little preview...

http://www.vimeo.com/11676147

Hope you like it ;)

I don´t know if Softimage version < 7 will supported.
The SDK is a little bit different, so that i must rewrite some functions.
Especially the string functions from > 7.x are missing. And i use them much...

Re: Softimage to Octane exporter

PostPosted: Wed May 12, 2010 8:31 am
by doca
Great work face! I have few questions, all about animation.
First, when you export animation from Softimage, does Octane starts with render immediately or you have some time to adjust materials.
Second and third(those questions are no targeted directly to you, but maybe you have some info or someone from development team can answer), are we going to have any timeline in Octane and related to that, is there going to be any animatable parameters in Octane (focal depth, materials...)?

Re: Softimage to Octane exporter

PostPosted: Wed May 12, 2010 12:21 pm
by face
doca wrote:Great work face! I have few questions, all about animation.
First, when you export animation from Softimage, does Octane starts with render immediately or you have some time to adjust materials.
Second and third(those questions are no targeted directly to you, but maybe you have some info or someone from development team can answer), are we going to have any timeline in Octane and related to that, is there going to be any animatable parameters in Octane (focal depth, materials...)?

Setting up you scene with materials and things that can´t be exported or you don´t want to export, shown in the video. Then save you ocs-scene. Based on this ocs-scene, you can render a animation.

Focal depth and aperture are values that can be animated.
The other things that can, should you see on the picture from the exporter...

A timeline should not be functional, while for every frame Octane starts new. How should Octane known, on which frame he is rendering.
Thats also the thing, why the materials are not can be animated. You use ever the first created ocs-scene.
I find it usefull, while some material values can´t exported with the obj format. eg the smothness.

For animated materials, we must generate a ocs for every frame with the right values on it. I think that would be more than a simple plugin ;)

face

Re: Softimage to Octane exporter

PostPosted: Wed May 12, 2010 1:34 pm
by face
I have compiled it for 6.02 x64 at this time.
Till 7.5 i can´t test it, but it runs under 7.5, 2010 2011.
It should also run under 6.02, 6.5 and 7.

face