As to not bury the lead:
I'm writing a JSON and X3D exporter for Maya and Maya LT completely in MEL.
Explanation:
I haven't posted to this forum in years, but I'd appreciate some feedback on my latest project. Especially, intersted in knowning if anyone here would be interested in using something like this. Or be willing to provide feedback on occasion. And I could use some 3D content as well to test the export capabilities.
Background:
Back in 2003 or 2004 or 2005, I can't remember it's been so long, I released an X3D export plugin for Maya called RawKee.
http://rawkee.sourceforge.net/
The funding ran out at the university lab at which I once worked in 2006, so I moved on to a different job in high performance computing. No longer having the financial support to maintain the build environements and keep current with Maya versions across all the OS that were supported, the plugin finally died about 2009 or 2010.
But working in HPC, I attend the NVIDIA GTC conferences every year. In 2014 when Facebook bought Occulus during the conference, I got inspired again to write export tools for Maya.
What I really wanted to do was release a glTF exporter for Maya, but the documentation was confusing, and yadda yadda yadda... and I shelved the idea for a while, only to pick it up again at this year's GTC when I ran into some developers at the WebGL BOF who could use a Maya exporter for their custom Vizor VR format (http://vizor.io).
The Long Story:
I put my code online today in GitHub for my X3D/JSON import/export tool called BaconXJF (XJF for X3D and JSON Formats - Bacon because... I like bacon, it's delicious). It's a work in progress, and as I posted to the X3D mailing list today, only really usable by me at the moment... not anything close to even an alpha release, nor is it commented at all.
But I wanted to get it out there as it was itching to be accidentally deleted from my hard drive.
Where's It At?
The code is available under an MIT license at:
https://github.com/flickertail/bcn
That's it's temporary home anyway, it might be moving to the Web3D Consortium's X3D svn repository on SourceForge in the near future. If you want to download it, I suggest waiting a week while I work out some optionVar issues.
What Are It's Features?
It currently just jogs around the DAG exporting transform nodes, does do a mesh dump for Vizor VR, so the basics of mesh export are there, I just haven't extended them to other formats yet.
1) Tranverses the Dag
2) Exports XML (er... X3D... though it could be customized for any XML, as non-specific tag functions support that)
3) Exports JSON
4) Parses JSON
When it parses JSON it currently it builds a transform tree with the data, but I think I'm going to change it to a graph of script nodes, and provide functions for other authors to traverse the graph of script nodes, and stringify the stored data.
It took me a while to wrap my head around parsing JSON using MEL, so the code is not pretty, but it is realtively short. Nor is it guaranteed to catch errors of poorly written JSON files.
Supported Formats?
I've sort of half implemented the basics of (genrously defined): ThreeJS, X3D xml, X3D classic, 3DHTML, and Vizor VR. Possibly glTF when once there is better documentation. I've been looking a bit at Babylon JS as well.
The Web3D consortium will soon release a standard for X3D in JSON format (was on the call the other day), and I expect that I'll be able to quickly add that once it's formalized.
Supported Maya Versions?
Well, it's pure MEL... so I guess everything... maybe even as far back as Maya 5 for IRIX...
But seriously, any version that supports MEL probably. I've tested it on both Maya 2015 and Maya LT 2015, and it works for both.
Why MEL? Why not go with Python or .NET?
Well, all my bank account could afford right now is Maya LT... and that's the only scripting language it supports. Plus there was something about how RawKee died that always bothered me... I hate it when plugins for Maya aren't available because the authors haven't recompiled them for my OS, or my version.
With MEL, because it's backwards compatible, most likely it will be forwards compatible for some time. So even if I drop off the face of the earth again, someone else could take it over with not too much hassle.
Over the years I've read comments by users looking for X3D export, and seeing the response of the community telling them to look to a different format has always made me feel bad.
Features I Intend to Release:
Most of the stuff I exported from RawKee with some additions, but to be more specific...
1) Scene Graph transform structure
2) Standard Materials
3) GLSL through ShaderFX (if the user's version of Maya supports it)
4) Meshes
5) Dynamic Textures
6) Skins
7) Character Rigs
8) Cameras
9) Lights
10) Audio nodes
11) KeyFramed animation data
All a tall order, all will take me a while, and all will be an ongoing project for a long time. Though I don't know how much of that the JSON parser will support. I think I may just leave that up to other people to implement if they see a use for it.
You are in the HPC Industry, why write an exporter now?
HPC can be very cool, but my first love has always been 3D. I just really love working with it. Maybe if I was a better artist I might use Maya to make art, but I'm a better programmer than an artist. So instead, I make export tools. It's my art.
And for some reason, there always seems to be a need in the area of export tools that never really gets addressed properly. Although, from what I read online, the guy who made the Inka WebGL exporter did a pretty nice job of it.
See It On YouTube:
Anyway, see rough cuts of BaconXJF in action on YouTube.
https://www.youtube.com/watch?v=h27\_bOenXaI
https://www.youtube.com/watch?v=a4t2e-qZ0-A
https://www.youtube.com/watch?v=OBPJNFQmvYg