Roughness
glTF: pbrMetallicRoughness.roughnessFactor · pbrMetallicRoughness.metallicRoughnessTexture (green channel)
Roughness describes how microscopically rough a surface is. In glTF it is stored in the green channel of the shared metallicRoughnessTexture. It is a non-color (linear) workflow.
| Shader | Scalar attribute | Texture attribute | Notes |
|---|---|---|---|
standardSurface, aiStandardSurface |
specularRoughness |
specularRoughness |
Falls back to diffuseRoughness only if no MR texture was created |
openPBRSurface |
specularRoughness |
specularRoughness |
Falls back to baseDiffuseRoughness if unavailable |
StingrayPBS |
roughness |
TEX_roughness_map + use_roughness_map |
Repacked into the green channel on export |
Factor only
Set the roughness attribute directly on the shader.
standardSurface,aiStandardSurface,openPBRSurface: setspecularRoughness.StingrayPBS: setroughness.
Exports as roughnessFactor.
standardSurface factor-only roughness setup.
aiStandardSurface factor-only roughness setup.
openPBRSurface factor-only roughness setup.
StingrayPBS factor-only roughness setup.
Texture only
Color space: Raw
standardSurface · aiStandardSurface · openPBRSurface:
aiImage.outColorG → shader.specularRoughness
file.outColorG → shader.specularRoughness
StingrayPBS:
grayscale file.outColor → shader.TEX_roughness_map (enable use_roughness_map)
grayscale file.outColorR → shader.TEX_roughness_map
grayscale file.outColorG → shader.TEX_roughness_map
grayscale file.outColorB → shader.TEX_roughness_map
Roughness is packed into the green channel of metallicRoughnessTexture on export. Use a grayscale source image for the most reliable result.
For a dedicated grayscale roughness image, outColor, outColorR, outColorG, or outColorB all export equivalently because the image carries the same value in every RGB channel. The examples below use outColorG to mirror glTF's roughness channel. If roughness is the only metallic/roughness channel in use, the exporter keeps the original grayscale image as the metallicRoughnessTexture instead of generating a new packed map.
standardSurface texture-only roughness setup with file and place2dTexture.
aiStandardSurface texture-only roughness setup with file and place2dTexture.
openPBRSurface texture-only roughness setup with file and place2dTexture.
StingrayPBS texture-only roughness setup with file and place2dTexture.
Note
For standardSurface, aiStandardSurface, and openPBRSurface, aiImage connects the same way as the file examples above: connect the matching aiImage.outColorG output to the same roughness input, and use a place2dTexture if you need UV repeat, wrap, mirror, offset, or rotation controls.
StingrayPBS does not support an aiImage roughness path.
Factor + texture
glTF computes: roughnessFactor × roughnessTexture
For standardSurface, aiStandardSurface, and openPBRSurface, a dedicated grayscale roughness map can use any one multiplyDivide lane. The examples below use the Y lane because it mirrors glTF roughness:
- Connect the grayscale roughness texture into one lane of
multiplyDivide.input1X,input1Y, orinput1Z. - Set the matching roughness multiplier on
multiplyDivide.input2X,input2Y, orinput2Z. - Connect the matching
multiplyDivide.outputX,outputY, oroutputZ→shader.specularRoughness.
For dedicated grayscale roughness maps, the exporter traces the actual source plug, so outColor, outColorR, outColorG, or outColorB can feed that lane. The lane choice does not need to be Y.
For StingrayPBS, continue to use the dedicated roughness map input.
standardSurface · aiStandardSurface · openPBRSurface:
texture.outColorG → multiplyDivide.input1Y → shader.specularRoughness
If the source image is not grayscale, use the connection that carries the real roughness data. For a packed ORM image that means outColorG.
The multiplier exports as roughnessFactor.
standardSurface factor-plus-texture roughness setup with file and place2dTexture.
aiStandardSurface factor-plus-texture roughness setup with file and place2dTexture.
openPBRSurface factor-plus-texture roughness setup with file and place2dTexture.
Note
aiImage uses the same factor-plus-texture graph as the file examples above: connect the same aiImage.outColorG output to the matching multiplyDivide.input1* lane, then continue from the corresponding multiplyDivide.output* to the same shader input.
Packed ORM / MR map
The preferred glTF layout when roughness, metallic, and AO 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 standardSurface, aiStandardSurface, and openPBRSurface, automatic packed-ORM reuse requires metallic and roughness to resolve to the same file path, with roughness read from G and metallic from B. One shared texture node or multiple texture nodes that point to the same file are both supported.
The multiply network is flexible: one shared multiplyDivide node or separate multiplyDivide nodes are both supported, and the packed ORM channels may pass through any X, Y, or Z lane. What matters is the source texture channel: roughness must come from G and metallic must come from B.
AO is exported from that same packed image only when the image's R channel is explicitly connected to gltfAO. Without the gltfAO connection, the exporter writes only metallicRoughnessTexture.
Separate grayscale maps are also supported. This includes graphs that use one shared multiplyDivide node for AO, roughness, and metallic, or separate multiplyDivide nodes per channel. When any 2 or 3 of AO, roughness, and metallic are texture-driven from different grayscale sources, the exporter generates a packed OR, MR, OM, or ORM texture as needed. If only roughness is present, it exports the original grayscale image directly as the metallicRoughnessTexture. All generated packed maps must share the same dimensions.
If metallic and roughness already share one packed source image but AO comes from a different file, the exporter keeps AO as a separate occlusionTexture instead of merging it into that MR image.
Texture only example
Texture + factor example
For StingrayPBS, the exporter also recognizes packed ORM-style authoring when roughness and metallic share the same source image, even if the Maya graph uses file.outColor on one shared file node or on multiple file nodes that point to the same image path. In that case the exporter infers the glTF channel roles from the destination attributes and writes roughness to the green channel.
UV transform
Use a connected place2dTexture with either file or aiImage to set repeat, wrap, mirror, offset, and rotation.
UV set: assign via Maya's UV Set Editor or UV Linking - see UV Set Selection for node-type differences.
For standardSurface, aiStandardSurface, and openPBRSurface, keep metallic, roughness, and AO inputs on matching UV sets and matching transforms when you expect them to share one exported texture. When the exporter reuses or generates a packed MR/ORM texture, it takes the UV transform and texCoord from the first resolved metallic, roughness, or AO texture node.
If StingrayPBS roughness and metallic use different UV sets or different place2dTexture transforms, the exporter warns and still packs them into one glTF metallic-roughness texture using the first metallic/roughness input it finds as the reference UV transform.
Notes
- Roughness is a non-color map. Always use
Rawcolor space. - Use grayscale roughness maps for standalone inputs. If the data lives only in one channel of a packed image, follow the packed ORM workflow above.
- If packing into a single image, roughness must be in the green channel per the glTF spec.
StingrayPBS: useTEX_roughness_mapand set UV transforms on the connectedplace2dTexture.StingrayPBS: standalone grayscale roughness acceptsoutColor,outColorR,outColorG, oroutColorB. Packed ORM detection prefers shared-image workflows and maps roughness to glTF G on export.