I have some model on obj+mtl format. When I import this model to Blender, I see nice materials of different colors. When, however, I convert this model to gltf (or glb) format, using obj2gltf
, I get some grey object. This is how I do conversion:
$ obj2gltf -i 9c556d01-c477-46b1-94be-87803ee2a59e.obj -o 9c556d01-c477-46b1-94be-87803ee2a59e.gltf
These files are available through these links (obj, mtl) and this is the resulting gltf file.
I ivestigated the contents of both mtl and gltf files and see, for example, that this material from mtl:
newmtl surface-style-42644--------------------------,---------------------(ral-9010)
Kd 0.945098039215686 0.925490196078431 0.882352941176471
Ks 0.5 0.5 0.5
Ns 64
corresponds to this material in gltf:
{
"name": "surface-style-42644--------------------------,---------------------(ral-9010)",
"pbrMetallicRoughness": {
"baseColorFactor": [
0.5,
0.5,
0.5,
1
],
"metallicFactor": 0,
"roughnessFactor": 1
},
"emissiveFactor": [
0,
0,
0
],
"alphaMode": "OPAQUE",
"doubleSided": false
}
And in fact all materials in gltf file looks absolutely identical. What may be wrong with that and how can I fix it?