A glTF 2.0 exporter plug-in for Autodesk Maya, with a one-click installer, a redesigned export UI, MASH-to-instance conversion and a viewport PBR shader that round-trips to glTF.
This is a maintained fork of the original iimachines/Maya2glTF project, updated with the approval of the original authors to support Maya 2026 and 2027 on Windows.
- Maya 2027 and 2026, Windows x64. Built against the official devkits with Visual Studio 2022.
- Installer. Every release ships a
Maya2glTF_Installer.batthat copies the plug-in, scripts, shelf, icons and shader files into your Maya user folder. No manual file juggling. - Export UI. A single window for naming, output folder, filters, animation clips and shader tools. Settings are stored in the scene so they survive a reload.
- Pivots baked into nodes. Maya pivots are exported as the glTF node origin with no helper nodes, so objects rotate around the same point in the engine as they do in Maya. See Pivots.
- MASH to instances. One click turns a MASH network into real DAG
instances, which the exporter writes as one shared mesh referenced by many
nodes. Combined with
EXT_mesh_gpu_instancingthis gives small files and few draw calls for scenes with thousands of repeated objects. - Materials. Exports the bundled glTF PBR GLSL shader,
openPBRSurface,aiStandardSurface, and the colour and transparency of Lambert, Phong and Blinn. - Animation clips manager. Define any number of named clips with their own frame ranges directly in the exporter, and export them all in one go as separate glTF animations. Clips are saved with the scene, so the setup is there the next time the file is opened. Node and joint transforms, skin clusters and blend shape weights are sampled per frame.
Requirements: Windows 10 or 11 x64, Maya 2027 (or 2026 with the matching build), and the Microsoft Visual C++ 2022 redistributable. Most machines already have the redistributable.
-
Download the latest zip from the Releases page and extract it anywhere.
-
Make sure Maya is closed.
-
Double-click
Maya2glTF_Installer.bat. It copies into yourDocuments\mayafolder:What Where maya2glTF.mll2027\plug-ins\MEL and Python scripts scripts\glTFshelf and icons2027\prefs\shelves\,2027\prefs\icons\PBR shader and environment maps maya2glTF\PBR\ -
Start Maya. A
glTFshelf appears with three buttons: open the exporter, set a logical parent, and clear logical parents. The plug-in is loaded and set to auto-load the first time the exporter runs.
If the shelf is missing, run maya2glTF_UI(); in the MEL script editor.
Open the UI from the shelf or with maya2glTF_UI();. The exporter works on
the current selection, so select the meshes, groups or cameras you want before
pressing RUN EXPORT. With Selected nodes only off, everything under the
selection is exported too.
|
Asset Identification
PBR Shader & Workflow Tools
Mesh & Scene Filters
Animation & Clips This replaces the old single TRAX clip dropdown. Set the target frame rate, then build a list of clips: type a name, a start frame and an end frame and press Add Clip. Each entry becomes its own named animation in the exported file, so a character ships with |
|
The viewport must use OpenGL (Preferences > Display > Viewport 2.0 rendering engine) for the GLSL PBR shader to display. Export works with either backend.
glTF nodes have no pivot point, Maya transforms do. Older versions of this
exporter handled the difference by emitting two glTF nodes per pivoted
transform: an outer node carrying the rotation and scale, and an inner
:PIV node carrying the negative pivot offset. That doubled the node count of
most scenes.
Since this release the pivot is baked instead:
- The glTF node's origin is the Maya pivot, so rotating the node in an engine turns around the same point as in Maya.
- The offset is folded into the mesh vertex positions, and into the local transforms of any child nodes, every frame.
- Animation, instancing and parenting behave exactly as before, with no
:PIVnodes in the file.
Baking is skipped automatically where it cannot be done safely: joints,
skinned meshes, and transforms whose pivot attributes are animated or
connected. Those keep the two-node form. Tick Keep pivot nodes in the UI,
or pass -kpv, to get the two-node form everywhere, for example if a
downstream tool depends on it.
| Maya material | Export |
|---|---|
GLSLShader running glTF_PBR.ogsfx |
Full PBR: base colour, metallic, roughness, occlusion, normal, emissive, factors |
openPBRSurface (Maya 2026+) |
PBR parameters and textures mapped to glTF |
aiStandardSurface (Arnold) |
PBR parameters and textures mapped to glTF |
| Lambert, Phong, Blinn | Colour and transparency only |
Metallic and roughness textures are always packed into one glTF texture on export. If you supply JPEGs, Maya's JPEG encoder is used for that packed texture and its default quality is low. Raise it with:
putenv "AW_JPEG_Q_FACTOR" "100";
putenv "AW_JPEG_SUB_SAMPLING" "1x1,1x1,1x1";
The UI builds a maya2glTF MEL command from its settings and prints it to the
script editor before running, so anything the UI does can be scripted. Flags
can be given by short or long name. Values marked multiple may be repeated.
| Flag | Description |
|---|---|
-of -outputFolder STRING |
Output folder. Required. |
-sn -sceneName STRING |
File name without extension. Default: the Maya scene name. |
-glb -binary |
Write a single .glb. Default: .gltf plus .bin. |
-ext -externalTextures |
With -glb, keep textures as separate files. |
-cpr -copyright STRING |
Copyright text embedded in the asset. |
-cof -cleanOutputFolder |
Delete the output folder first. |
-gfe -gltfFileExtension STRING, -gbe -glbFileExtension STRING |
Override the file extensions. |
-nbu -niceBufferURIs |
Name .bin files after the scene without numeric suffixes. |
-hbu -hashBufferURI |
Name buffers by a hash of their contents. |
-sab -separateAccessorBuffers |
One buffer per accessor. |
-sma -splitMeshAnimation |
Separate buffers for mesh data and animation. |
-sbr -splitByReference |
Separate buffers per referenced file. Requires -sma. |
-cui -convertUnsupportedImages |
Convert unsupported image formats to PNG. |
| Flag | Description |
|---|---|
-sno -selectedNodesOnly |
Export only the selected nodes, not their descendants. |
-vno -visibleNodesOnly |
Skip invisible nodes. |
-cam -cameras STRING multiple |
Export the named camera. |
-kpv -keepPivots |
Keep the two-node :PIV form for pivoted transforms. See Pivots. |
-ksn -keepShapeNodes |
Keep shape nodes that are the only child of their transform instead of merging them. |
-frn -forceRootNode |
Always add a root node. |
-isc -ignoreSegmentScaleCompensation |
Treat joints as if segment scale compensation were off. |
-dnn -disableNameAssignment |
Do not copy Maya node names into the file. |
-kon -keepMayaNamespaces |
Keep namespaces in node names. By default they are stripped. |
-smd -skipMeshDeduplication |
Write a separate mesh for every node, even for DAG instances. |
-gpu -extGpuInstancing |
Emit EXT_mesh_gpu_instancing for groups of unanimated instances that share a mesh. |
| Flag | Description |
|---|---|
-sf -scaleFactor FLOAT |
Global scale. By default applied through a root node. |
-bsf -bakeScalingFactor |
Apply the scale factor to vertex positions instead of a root node. |
-mpa -meshPrimitiveAttributes STRING |
Attributes to export, separated by |. Default: all present, from POSITION|NORMAL|TANGENT|TEXCOORD|COLOR|JOINTS|WEIGHTS. |
-bpa -blendPrimitiveAttributes STRING |
Attributes for blend shape targets. Default: NORMAL|TANGENT. |
-eut -excludeUnusedTexcoord |
Drop texture coordinates on primitives with no textures. |
-i32 -force32bitIndices |
Always use 32-bit indices. |
-mts -mikkelsenTangentSpace |
Compute MikkTSpace tangents instead of using Maya's. Use for meshes imported from Blender without tangents. |
-mta -mikkelsenTangentAngularThreshold FLOAT |
Angular threshold for MikkTSpace. Debugging only. |
| Flag | Description |
|---|---|
-ssm -skipStandardMaterials |
Export only PBR materials, skipping Lambert, Phong and Blinn. |
-smt -skipMaterialTextures |
Skip all textures, useful when exporting just an animation. |
-dm -defaultMaterial |
Create a default PBR material for meshes without one. |
-cm -colorizeMaterials |
Give every material a distinct debug colour. |
-gof -globalOpacityFactor FLOAT |
Opacity multiplier applied to all materials. |
| Flag | Description |
|---|---|
-acn -animationClipName STRING multiple |
Clip name. |
-ast -animationClipStartTime TIME multiple |
Clip start frame. |
-aet -animationClipEndTime TIME multiple |
Clip end frame. |
-afr -animationClipFrameRate FLOAT multiple |
Sampling rate in frames per second. Give once or once per clip. |
-ivt -initialValuesTime TIME |
Frame holding the rest pose and default values. Should match the skin bind pose. |
-pbm -skinUsePreBindMatrixAndMesh |
Take the bind pose from the skin cluster's pre-bind matrices and input mesh. |
-dsa -detectStepAnimations INT |
Sample extra frames to detect stepped curves, for example -dsa 2. |
-fac -forceAnimationChannels |
Write channels for every node, even unanimated ones. |
-fas -forceAnimationSampling |
Sample every node, even unanimated ones. |
-ctt -crt -cst -cwt ... FLOAT |
Thresholds below which translation, rotation, scale or weight curves count as constant. |
-rvp -redrawViewport |
Redraw the viewport while sampling. Slower. |
| Flag | Description |
|---|---|
-imd -ignoreMeshDeformers STRING multiple |
Deformer to ignore. Deformers carrying a Maya2glTF_ignored attribute are ignored too. |
-ssc -skipSkinClusters |
Export meshes unskinned. |
-sbs -skipBlendShapes |
Export meshes without blend shapes. |
-rsb -reportSkewedInverseBindMatrices |
Report inverse bind matrices with skew. |
| Flag | Description |
|---|---|
-prp -prd -prc -prt -prs -prm ... FLOAT |
Rounding precision for positions, directions, colours, texture coordinates, scales and matrices. |
-dmy -dumpMaya STRING |
Dump the Maya intermediate data to a file, or CONSOLE. Slow on large meshes. |
-dgl -dumpGTLF STRING |
Dump the glTF JSON to a file, or CONSOLE. |
-dac -dumpAccessorComponents |
Dump every accessor as a text file. |
-dnv -debugNormalVectors, -dtv -debugTangentVectors, -dvl -debugVectorLength FLOAT |
Add line geometry showing normals or tangents. |
-cow -clearOutputWindow |
Clear the output window before exporting. |
Everything the UI does is a MEL or Python call in Documents\maya\scripts:
maya2glTF_UI(); // open the window
maya2glTF_assignPbrShader(); // PBR shader on the selection
maya2glTF_updateActiveEnvironmentMaps();
maya2glTF_ignoreSelectedDeformers();
import importlib, maya2glTF_mash
importlib.reload(maya2glTF_mash)
maya2glTF_mash.createMashInstances() # MASH network in the selectionBatch helpers for exporting or playblasting every scene in a folder live in
maya2glTF_exportAllScenes.mel, maya2glTF_exportClipScenes.mel and
maya2glTF_playblastClipScenes.mel.
- Windows only. The macOS and Linux build scripts from the original project are still in the repository but are untested with Maya 2027.
- Animation is sampled per frame. There is no curve compression.
- Blend shape targets are not sparse.
- Lights are not exported.
- A transform with different rotate and scale pivots exports with the rotate pivot only, with a warning.
- Maya's dependency graph allows arbitrary node networks. Unusual setups may
need the
-imdflag or the ignore list to export cleanly.
Requirements:
- Visual Studio 2022 with the Desktop development with C++ workload.
- CMake 3.13 or newer on the
PATH. - Git.
- The Maya 2027 devkit from the Autodesk Platform Technologies page, extracted anywhere.
Steps:
- Clone the repository.
- Open
build_maya2027.batand setMAYA_DEVKIT_BASEto your devkit folder andMAYA_LOCATIONto your Maya install if it is not the default. - Close Maya and run
build_maya2027.bat. It configures a Visual Studio solution inbuild_2027, builds the Release plug-in, and as a post-build step:- installs the plug-in, scripts, shelf and shader into your
Documents\mayafolder so you can test immediately; - stages a relocatable package in
build_2027\redistcontaining the plug-in, scripts, prefs, render data and a generatedMaya2glTF_Installer.bat.
- installs the plug-in, scripts, shelf and shader into your
For incremental rebuilds after the first run:
cmake --build build_2027 --config Release --target maya2glTF
Maya must be closed for the install step, since Windows will not overwrite a
loaded plug-in. The exported file's generator field records the git tag and
commit captured when CMake configured, so re-run build_maya2027.bat (or
CMake's configure step) before packaging a release.
- Commit, then tag:
git tag v1.6.0. - Run
build_maya2027.batso the generator string picks up the tag. - Zip the contents of
build_2027\redistand attach it to a GitHub release.
The plug-in, the MASH converter and the shader scripts all run under
mayabatch, which is handy for verification without opening the UI:
"C:\Program Files\Autodesk\Maya2027\bin\mayabatch.exe" -command "loadPlugin maya2glTF; polyCube; select -r pCube1; maya2glTF -of \"C:/tmp/out\" -glb;"
Maya2glTF was created by IIM and released under the
MIT licence; see LICENSE. The glTF writer is a modified fork of
COLLADA2GLTF. The PBR shader
is ported from the Khronos glTF WebGL PBR sample.
If the exporter works for you, star the repository. If it does not, open an
issue with your Maya version, the plug-in version from the file's generator
field, and a scene that reproduces the problem.

