Model has no material ( just grey) when loaded in Cesium

Hi

I am new to Cesium and I have uploaded the sample data provided but the result was a grey mesh.

I also uploaded my own sample obj file and it also just came in with no texture layer - just grey.

Is there any procedure I need to follow when upload files i.e make sure the mtl files and textures files are some where specific ?

This is the link to see the results of the import.

Any help would be much appreciated.

Thanks

Wayne

I think you’d be better off using the gltf format. Convert your model.

Thanks for the advice but the documentation says obj and other files are supported. Have you had the same issue and just ended up using the gltf format ?

Yes, I had problems with obj and mtl too. I have read the recommendation to convert to gltf or glb. As a result, I ended up with one glb file, in which all the geometry and materials were stored. If I’m not mistaken, I used obj2gltf.

Thanks I will try it out.

You should expect to see the same result regardless of whether you upload an OBJ or glTF. For the Cesium Story you linked to, using asset ID 156926, it looks like you only uploaded the OBJ file.

You’ll need to upload the MTL file and all associated texture files together. You can create a ZIP file and upload that as well.

I get this problem when the mtl file is not read properly by Cesium, and hence the obj is treated as having no texture.
Take a look at your mtl file. Maybe the texture path is incorrect, or maybe you are using absolute paths to the texture files in the mtl file?