Skip to content

Specular

glTF extension: KHR_materials_specular
glTF properties: specularFactor · specularTexture · specularColorFactor · specularColorTexture

Specular provides additional control over the Fresnel / F0 reflectance of a dielectric PBR material. specularFactor scales the overall specular intensity; specularColorFactor tints the specular highlight color. Requires KHR_materials_specular to be enabled in the export options.

Shader Factor attr Color attr
standardSurface, aiStandardSurface specular specularColor
openPBRSurface specularWeight specularColor
StingrayPBS not supported not supported

Specular intensity

Factor only

standardSurface, aiStandardSurface: Set specular on the shader.
openPBRSurface: Set specularWeight.

Only written when the value differs from the default 1.0 by more than 0.001. Exports as specularFactor.

Valid glTF specularFactor values are in the range [0, 1]. Values authored above 1.0 are clamped back to 1.0 on export.

The examples below show the full specular authoring setup for each shader. For this factor-only case, focus on the scalar specular weight and the matching specular color swatch.

Factor-only specular connection for standardSurface
standardSurface factor-only specular setup.

Factor-only specular connection for aiStandardSurface
aiStandardSurface factor-only specular setup.

Factor-only specular connection for openPBRSurface
openPBRSurface factor-only specular setup.

Texture only

Color space: Raw

For a standalone grayscale specular-strength image, connect the grayscale signal to the factor attribute:

standardSurface · aiStandardSurface:
  aiImage.outColorR  →  shader.specular
  file.outColorR     →  shader.specular

openPBRSurface:
  aiImage.outColorR  →  shader.specularWeight
  file.outColorR     →  shader.specularWeight

For a true grayscale source image, outColor, outColorR, outColorG, or outColorB all export equivalently because the RGB channels carry the same value.

Exports as specularTexture.

The examples below show the paired KHR_materials_specular workflow: specular strength on a grayscale path and specular color on an RGB path.

Texture-only specular connection for standardSurface using file and place2dTexture
standardSurface texture-only specular setup with file and place2dTexture.

Texture-only specular connection for aiStandardSurface using file and place2dTexture
aiStandardSurface texture-only specular setup with file and place2dTexture.

Texture-only specular connection for openPBRSurface using file and place2dTexture
openPBRSurface texture-only specular setup with file and place2dTexture.

Factor + texture

glTF computes: specularFactor × specularTexture

For a standalone grayscale specular-strength map, the signal can pass through any one multiplyDivide lane:

  1. Connect the grayscale texture into one lane of multiplyDivide.input1X, input1Y, or input1Z.
  2. Set the matching scalar factor in multiplyDivide.input2X, input2Y, or input2Z.
  3. Connect the matching multiplyDivide.outputX, outputY, or outputZshader.specular (or specularWeight).

The exporter follows the real upstream source plug, so lane choice does not need to be X when the source image is grayscale.

The multiplier exports as specularFactor.

The examples below show the common paired setup: multiplyDivide scales the scalar specular texture, while the specular color path is tinted separately as described in the next section.

Specular factor plus texture connection for standardSurface using file and place2dTexture
standardSurface factor-plus-texture specular setup with file, multiplyDivide, and color tinting.

Specular factor plus texture connection for aiStandardSurface using file and place2dTexture
aiStandardSurface factor-plus-texture specular setup with file, multiplyDivide, and color tinting.

Specular factor plus texture connection for openPBRSurface using file and place2dTexture
openPBRSurface factor-plus-texture specular setup with file, multiplyDivide, and color tinting.


Specular color

Factor only

Both standardSurface/aiStandardSurface and openPBRSurface use specularColor.

Only written when the value is not default white [1, 1, 1]. Exports as specularColorFactor.

Unlike specularFactor, specularColorFactor is allowed to exceed white. The exporter preserves values above 1.0 and only clamps negative channels up to 0.0.

Texture only

Color space: sRGB

Connect the RGB texture to specularColor:

standardSurface · aiStandardSurface · openPBRSurface:
  aiImage.outColor  →  shader.specularColor
  file.outColor     →  shader.specularColor

Exports as specularColorTexture.

Factor + texture (color tint)

To tint the specular color texture, use a colorComposite node:

standardSurface · aiStandardSurface · openPBRSurface:
  aiImage.outColor  →  colorComposite  →  shader.specularColor
  file.outColor     →  colorComposite  →  shader.specularColor

The tint color comes from colorComposite.colorB and exports as specularColorFactor.


Texture layouts

Separate textures

  • specularTexture can come from its own grayscale image.
  • specularColorTexture can come from its own RGB image.
  • specularTexture uses multiplyDivide for factor tracing.
  • specularColorTexture uses colorComposite for tint tracing.

Separate texture outcomes

  • specularTexture only: the exporter writes an alpha-bearing texture where Alpha stores specularTexture, so the result is glTF-compliant even when the Maya source is a grayscale RGB image.
  • specularColorTexture only: exports the original RGB image directly as specularColorTexture.
  • specularTexture + specularColorTexture: the exporter generates a packed RGBA image where RGB stores specularColorTexture and Alpha stores specularTexture. Both source images must have matching dimensions, and the generated output must use an alpha-capable format.

Packed RGBA specular map

One texture node feeding all channels is supported, and multiple texture nodes pointing to the same file path are also supported.

The authored source image does not need to be PNG. What matters is that the shared texture really carries RGB color plus alpha strength, and that any generated packed output is written to an alpha-capable format.

For a packed RGBA specular map:

  • Specular color must come from the source texture's RGB channels.
  • Specular strength must come from the source texture's Alpha channel.
  • specularColorTexture still uses colorComposite for tint tracing.
  • specularTexture may use one shared multiplyDivide node or a separate multiplyDivide node.
  • The multiplyDivide lane can be X, Y, or Z; the upstream source channel must still remain Alpha for packed specular strength.

If one Maya texture file feeds both color and strength but the strength is taken from grayscale RGB instead of Alpha, the exporter repacks that source into a new spec-compliant RGBA texture rather than exporting the invalid channel layout directly.


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

  • specularTexture is scalar data and uses Raw; specularColorTexture is RGB color data and uses sRGB.
  • For standalone grayscale specular-strength maps, the exporter is permissive about grayscale RGB source channel and multiplyDivide lane choice.
  • The exported glTF is strict about source-channel meaning: RGB = specularColorTexture, Alpha = specularTexture.
  • When both separate textures are present, matching image size matters because the exporter generates a packed RGBA specular image.
  • Strength-only specular exports are also rewritten to an alpha-bearing output so specularTexture remains stored in alpha.
  • A generated packed specular image is written to an alpha-capable output format. In practice that means JPEG is not used for the packed result.
  • specularFactor is only written when it differs from the default 1.0, and exported values stay in the glTF schema range [0, 1].
  • specularColorFactor is only written when the color is not white [1, 1, 1]. Values above 1.0 are valid and preserved; only negative channels are clamped to 0.0.
  • openPBRSurface uses specularWeight instead of specular for the intensity attribute; both shaders share specularColor for the color attribute.
  • StingrayPBS does not export KHR_materials_specular.