CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.67k stars 302 forks source link

textures not loaded via mtl file #272

Closed jayddaniels closed 2 years ago

jayddaniels commented 2 years ago

Hi, probably a dumb question, but where should my textures/mtl file be located for them to be added to the gltf file? I have every texture(png files), the mtl and the obj file in the same folder, also this is where i execute the conversion on the command line.

obj2gltf -i paintingwithmat.obj -o converted.gltf --------this gives me a gltf without textures

lilleyse commented 2 years ago

@jayddaniels does the obj reference the mtl file properly?

See https://en.wikipedia.org/wiki/Wavefront_.obj_file#Reference_materials

jayddaniels commented 2 years ago

@lilleyse thanks for the suggestion, it was referenced correctly. However i noticed that there was a corrupted material(some older version of the texture i think , which was not available anymore) on the same element where i expected the material to show up, removing that fixed it. Thanks for the fast answer!