I looked into this, and the reason that the metalness in your metallic-roughness texture isn’t working is because your material is defined like this:
{
"alphaMode": "OPAQUE",
"doubleSided": false,
"emissiveFactor": [0.0, 0.0, 0.0],
"occlusionTexture": { "index": 3, "texCoord": 1 },
"pbrMetallicRoughness": {
"baseColorFactor": [1.0, 1.0, 1.0, 1.0],
"baseColorTexture": { "index": 2, "texCoord": 0 },
"metallicFactor": 0.0,
"metallicRoughnessTexture": { "index": 4, "texCoord": 2 },
"roughnessFactor": 1.0
}
}
That "metallicFactor": 0.0
guarantees that you’ll get a metalness value of 0.0 everywhere, no matter what the texture says. That’s because this factor is multiplied with the value from the texture.
This is explained in the glTF spec:
The value for each property MAY be defined using factors and/or textures (e.g.,
baseColorTexture
andbaseColorFactor
). If a texture is not given, all respective texture components within this material model MUST be assumed to have a value of1.0
. If both factors and textures are present, the factor value acts as a linear multiplier for the corresponding texture values.