The plug-in is designed for Maya 2018. This guide is about the Windows version (a MacOS version is coming soon). To download the plug-in, go to the Github project (https://github.com/BabylonJS/Exporters/tree/master/Maya).
In this folder, you can find the source code of the exporter if you want to update it, and a zip file Maya2Babylon-XX.zip (where XX is the exporter version, currently v0.1). Click on the zip file, and click on the Download button.
By default, Windows blocks all .dll files coming from the web, so we have to unblock them first. Select the zip file, and with a right click select Properties, select Unblock, and then OK.
Then, extract the content of the zip file on your computer. Finally, move all .dll files into a directory defined in Maya plug-in path (for example C:/Program Files/Autodesk/Maya2018/bin/plug-ins
). More information on how to install a plug-in in Maya here. In Maya plug-in Manager you should find the Maya2Babylon.nll.dll.
Check Loaded and Auto load, and a new tab should appear:
Congratulations! You did it!
Meshes
Materials
Textures
Cameras
Lights
When your scene is ready to be exported, click on the Babylon tab on the top menu, and click on Babylon File Exporter to display the exporter window.
This window is composed of 3 panels:
The Export button should be used to create the Babylon file representing your scene. The Export & Run button will also create the Babylon file, but will also launch your default browser and run the newly made Babylon file. This button is very useful if you just want to test the render of your scene in Babylon.js.
As babylon.js script is retrieved directly from the official website directly, you should have internet access in order to correctly use Export & Run.
The log panel indicates in real time which mesh has been exported, which material, and if there are any problems with these objects.
If you want to test your scene right away by using the button Export & Run, your scene should have a camera created. Otherwise, the log panel will display the warning “No camera defined” and a default one would be created at runtime but won't be exported in .babylon file.
If you have more than one camera, the first one will be set as activeCamera in Babylon.
If you don’t have any lights in your scene, the exporter will add an ambient light by default. The log panel will display the warning “No light defined – A default ambient light was added for your convenience”.
Maya provides a large range of tools to manipulate connexions between textures and materials (like the Reverse node). Currently none of these tools are supported by the exporter. Only a fileTexture is expected as input to a material. Otherwise the log panel will display the error “Only file texture is supported”.
Babylon engine fully supports the following image formats: jpg, bmp, png, gif, tga. You are adviced to use those formats for your textures when exporting to Babylon.
Note that the exporter also supports textures with tif and dds formats. But, those textures will be automatically converted to png by the exporter to ensure compatibility with the Babylon engine.
The handling of physical materials is mimic from glTF format. Detailed explanations here
Babylon engine supports only 2 UV sets. In Maya the first UV set, created by default, is used as UV1 in Babylon. The second UV set is used as UV2. Other UV sets are ignored and UV2 is used instead.
Moreover, Babylon engine supports only 1 UV set per texture. If a single texture is linked to UV1 and any other UV set, the log panel will display the warning “Texture is linked to UV1 and UV2. Only one UV set per texture is supported.” and the texture will be linked to UV1 or UV2 but not both.
Now that you know all about the exporter features, it’s time to use it!
Export your own scene from Maya to babylon format and load it into the Babylon Sandbox. Or load them via scripts using the babylon loader.