Skip to content

Anisotropy

glTF extension: KHR_materials_anisotropy
glTF properties: anisotropyStrength · anisotropyRotation · anisotropyTexture

Anisotropy stretches specular highlights along a tangent direction, simulating surfaces such as brushed metal, hair, or satin fabric. Requires KHR_materials_anisotropy to be enabled in the export options.

Shader Strength attr Rotation attr
standardSurface, aiStandardSurface specularAnisotropy (or anisotropy) specularRotation (or anisotropyRotation)
openPBRSurface specularAnisotropy (or anisotropy) specularRotation (or anisotropyRotation)
StingrayPBS not supported not supported

The exporter checks the strength and rotation attribute names in priority order: specularAnisotropy before anisotropy, and specularRotation before anisotropyRotation.

The glTF anisotropy texture is a packed RGB image:

Channel Data
R Anisotropy strength
G Anisotropy rotation (cosine)
B Anisotropy rotation (sine) — reserved / set to 1

Anisotropy strength

Factor only

Set specularAnisotropy (or anisotropy) directly on the shader.

Exports as anisotropyStrength. Only written when the value is greater than 0.0.

Texture only

Color space: Raw

Connect the texture to the strength attribute:

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

Exports as anisotropyTexture (R channel).

Factor + texture

glTF computes: anisotropyStrength × anisotropyTexture.R

  1. Connect the texture outColorRmultiplyDivide.input1X.
  2. Set the strength multiplier in multiplyDivide.input2X.
  3. Connect multiplyDivide.outputXshader.specularAnisotropy.

The multiplier exports as anisotropyStrength.


Anisotropy rotation

Scalar value only

Set specularRotation (or anisotropyRotation) directly on the shader.

The exporter converts the value to radians using these heuristics:

  • Value in [−1, 1]: treated as normalized turns → multiplied by 2π
  • Value in [−360, 360]: treated as degrees → converted to radians
  • Otherwise: assumed to already be in radians

Rotation is only exported when anisotropy strength is also active (factor > 0 or texture present). Exports as anisotropyRotation.

Via the packed anisotropy texture (importer-generated graph)

When a glTF file with anisotropy is imported, the importer builds a specific node graph to decode the packed texture. The exporter recognizes this graph on re-export and reconstructs the packed RGB anisotropy texture precisely.

Strength chain:

anisotropyTexture
  → multiplyDivide1.input1{X,Y,Z}
  → multiplyDivide1.output
  → plusMinusAverage1.input3D[0]
  → plusMinusAverage1.output3Dz
  → multiplyDivide2.input1X
(strength scalar) → multiplyDivide2.input2X
  → multiplyDivide2.outputX
  → shader.specularAnisotropy

Rotation chain:

plusMinusAverage1.output3Dx/y
  → aiAtan
  → plusMinusAverage2.input3D[0]
(rotation offset in degrees) → plusMinusAverage2.input3D[1]
  → plusMinusAverage2.output3D
  → multiplyDivide3.input1
(1 / 2π) → multiplyDivide3.input2
  → multiplyDivide3.outputX
  → shader.specularRotation

The exporter reads multiplyDivide2.input2X as anisotropyStrength, and the rotation degrees offset from plusMinusAverage2 as anisotropyRotation (converted to radians). If the three input channels of multiplyDivide1 come from separate grayscale textures, the exporter packs them into a new RGB image (R = X channel, G = Y channel, B = Z channel).


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

  • Always use Raw color space for anisotropy textures.
  • The packed glTF anisotropy texture uses R = strength, G = rotation cosine, B = rotation sine. When sourcing from a simple grayscale strength-only texture, the exporter uses that file directly.
  • Rotation is only exported when anisotropy strength is active.
  • The exporter probes attribute names in priority order: specularAnisotropy before anisotropy, and specularRotation before anisotropyRotation. Both shaders use the same attribute names.
  • Round-tripped materials (imported from glTF then re-exported) are handled by an importer-graph detection path that reconstructs the original packed texture precisely.
  • StingrayPBS does not export KHR_materials_anisotropy.