Exporter Reference
UV Set Selection
How to assign a UV set to a texture in Maya so the correct texCoord index is written on export.
glTF textures reference a UV set by index (texCoord). The method for assigning a UV set depends on which texture node type you are using.
aiImage nodes
Set the UV Set field directly on the aiImage node in the Attribute Editor. The exporter reads that value and converts it to a texCoord index automatically — no extra nodes are needed.
file nodes (with place2dTexture)
Maya does not expose a UV set attribute on file or place2dTexture nodes. Instead, UV set selection is driven by a uvChooser utility node wired into the place2dTexture's uvCoord input. The mesh's shape node must be present in the graph to supply the UV set name plug.
Step 1 — Set up the texture nodes
If you do not already have a file and place2dTexture node in the scene, create both using Create Node in Hypershade or the Node Editor. Connect the file node's output color to the shader attribute you want to drive (for example, baseColor).
Step 2 — Bring the mesh shape node into the Node Editor
The mesh's shape node must be visible in the Node Editor so you can access its UV set plugs. By default the Outliner and viewport only show the transform node, so there are two ways to get the shape node into the graph:
-
Via the Outliner: Right-click on an empty area of the Outliner and enable Shapes in the menu. The shape node will appear as a child under the transform. Middle-mouse drag it from the Outliner into the Node Editor.
-
Via input/output connections: Select the object in the viewport, then open the Node Editor (found under the Windows menu). Click Input and Output Connections in the Node Editor toolbar. The shape node will appear in the graph. Middle-mouse drag it into the Hypershade workspace or keep it in place for the next steps.
Shared materials
If the same material is assigned to multiple objects, bring all of the relevant shape nodes into the Node Editor. Each shape node exposes its own UV set plugs. Connect each shape's plug to a separate element of uvChooser.uvSets to cover all assigned objects.
Step 3 — Create a uvChooser node
In the Node Editor, create a uvChooser utility node using Create Node → uvChooser, or through the Hypershade panel.
Step 4 — Connect the mesh UV set to the uvChooser
In the Node Editor, drag from the shape node's uvSet[N].uvSetName output plug to the uvChooser's uvSets[0] input. Replace N with the index of the UV set you want the texture to use — 0 for map1, 1 for map2, and so on.
Step 5 — Expose the hidden uvCoord attribute on place2dTexture
The uvCoord input on a place2dTexture node is hidden in the Node Editor by default. To reveal it, right-click and hold on the place2dTexture node — a marking menu appears. Choose Show All Attributes. The uvCoord input plug will now appear on the left side of the node.
If the node is not showing all its plugs, click the expand icon (the stacked-lines icon in the top-right corner of the node) to toggle full attribute display. This is useful any time a node appears collapsed and the plug you need is not visible.
Step 6 — Connect uvChooser.outUv to place2dTexture.uvCoord
Drag from the uvChooser's outUv output to the place2dTexture's uvCoord input. The exporter reads this connection to determine the active UV set index and writes it as texCoord.
Warning
The uvChooser must connect to place2dTexture.uvCoord, not to file.uvCoord. Connecting it directly to the file node will not work when a place2dTexture is present in the chain.
UV set index mapping
Maya UV set names are converted to glTF texCoord indices using the mesh's UV set order:
| Maya UV set | glTF texCoord |
|---|---|
map1 (index 0) |
0 |
map2 (index 1) |
1 |
| Custom name at position N | N |
Exporter resolution order
When the exporter resolves the UV set for a file node it checks the following sources in order, using the first that returns an unambiguous result:
uvChooseronplace2dTexture.uvCoord— the live DG wiring set in the Node Editor (most authoritative)uvChooseronfile.uvCoord— direct wiring when noplace2dTextureis in the chaingltfUvSetNamecustom attribute on the file node — written by the importer for round-trip scenesuvLinkmetadata on the file node orplace2dTexture— explicit UV link assignments
For aiImage nodes the exporter reads the uvset string attribute directly and converts it to a texCoord index.