Export / Translate ocs - camera file to fbx or maya camera

Generic forum to discuss Octane Render, post ideas and suggest improvements.
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
User avatar
Refracty
Licensed Customer
Posts: 1599
Joined: Wed Dec 01, 2010 6:42 pm
Location: 3D-Visualisierung Köln
Contact:

Hi,
for a current project I have to provide my client with the cameras I have already set up in octane. He is working in 3ds max.
The exporters usually work in the direction from 3rd party 3D app to Octane.
But know I need it the other way around.
So is there a script or tool that can parse a .ocs text file of an Octane camera and translate it to a fbx (or Maya) camera?
I didn't put this issue into the maya sub forum because it could be valuable for all users.

I appreciate any help. This is urgent.
Thank you.
Refracty
User avatar
[gk]
Licensed Customer
Posts: 574
Joined: Sat Jan 16, 2010 12:48 pm
Location: Denmark

if its still cameras you can read out the xyz for camera and target inside octane under the camera.
You can also locate the values in the ocs.
Manually typing them into the host app will work fine as its these numbers that's also transfered the other way.
Amiga 1000 with 2mb memory card
User avatar
Refracty
Licensed Customer
Posts: 1599
Joined: Wed Dec 01, 2010 6:42 pm
Location: 3D-Visualisierung Köln
Contact:

Thank you GK.
So that means that the values translate 1 to 1.
Cool, I gonna check this out.
Neverteless, to have a tool that makes all the copy pasting unnecessary would be cool.
tchoa
Licensed Customer
Posts: 189
Joined: Thu Jul 01, 2010 12:33 pm
Location: Montpellier

Here is a mel script that I quickly coded on the side today... OCScameras.mel

It comes with a simple UI and should be installed as usual in a user script directory.
Image
Use the 'OCScameras' command to launch it.

Hope that some maya users will find it useful.
Enjoy!

F
Win XP x64 | Q6600 2.40GHz | 8Go | GTX470 1.28Go // Win 7 x64 | I7 Q740 1.73Ghz | 6Go | GTX460m 1.5Go
User avatar
Refracty
Licensed Customer
Posts: 1599
Joined: Wed Dec 01, 2010 6:42 pm
Location: 3D-Visualisierung Köln
Contact:

WTF !
Are you a crazy genious?
You are brilliant!
Can't wait to test.

This made my day.
tchoa
Licensed Customer
Posts: 189
Joined: Thu Jul 01, 2010 12:33 pm
Location: Montpellier

Hmm... thanks :)
This is just a few lines of code. I have to say just ordinary scripting...
On the other hands the use of fileDialog2 will limit its compatibility to Maya 2011 and later.
If you want to use it with older versions you can always enter the path to the ocs file manually.
Glad it will help you!

F
Win XP x64 | Q6600 2.40GHz | 8Go | GTX470 1.28Go // Win 7 x64 | I7 Q740 1.73Ghz | 6Go | GTX460m 1.5Go
User avatar
Refracty
Licensed Customer
Posts: 1599
Joined: Wed Dec 01, 2010 6:42 pm
Location: 3D-Visualisierung Köln
Contact:

Thank you for the hint.
I am really old school so I am using Maya 7.

I replaced fileDialog2 with the path but couldn't get it to work.

string $paths[] = `O:\3D\Octane\OCSBatch\2011_08_15_564.ocs -fm 4 -ff "Octane (*.ocs)" -sff "Octane" -cap "Load"`;

I am sure I am making fundamental mistakes in the syntax but don't know what to change.
Can you help me?

One more THANK YOU
User avatar
face
Octane Plugin Developer
Posts: 3204
Joined: Sat Mar 06, 2010 2:10 pm
Location: Germany

Refracty wrote:Thank you for the hint.
I am really old school so I am using Maya 7.

I replaced fileDialog2 with the path but couldn't get it to work.

string $paths[] = `O:\3D\Octane\OCSBatch\2011_08_15_564.ocs -fm 4 -ff "Octane (*.ocs)" -sff "Octane" -cap "Load"`;

I am sure I am making fundamental mistakes in the syntax but don't know what to change.
Can you help me?

One more THANK YOU
I think, because that is a string, all after ...ocs can be deleted. But let the ' alive...
Maybe you must also change $paths[] to $paths without the [].

face
Win10 Pro, Driver 378.78, Softimage 2015SP2 & Octane 3.05 RC1,
64GB Ram, i7-6950X, GTX1080TI 11GB
http://vimeo.com/user2509578
User avatar
Refracty
Licensed Customer
Posts: 1599
Joined: Wed Dec 01, 2010 6:42 pm
Location: 3D-Visualisierung Köln
Contact:

Thanks for the help.
I tried to modify but couldn't get it running with Maya 7.

I have changed the script around the fileDialog2 to this:


global proc OCScamerasFile()
{
string $paths = "C:\Users\Me\Documents\maya\7.0\scripts\2011_08_03_562.ocs";
textFieldButtonGrp -e -fi $paths OCSfile;
OCSgetCameras($paths);

}


If I put ' instead of " i get errors.
After the modification, the script runs through without errors but without any visible response or menue to choose the cameras.
If somebody make this running for older Maya - Versions it would be fantastic.
Tchoa, face or vipvip do you have an idea?
User avatar
face
Octane Plugin Developer
Posts: 3204
Joined: Sat Mar 06, 2010 2:10 pm
Location: Germany

Sorry, i don´t use Maya.
My hint was only because it was a sting and strings should be nearly the same in mel, vbscript, c++ or whatever...

face
Win10 Pro, Driver 378.78, Softimage 2015SP2 & Octane 3.05 RC1,
64GB Ram, i7-6950X, GTX1080TI 11GB
http://vimeo.com/user2509578
Post Reply

Return to “General Discussion”