Maya exporter speed

Is there a way to speedup the maya exporter.
Our export does take around 1h.
Its a lot of geo and around 8000 frames of character animation.

@Drigax @Deltakosh

Hi @oglu!
Off the top of my head:

  1. Use smaller sub-scenes of your environment, individual characters, props, etc… and construct everything in-engine. This may not be trivial or possible depending on your project, though, and would require more controller logic in your application to sync the animation groups across your imports.

  2. How much geometry is in the scene? How many skeletons are you using? How many bones are in a skeleton? Are there multiple meshes sharing skeletons? How many Animation groups are you using? Are you baking animation?

  3. Was animation export always this slow? How does export speed compare to FBX export?

There’s alot of factors that may affect this, but it’s hard to pinpoint what the largest bottlenecks affecting you are without some more information, especially since our test scenes aren’t nearly this large :slight_smile:

I’ll try to answer for Oglu here, since we work on the same project:

  1. We are currently in the process of seperating static and animated geometry which will allow us to update the geometry at least much faster (geometry alone takes ~ 90seconds). Animations are the expensive thing here and it seems to become exponentially slower the more frames we have to export (as Oglu said we are at around 8000 frames of animation)

  2. Geometry isn’t that much of a problem (currently ~30000 tris), we are using one skeleton with ~50 bones (one mesh is driven by that skeleton) and around 12 animated transformation nodes. We have ~30 animationGroups and tried with and without baking (baking makes the export about 10% slower)

  3. Animation export is considerably faster with smaller timeranges (timerange of 800 takes < 2 minutes). FBX export of the whole scene with 8000 framerange takes ~ 4 minutes

The main factor seems to be the framerange of the export (or maybe the count of animation groups, haven’t tested that yet), and we would very much like to export the animation groups individually, but then we would export the animated geometry and skeleton time and time again too, which would result in additional loading time and logic on import. That’s actually the reason why we would like to be able to script the exporter (mentioned here ) because that way we could automate the process of seperating the animation groups and delete everything not-animation related from the export.

Thanks for looking into this!

Interesting…Would you be able to share some approximation of your scene? I’d like to run a profiler over the exporter to see what is slowing down the animation group export.

My best guess is our “is this animation track significant” check may be slowing things down, but I’m sure there’s plenty other inefficiencies in the Maya animation export paths.

Whelp, nevermind :thinking:.
Just tested it with a clean mixamo rig, similar key number and framerange, and that exports in under 200 seconds.
We use an mgear rig and tried to use the babylon exporter to bake the animations from the skinning skeleton there, so no additional step was taken to disconnect the skinning skeleton from the rig controls, but it seems the live connections of the mgear controls sends the exporter in a pretty big loop.
Now I bake and disconnect the skinning skeleton in maya, hide everything else and then the export seems to work fine and with decent speed.

I’ll look into it a little bit further to see if this really works in all of our cases before I’ll set the thread to solved. Unfortunately I can’t deliver our project scene, but I’d try to make a quick testscene if you still want to look into the issue.

Thanks for the fast response!


If you wouldn’t mind making a test scene, that would be greatly appreciated. :blush:

There are a few optimizations that have been made to the 3dsMax->Babylon export path, and a good test scene would help me see what may be applicable to the Maya->Babylon exporter as well.

Thanks Patrick (shade0625) for taking over.

Ok, I’ll see if I can set something up during the week. Thinking a little bit more about it, it’s amazing that the babylon exporter recognized the mgear skin skeleton as something animatable at all, since it only has connections to animated controllers (which we did hide during export). It’s slow, but still amazing that it gets exported at all.
Anyway, I think disconnecting and baking the skeleton before export is definitely the clean way to go here. To make this a little bit more convenient it would be great if we could start an export via MEL or Python, requested here, because right now we execute a preexport script, export the babylon scene and execute a postexport script. Having all this as a one button solution would help us a lot