Is this intentional? When exporting armor files to gltf the first texture is id 0 and is rendering as black. Not sure if this behavior is required for non-armor files.
Happy to submit a PR changing texID == 0 to texID < 0 or whatever is desired.
|
public GLTFMaterialPBRValues(int baseColorTextureIndex, int texID) |
|
{ |
|
if (texID == 0) |
|
{ |
|
this.baseColorFactor = new float[] { 0.0f, 0.0f, 0.0f, 1.0f }; |
|
} |
|
else |
|
{ |
|
this.baseColorTexture = new GLTFMaterialPBRValuesBaseColorTexture(baseColorTextureIndex); |
|
} |
|
} |
|
public GLTFMaterialEntry(TextureConfig conf, int texOffset) |
|
{ |
|
this.name = "Material_" + texOffset + "_" + conf.id; |
|
this.alphaMode = (conf.IgnoresTransparency() || conf.id == 0) ? GLTFMaterialEntry.OPAQUE : GLTFMaterialEntry.MASK; |
|
this.pbrMetallicRoughness = new GLTFMaterialEntry.GLTFMaterialPBRValues(texOffset, conf.id); |
|
} |
Is this intentional? When exporting armor files to gltf the first texture is id 0 and is rendering as black. Not sure if this behavior is required for non-armor files.
Happy to submit a PR changing
texID == 0totexID < 0or whatever is desired.Replanetizer/LibReplanetizer/Serializers/Exporters/GLTFExporter.cs
Lines 374 to 384 in d9bb7cc
Replanetizer/LibReplanetizer/Serializers/Exporters/GLTFExporter.cs
Lines 400 to 405 in d9bb7cc