July 8, 2019

EXPORTING GLTF FROM MAYA


A year ago, I released a glTF exporter for Maya. What did I learn from it?

Last year, I found out about glTF 2.0, a web-friendly, 3D exchange format. Think of it as FBX for the web. I was intrigued by the project and noticed there wasn't a Maya exporter for it yet. I quietly released on GitHub an initial version of a Maya plugin for exporting scenes in the gltf/glb format: https://github.com/matiascodesal/maya-glTF. I mostly just wanted to be able to create 3D assets and show them off on Facebook with the glTF integration that they added.

Around the same time a couple of other options came out which I have been recommending over mine because they are more fully-featured and seemingly better maintained:

  1. Maya2glTF
  2. BabylonJS Exporter

What happened after v1.0?

It's been a year now since that first version of my exporter. My dream of showing 3D assets on Facebook quickly died when I realized how tiny the maximum file sizes were for sharing on Facebook. On the code side of things, a big commit to the repo came from another GitHub user, @bob-white, who improved my work and sent me a PR to significantly speed up the exports. On my end unfortunately, I've only had time to fix a couple of bugs. Still, every month the repo gets a new star or a comment from someone trying it out.

What did I learn?

I recently revisited this project and chose to bring it up because there was one clear strength in the way I built my plugin that I wanted to recommend for anyone looking to create a simple Maya plugin. I chose to build it entirely in Python and using only packages built into Maya's Python interpreter. Why? Portability. You can download the plugin and use it on Windows/Linux/macOS and with pretty much any newer version of Maya (conservatively, Maya 2015+). There's no need to have maintainers creating multiple builds for each OS and Maya version or leaving it up to users to build it themselves. It's the ease of accessibility that I think is the reason people are giving it a shot.

Why not Python?

If you're thinking about creating a Maya plugin, consider if you can do it using Python and using only built-in libraries and non-binary Python packages. It will make your code portable and easier for your target users to give it a try.

Tags

maya plugin, python, maya, glTF

Comments

Leave a Reply

>>>
>>>
>>>
>>>
cancel