Exporting glTF 2.0 from Maya LT

Updated Febrary 2018: The tools available for glTF have changed since last June, and I've tried to update things accordingly. Unfortunately there is still no direct path to glTF from Autodesk tools like Maya, Maya LT, or 3DS Max, so anything you do will require hopping through at least one intermediate step.

There are now some viable alternatives to the process I describe in this article, any of which may be well worth trying. In no particular order:

  1. Export to FBX and convert with Facebook's FBX2glTF, which has experimental support for converting Stingray PBS materials to glTF's PBR representation.
  2. COLLADA2GLTF has been updated to support glTF 2.0.
  3. The three.js editor can import many files with drag-and-drop, and export to glTF. This relies on THREE.GLTFExporter, which can also be used in your own web applications to enable glTF export.
  4. Recent versions of Substance Painter export directly to glTF 2.0, and should have good integration with Maya workflows.
  5. For simple models (no animation, no PBR), exporting to OBJ and converting with obj2gltf is likely to be a very reliable option.

Autodesk doesn't allow most plugins in Maya LT, but if you happen to have a license for the full version of Maya or 3DS Max, you have a few more choices:

  1. (Untested) Community members at Wonder Media have started an open source glTF plugin for the full version of Maya, Maya2glTF. It's in pre-alpha now.
  2. (Untested) The BabylonJS team has created a plugin for 3DS Max, and is working on one for Maya. Find both plugins at BabylonJS/Exporters.
  3. (Untested) Verge3D offers glTF 2.0 export for 3DS Max.

For any of these tools, please file issues on GitHub — including source files where possible — if you run into trouble. Finally, consider upvoting suggestions in the Maya or Maya LT idea forums if glTF 2.0 support would be useful to you.

The original post continues below.

This post will walk through the process of exporting an animated glTF 2.0 model from Maya LT. We’ll use the following tools:

All of these are available for Windows or macOS. Because Blender cannot import recent versions of FBX, my workflow uses COLLADA as an intermediate format.

The post does not cover how to create PBR materials — for that, refer to the Blender exporter's documentation. Default Blender materials should generally work, but support for Cycles nodes is quite minimal unless using the glTF-specific Cycles nodes included with the exporter. Support for the Principled BSDF node is also missing, but likely to be added soon.

For an alternative workflow using Blender and COLLADA2GLTF, you may want to try with Diego Goberna’s excellent article, glTF Workflow for A-Saturday-Night, instead.

1. Clean up the model for export.

Optional steps to clean up geometry and history.

i. MeshCleanup ii. EditDelete All by TypeHistory, to clean up the model ONLY if the model is not animated. If you’re animating the model yourself, do this step before animating, or skip it entirely. iii. ModifyFreeze Transformations

2. Export in FBX 2013 format from Maya.

The FBX Converter used in step 3 hasn’t been updated since 2013. Accordingly, we need to export from Maya LT in the FBX 2013 format. Steps:

i. FileExport All... ii. Select Animation and Bake Animation iii. Deselect Lights and Cameras iv. Advanced OptionsFBX File FormatBinary + FBX 2013 v. Export All

Maya screenshot

3. Convert from FBX to COLLADA.

Open the FBX Converter UI, and drag the FBX file into the left panel. In the right panel, select Destination FormatDAE Collada. Convert.

FBX Converter screenshot

4. Import COLLADA asset to Blender.

Open Blender, clear the scene, and FileImportCOLLADA. If parts of an animated model are out of place, try playing the animation and they may align correctly. When everything looks OK, continue to step 5.

5. Export glTF 2.0 from Blender.

i. FileExportglTF 2.0 (.gltf or .glb) ii. Enable animation and skinning. iii. Disable lights and cameras. iv. Materials will be explained in a follow-up post; for now, see the Blender exporter documentation. v. Export.

6. Test with glTF viewer.

Drag the .gltf or .glb file — and all other generated files, including .bin — into https://gltf-viewer.donmccurdy.com/ to preview them in three.js. If something is wrong, test the file on the glTF Validator. Invalid files should be reported as GitHub issues on the Blender exporter. If the file appears valid but isn’t appearing correctly, please report an issue on the viewer tool.

Assuming you made it this far, you have a valid glTF 2.0 asset. Congratulations! You can now use the model in three.js, A-Frame, Babylon.js, and other WebGL engines.