obj2gltf icon indicating copy to clipboard operation
obj2gltf copied to clipboard

Emissive color resets to default

Open radim-nedved opened this issue 1 year ago • 1 comments

When I include both the Ke (emissive color) property and map_Ke (emissive texture) in my .mtl file, the Ke color value resets to white (1 1 1) after conversion. However, if I only use the Ke property without map_Ke, the emissive color remains as expected.

radim-nedved avatar Sep 20 '24 13:09 radim-nedved

This seems to be hard-wired at https://github.com/CesiumGS/obj2gltf/blob/ce0c36e28193205f6465a22c03f554fe22597f46/lib/loadMtl.js#L911 , but I don't see an obvious reason why this should be happening. I'd say that whenever a value is not given, then it should have its default (i.e. preferably simply be omitted from the glTF material definition), and the presence of textures should not affect the respective factors.

javagl avatar Sep 20 '24 22:09 javagl