Missing texture in GLB prevents load

I’m trying to load several glb models that contain missing textures (I’m ok with seeing them without the textures) and instead of loading without the textures, it just refuses to load. Is there a way I can force it to load without the missing texture(s) without it failing?

https://www.babylonjs-playground.com/#KXPI57#1

1 Like

I don’t think the missing image is the problem for not loading the file, you have other problems in it:


You should fix the first two problems and see how it goes.

What you can do is loading the file in Blender and re-save it: the file will be ok and you will be able to load it with Babylon.

4 Likes

Thank you for the reply, I was unaware of that gltf validator. Very handy!

1 Like

Hello! i want to import .gltf without texture, those texture’s url contained in gltf.
gltf.zip (1.0 MB)

how to prevent loading texture?

the answer is get .gltf by XMLHttpRequest, convert file to JSON, find that uri, delete them, convert JSON to blob, create createObjectURL and put it into scene. simple yo

additional may be will be right to check if this url exist, and if not - delete

I found the append method, so its must not to transform data to blob and create url, just change gltf json and push to append