Blender gLTF format - dark diffuse?

Hello.

Does anyone know why, with certain viewers, gLTF files might have a darker diffuse texture?

I’m working on an test asset now and this is how it looks in Blender:

Using an online viewer:

And via Gestaltor:

I’m at a loss as to what is causing this. I’ve tried remaking the texture maps, re-exporting, etc. It’s a problem because this “darkness” seems to happen in some viewer software and not others.

Does anyone know what might be the cause?

The gLTF file is as follows, in case this sheds some light on it?

{
	"asset":{
		"generator":"Khronos glTF Blender I/O v4.1.63",
		"version":"2.0"
	},
	"extensionsUsed":[
		"KHR_materials_specular",
		"KHR_texture_transform"
	],
	"extensionsRequired":[
		"KHR_texture_transform"
	],
	"scene":0,
	"scenes":[
		{
			"name":"Scene",
			"nodes":[
				0,
				1,
				2
			]
		}
	],
	"nodes":[
		{
			"mesh":0,
			"name":"6018515xx0"
		},
		{
			"mesh":1,
			"name":"6018515xx0.001"
		},
		{
			"mesh":2,
			"name":"6018515xx0.002"
		}
	],
	"materials":[
		{
			"extensions":{
				"KHR_materials_specular":{
					"specularFactor":0,
					"specularColorFactor":[
						0.9529411792755127,
						0.9529411792755127,
						0.9529411792755127
					]
				}
			},
			"name":"02___Default",
			"pbrMetallicRoughness":{
				"baseColorFactor":[
					0.025322668254375458,
					0.025322668254375458,
					0.025322668254375458,
					1
				],
				"metallicFactor":0,
				"roughnessFactor":0.8999999761581421
			}
		},
		{
			"extensions":{
				"KHR_materials_specular":{
					"specularColorFactor":[
						1.5843137502670288,
						1.5843137502670288,
						1.5843137502670288
					]
				}
			},
			"name":"14 - Default",
			"normalTexture":{
				"extensions":{
					"KHR_texture_transform":{
						"offset":[
							0,
							-4
						],
						"scale":[
							5,
							5
						]
					}
				},
				"index":0,
				"texCoord":1
			},
			"pbrMetallicRoughness":{
				"baseColorTexture":{
					"extensions":{
						"KHR_texture_transform":{
							"offset":[
								0,
								-4
							],
							"scale":[
								5,
								5
							]
						}
					},
					"index":1,
					"texCoord":1
				},
				"metallicRoughnessTexture":{
					"extensions":{
						"KHR_texture_transform":{
							"offset":[
								0,
								-4
							],
							"scale":[
								5,
								5
							]
						}
					},
					"index":2,
					"texCoord":1
				}
			}
		},
		{
			"extensions":{
				"KHR_materials_specular":{
					"specularFactor":0.800000011920929,
					"specularColorFactor":[
						0.48235294222831726,
						0.48235294222831726,
						0.48235294222831726
					]
				}
			},
			"name":"13 - Default",
			"normalTexture":{
				"extensions":{
					"KHR_texture_transform":{
						"offset":[
							0,
							-4
						],
						"scale":[
							5,
							5
						]
					}
				},
				"index":3
			},
			"pbrMetallicRoughness":{
				"baseColorTexture":{
					"extensions":{
						"KHR_texture_transform":{
							"offset":[
								0,
								-4
							],
							"scale":[
								5,
								5
							]
						}
					},
					"index":4
				},
				"metallicRoughnessTexture":{
					"extensions":{
						"KHR_texture_transform":{
							"offset":[
								0,
								-4
							],
							"scale":[
								5,
								5
							]
						}
					},
					"index":5
				}
			}
		}
	],
	"meshes":[
		{
			"name":"6018515xx0",
			"primitives":[
				{
					"attributes":{
						"POSITION":0,
						"NORMAL":1,
						"TEXCOORD_0":2
					},
					"indices":3,
					"material":0
				}
			]
		},
		{
			"name":"6018515xx0.004",
			"primitives":[
				{
					"attributes":{
						"POSITION":4,
						"NORMAL":5,
						"TEXCOORD_0":6,
						"TEXCOORD_1":7
					},
					"indices":8,
					"material":1
				}
			]
		},
		{
			"name":"6018515xx0.005",
			"primitives":[
				{
					"attributes":{
						"POSITION":9,
						"NORMAL":10,
						"TEXCOORD_0":11
					},
					"indices":12,
					"material":2
				}
			]
		}
	],
	"textures":[
		{
			"sampler":0,
			"source":0
		},
		{
			"sampler":0,
			"source":1
		},
		{
			"sampler":0,
			"source":2
		},
		{
			"sampler":0,
			"source":3
		},
		{
			"sampler":0,
			"source":4
		},
		{
			"sampler":0,
			"source":5
		}
	],
	"images":[
		{
			"mimeType":"image/png",
			"name":"DefaultMaterial_normal",
			"uri":"DefaultMaterial_normal.png"
		},
		{
			"mimeType":"image/png",
			"name":"DefaultMaterial_baseColor",
			"uri":"DefaultMaterial_baseColor.png"
		},
		{
			"mimeType":"image/png",
			"name":"DefaultMaterial_occlusionRoughnessMetallic",
			"uri":"DefaultMaterial_occlusionRoughnessMetallic.png"
		},
		{
			"mimeType":"image/png",
			"name":"metal_black_normal",
			"uri":"metal_black_normal.png"
		},
		{
			"mimeType":"image/png",
			"name":"metal_black_baseColor",
			"uri":"metal_black_baseColor.png"
		},
		{
			"mimeType":"image/png",
			"name":"metal_black_occlusionRoughnessMetallic",
			"uri":"metal_black_occlusionRoughnessMetallic.png"
		}
	],
	"accessors":[
		{
			"bufferView":0,
			"componentType":5126,
			"count":452,
			"max":[
				0.39212024211883545,
				0.008856721222400665,
				0.3726852536201477
			],
			"min":[
				-0.3920423686504364,
				0.00010516303882468492,
				-0.3402612805366516
			],
			"type":"VEC3"
		},
		{
			"bufferView":1,
			"componentType":5126,
			"count":452,
			"type":"VEC3"
		},
		{
			"bufferView":2,
			"componentType":5126,
			"count":452,
			"type":"VEC2"
		},
		{
			"bufferView":3,
			"componentType":5123,
			"count":1152,
			"type":"SCALAR"
		},
		{
			"bufferView":4,
			"componentType":5126,
			"count":18096,
			"max":[
				0.4749999940395355,
				1.1001050472259521,
				0.47878801822662354
			],
			"min":[
				-0.4749999940395355,
				0.1747947782278061,
				-0.5112119317054749
			],
			"type":"VEC3"
		},
		{
			"bufferView":5,
			"componentType":5126,
			"count":18096,
			"type":"VEC3"
		},
		{
			"bufferView":6,
			"componentType":5126,
			"count":18096,
			"type":"VEC2"
		},
		{
			"bufferView":7,
			"componentType":5126,
			"count":18096,
			"type":"VEC2"
		},
		{
			"bufferView":8,
			"componentType":5123,
			"count":80532,
			"type":"SCALAR"
		},
		{
			"bufferView":9,
			"componentType":5126,
			"count":5500,
			"max":[
				0.42685234546661377,
				0.281866192817688,
				0.4380704164505005
			],
			"min":[
				-0.42677417397499084,
				0.002190534956753254,
				-0.41958123445510864
			],
			"type":"VEC3"
		},
		{
			"bufferView":10,
			"componentType":5126,
			"count":5500,
			"type":"VEC3"
		},
		{
			"bufferView":11,
			"componentType":5126,
			"count":5500,
			"type":"VEC2"
		},
		{
			"bufferView":12,
			"componentType":5123,
			"count":31104,
			"type":"SCALAR"
		}
	],
	"bufferViews":[
		{
			"buffer":0,
			"byteLength":5424,
			"byteOffset":0,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":5424,
			"byteOffset":5424,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":3616,
			"byteOffset":10848,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":2304,
			"byteOffset":14464,
			"target":34963
		},
		{
			"buffer":0,
			"byteLength":217152,
			"byteOffset":16768,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":217152,
			"byteOffset":233920,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":144768,
			"byteOffset":451072,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":144768,
			"byteOffset":595840,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":161064,
			"byteOffset":740608,
			"target":34963
		},
		{
			"buffer":0,
			"byteLength":66000,
			"byteOffset":901672,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":66000,
			"byteOffset":967672,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":44000,
			"byteOffset":1033672,
			"target":34962
		},
		{
			"buffer":0,
			"byteLength":62208,
			"byteOffset":1077672,
			"target":34963
		}
	],
	"samplers":[
		{
			"magFilter":9729,
			"minFilter":9987
		}
	],
	"buffers":[
		{
			"byteLength":1139880,
			"uri":"Sample%201.bin"
		}
	]
}

This could be connected with

  • the hdri/background and this it looks differently
  • used color space for the texture(s)
    for example some gltf importers force the textures to show as srgb.
1 Like

Try switching from the Blue Channel plugged into the Metallic and use the Red instead…you can add a math node after the separate RGB Red Channel and set it to Multiply…

It all depends on how the images were packed, and what software was used…
It used to be Red - Rough, Green -Metal, Blue- AO or emissive, Alpha channel any of the above…
Use the Image Editor and the RGB view on the far right to check which will work…unless of course, you set them up by scratch…

Looks a bit weird as it is the Hulk that I was looking at from another OP.

1 Like