MTL file loading

Please do not forget to add a link to a Playground to get a faster answer:

Hi all,
I am trying to load the obj file using Babylonjs sceneloader. The asset loads fine but it shows an error stating 404 MTL file not found. It also doesn’t applies the texture to obj file.
Does anyone know why it happens.

That’s a little more than a suggestion! It’s very helpful to actually show us.

The .mtl is probably linked incorrectly in the .obj file, or is not found in the right directory

1 Like

make sure the root URL is set correctly - you can monitor the network tab for file requests - they should match the declarations in the obj file.

@brianzinn
You mean the url of the obj files which is fed into the sceneloader.

Yes, because it’s added to the Mtl file links from the obj file. Check your network tab and make sure those files are being served.

2 Likes

Hello @Gowtham_T was your issue solved or are you still having issues?

Thanks for asking @carolhmj, my MTL file was not there in the location, redirected to proper location during preprocess and it worked for me.
Thank you :grin:

1 Like