Game Development Community

Maya>Collada help

by Alex Porter · in Torque 3D Professional · 07/30/2009 (10:33 am) · 5 replies

At the risk of sounding like a complete amateur, I am hoping to get maya specific advice for exporting animations from maya to collada. So far my static objects are importing fine. I am trying to do something simple; I've tried a rotating box and a rotating cylinder.

I've used the animation slider at the bottom in maya in order to create the animation. It works perfectly in Maya. I think the first animation is auto-dubbed 'BaseAnimation'?

Anyways, after I export it to collada, I can't find any name for the ID to use in the .cs file for torque3d to get the animation playing. Is my problem in my export of the file or in my method of creating the animation in Maya?

Can anyone provide guidance?

-Alex

#1
07/30/2009 (4:29 pm)
Hi Alex,

The Collada spec uses an XML tag called <animation_clip> to group a set of animation curves into a 'sequence'. It is this clip element that gives a sequence its name. Unfortuately, I've found that most exporters do not support this element. :-(

To get around this, if the T3D collada loader encounters a file that contains animation curves but no animation_clips, it creates a clip for you called 'ambient' containing all of the animation curves.

If you open your collada model in the shape editor, you will be able to see if it has any animations, and you can rename and split them up as required.
#2
10/20/2010 (10:30 pm)
Quote:The Collada spec uses an XML tag called <animation_clip> to group a set of animation curves into a 'sequence'. It is this clip element that gives a sequence its name. Unfortuately, I've found that most exporters do not support this element.
Hey Chris, do you happen to recall which Collada exporters support the <animation_clip> element? Just picking your brain before I go out and try to make an exhaustive list. ;)

I'm afraid there is no one perfect Collada exporter. Makes the idea of a standard format pretty ridiculous. Hopefully I can keep multiple exporters on hand for different needs.
#3
10/20/2010 (11:55 pm)
The only exporter I have seen so far is the XSI built-in one.
#4
10/21/2010 (8:42 am)
I've done a bit of stuff with Maya > Collada > T3D and though there are some iffy bits here and there it all seems to work for the most part. Like you I haven't been able to find a way to get animation_clip data out of Maya (using either opencollada or the dae_fbx plugin). So in the mean time I've just been exporting the model and then using the shape editor (or manually scripting) the sequences I want.

Instructions to my general workflow go something like:

Step 1) Set up your scene in Maya like it shows in the documentation. Generally-speaking, if you're able to export a static model everything should be okay.

Step 2) Export the scene to a DAE file and put that DAE somewhere inside T3D's file structure. The default folder is usually game/art/shapes/ from your project root.

Step 3) Load up T3D and go into the editor by pressing F11. Then click on the Shape Editor icon (or access it via the menu). Use the Library tab under the Shapes area on the right-hand side to load up your model.

Step 4) On the collada import dialog, check that there's at least one animation listed (by default it'll be called "ambient"). If you haven't got one listed, it's time to revisit Maya and see what's going on with your scene hierarchy and so on.

Step 5) Fill out anything that needs filled out on the import dialog and the continue with importing the file into T3D.

Step 6) On the shape editor Advanced Properties dialog, select the Threads tab and verify your animation works by clicking on it in the list. This animation should be everything smushed up back-to-back. Of course, if it's not...

Step 7) Under the shape editor Properties, click the Add New Sequence button (it's a little page icon at the top right). Fill out the sequence properties below it. Name your animation what you want the engine to find (eg. "walk", "run", whatever), set the in and out frames to the start and end frames of your animation, and fiddle with anything else that needs fiddled with.

Step 8) Save the shape data and restart.

Step 9) Bask in the awesomeness of your animation.
#5
10/21/2010 (9:37 pm)
Thanks for posting that, Daniel - that's a pretty much perfect explanation of how to use the Shape Editor as part of the T3D workflow. It's also great for playing around with imposter/autobillboard and detail level settings.

Most artists want to setup this stuff directly in their modeling app though - which I can understand. It means all the information is within a single source file. The Shape Editor would still be useful for finding experimenting with values, or for models that you don't have the original source art for.

I think what will ultimately be required is some kind of scene markup (like was done in DTS) to allow Torque-specific, and non-exporter-supported features to be setup in the modeling app and interpreted by the T3D importer.