First I want to state that the BabylonJS Editor is a great tool! However, we are currently struggling with importing GLTF/GLB files. Since I don’t know if this is a bug or expected behavior, I post it in the “Questions” section.
Problem description: When importing a GLTF/GLB file, the textures are not imported correctly (i.e. the black/red error texture is shown instead).
Version of Editor used: Latest Desktop (Electron) Version (2.5.2)
I notice that the created textures have urls that don’t exist anymore (and their names are not necessary the same as the textures files near the gltf file).
With a simple .babylon file that’s easy to retrieve textures sources has they are in separated files and urls are simply the filenames of the textures files. Not the case of glb and not necessary the case in all gltf files (embedded textures).
It is needed for the editor to retrieve textures files (or sources) as it can export the scenes users are editing to preview (like above)
Do you think I should create files by traversing the gltf file myself?
The textures that come from a glTF/glb will not always have a url. I think you need to take the texture data and export it, similar to what the glTF serializer does.