Contributors
Lautriva
Status
Stable
Dependencies
Written against the glTF 2.0 spec.
Overview
Internally, the Oxygen Engine uses the RouMetAo
(Roughness, Metallic, Ambient Occlusion) texture packing in its own PBR renderer.
But by default, the glTF 2.0 uses the AoRouMet
(Ambient Occlusion, Roughness, Metallic) texture packing.
This extension aim to avoid multiple processing / texture swizzling if your workflow is already using RouMetAo
packing beforehand.
The extension defines a single property roughnessMetallicOcclusionTexture
which takes an index to the texture which is packed in the RouMetAo
order.
If both a standard glTF roughnessMetallicTexture
and this extension are defined in the material, this extension will take priority. Any client that does not support this extension can safely ignore this additional packed texture and rely on the default packing of glTF 2.0
For example, here is how to use the extension on a material:
{
"materials": [
{
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
}
},
"normalTexture": {
"index": 1
},
"extensions": {
"OE_materials_roughnessMetallicOcclusion": {
"roughnessMetallicOcclusionTexture": {
"index": 2
}
}
}
}
],
"textures": [
{
"name": "baseColorTexture",
"source": 0,
},
{
"name": "normalTexture",
"source": 1
},
{
"name": "roughnessMetallicOcclusionTexture",
"source": 2
}
],
"images": [
{
"mimeType": "image/png",
"bufferView": 0
},
{
"mimeType": "image/png",
"bufferView": 1
},
{
"mimeType": "image/png",
"bufferView": 2
}
]
}
JSON Schema
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "OE_materials_roughnessMetallicOcclusion extension",
"type": "object",
"description": "glTF extension that specifies a different packing order for roughness, metallic and occlusion properties in a single texture.",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
"properties": {
"roughnessMetallicOcclusionTexture": {
"type": "object",
"description": "A texture with packing Roughness (R), Metallic (G), Occlusion (B).",
"properties": {
"index": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
"description": "The index of the texture."
}
}
},
"extensions": {},
"extras": {}
}
}
Known Implementations
Only implemented in Oxygen Engine so far
Licence
MIT