Skip to content

Ambient Occlusion

glTF: occlusionTexture · occlusionTexture.strength

Ambient occlusion (AO) attenuates indirect lighting in crevices. In glTF it is stored in the red channel of occlusionTexture. The strength value scales the effect from 0 (none) to 1 (full).

Note

glTF occlusion is always texture-driven — there is no standalone factor. AO is not read from a native Maya shading slot; it uses a custom gltfAO attribute added by the plug-in, found in the shader's Extra Attributes section.

Shader Attribute Notes
standardSurface, aiStandardSurface, openPBRSurface custom gltfAO Extra Attributes section
StingrayPBS TEX_ao_map + use_ao_map Dedicated Stingray AO path

Texture only

Color space: Raw

standardSurface · aiStandardSurface · openPBRSurface:
  aiImage.outColorR  →  shader.gltfAO
  file.outColorR     →  shader.gltfAO

StingrayPBS:
  file.outColor  →  shader.TEX_ao_map  (enable use_ao_map)

Exports as occlusionTexture. glTF reads AO from the red channel.


Texture + strength

Add a multiplyDivide node to export a occlusionTexture.strength value.

  1. Connect the texture outColorRmultiplyDivide.input1X.
  2. Set the AO strength in multiplyDivide.input2X.
  3. Connect multiplyDivide.outputXshader.gltfAO.
standardSurface · aiStandardSurface · openPBRSurface:
  texture.outColorR  →  multiplyDivide.input1X  →  shader.gltfAO

The multiplier exports as occlusionTexture.strength.

Note

StingrayPBS does not export an AO strength value.


Packed ORM map

The preferred glTF layout when AO, roughness, and metallic share one texture:

Channel Data
R Occlusion
G Roughness
B Metallic
texture.outColorR  →  shader.gltfAO
texture.outColorG  →  shader.specularRoughness
texture.outColorB  →  shader.metalness        (standardSurface · aiStandardSurface)
texture.outColorB  →  shader.baseMetalness    (openPBRSurface)

For StingrayPBS: use the same file node for TEX_ao_map, TEX_roughness_map, and TEX_metallic_map.

Separate grayscale maps are also supported — the exporter can repack them into a full ORM texture. All maps must share the same dimensions. If only AO is present, it is exported directly as occlusionTexture without repacking.


UV transform

file nodes: set repeat, wrap, mirror, offset, and rotation on the connected place2dTexture.
aiImage nodes: wrap, scale, and offset export natively; rotation requires a place2dTexture.

UV set: assign via Maya's UV Set Editor or UV Linking — see UV Set Selection for node-type differences.


Notes

  • AO is a non-color map. Always use Raw color space.
  • Use grayscale AO maps for standalone inputs. If AO lives in the red channel of a packed image, follow the packed ORM workflow above.
  • Add gltfAO from the shader's Extra Attributes section — it is not present by default.
  • If packing into a single image, AO must be in the red channel per the glTF spec.