3dsMax exporter (maxscript question)

How can I specify the options in the collada exporter through max script?

My entire pipeline is converted over…that is, a I have an exe that will parse the collada doc and output “ready to go” binaries. I have Max GUIs (implemented in max script) that the user uses to export through. I use a maxscript command similar to:

exportFile “c:\hope.dae” #noPrompt selectedOnly:true

to get a silent export, but I need to be able to set options like bakeTransforms=true/false, etc…

Anyone know where that documentation is? Or source I could look at?

Thanks

This feature is not implemented yet.
I would suggest changig the source code to set your default options, or to code this feature.

Thanks for the quick response.

You said “yet” does that mean that this feature is planned for sure?

Yikes! I’m in big trouble…as I bet a lot of developers will be when they find this out. The whole appeal of COLLADA to game tool chain developers is that for the first time in history, we may finally be freed from the huge cost and development time associated with having seperate tools for different DCCs and different versions of those tools that we have to recompile everytime MAX or MAYA or XSI release a new version.

You suggest compiling the plugin myself, and while that would work, it defeats the purpose of moving our tool chain over to COLLADA for the reasons mentioned above. If we do that, then instead of freeing ourselves from the maintainence of different tools for different DCCS, we’re back in the same boat PLUS we have a new plugin to maintain…COLLADA. Plus, it couldn’t be hardcoded to some default settings because the user may want to export different frames for different animation clips etc…

Also, most professional art pipelines are very user friendly and require minimum “repeat work”. That is, a Max Scene may contain terrain geometry, a lighting rig, a camera rig and maybe even a few models. Withough a silient way to kick off the COLLADA export, the artist/user would have to manually export each item and be presented with the current COLLADA options dialog each time and browse to a file each time. Very tedious and clumsy…

To be a little more concrete, we have an “Asset Manager” that runs within Max and maintains persistent information that associates a Max Selection Set with an export template. This information is set up once and in the future the artists only has to click “export” to have X number of game engine files exported. The files can be of any type…model, animation, skin mesh, terrain, light, camera… etc… Like I said the info is persistent and thus is saved with the Max scene file. For this to work with COLLADA, the Asset Manager needs to manage COLLADA options during the silent exports. For example, event just a single skin mesh character may have all of it’s animation stored in the same file. Say frames 0-30 are a walk cycle, 31-60 is a jump animation, and so on…not to mention that there is a skin mesh to export. That is easily 4 or 5 COLLADA exports just to get the skin mesh and associated sampled animations…

Anyway…I just wanted to provide some real world reasons why it’s crucial to have a silent export of COLLADA where maxscript can specify the options…at a bare minimum at least the frame range needing to be sampled for a particular animation.

:cry: Unfortunately, my journey with COLLADA ends here for the time being. I realize this stuff is still in it’s infant stages and the work Feeling Software and others have put into this is truly amazing. Congrats to all whos efforts have been contributed. But, at this point, I have to go back to our full C++ plugins where we were before we began this journey.

This may be nothing new to you guys who are working on the plugins…maybe you guys have plans for this?

This is something I’ve been worried about since the last PS3 dev conference…that is, seemless integration of COLLADA into existing and even new pipelines. Without that integration (silent export parameters), our old toolchains are far superior with regards to user friendliness and require less work.

Thanks for your reply again.

Good luck to all.

Regards,
Lynn

The exporter reads in the export options from the previous export from the ColladaExporter.ini file that you can find within the /3dsmax8/plugcfg folder. If you happen to write over the settings file within Maxscript with a similar file that contains your wanted export options, the exporter won’t know the difference.

Of course, that’s not a great/official way to do this, but it will get the job done with the current and future version of the plugin.

Sincerely,

LOL! I found this just a few hours ago and was logging on to let people know. At first I was a little embarrassed at the thought of doing this, but hey man, it works great and is a piece of cake! When I saw your reply I new it couldn’t be THAT hacky if the developer himself thought of the same thing. :slight_smile: I agree…it’s a “work around”, but it’s a life saver. Thanks for your reply. Again…great work on this plugin.

:smiley:

Feeling Software is working on improving the COLLADA conformance test suite for COLLADA 1.4. Setting different export options for different test cases is a good part of conformance (and internally: regression) testing. For the 3dsMax COLLADA tools, we’re using that technique: so you can be sure that it will work for some time. Although I don’t guarantee that the file format will stay as it is, using the Windows .ini format is fast to read/write but not very flexible :wink:

I found an issue this weekend with animation start and stop values. If you export a DAE from MaxScript with no prompt, the animStart and animStop parameters from the ini file are ignored. Here is the simple test case:

I have a simple scene that contains only a box with 200 frames of animation consisting of just 2 rotation keys.

I change two ColladeExporter.ini fields to the following:

animStart=0
animEnd=100

saying that I only want half of the animation exported.

Then, I run the following maxscript command which will not show the Collada options dialog:

exportFile “c: est.dae” #noPrompt selectedOnly:true

Guess what? All 200 frames of animation are exported even though the ini file specified that only 0-100 should be exported.

Now, if I run:

exportFile “c: est.dae”

this let’s the Collada options dialog popup and then I simply hit OK, since 0 to 100 shows up in the dialog properly from the ini file.

This time, my exported DAE contains just 0-100 like I originally wanted.

It’s seems like, for the 2 animation params animStart and animEnd, the dialog has to be displayed in order for the 2 params to take effect.

Seen this before?

I just checked the code: there’s a bit of legacy code there that enforces the full timeline when the dialog is suppressed.

I’ll make the code change locally to grab the animStart/animEnd from the .ini file, when sampling is enabled. Email me directly, if you want the code change so that you can rebuilt yourself a new plug-in version.

Sincerely,