Bug - in GLTF LOADER

Good day, downloaded GLTF file from sketchfab.com is not loading, it gives an error.
I thought there was a bug in the file structure that something was wrong, but the resource https://sandbox.babylonjs.com/ opens it without problems.

File GLTF
http://wstgame.online/debug_gltf.zip

And also please add the ability to rotate the image for the texture in the editor. In the code then we can make texture.flipY = false; but the editor does not have it.

Have you tried loading in to a glTF viewer? https://gltf-viewer.donmccurdy.com/

Yes, I tried it, the same error, the same bootloader is used in this view.

The file looks fine on https://gltf-viewer.donmccurdy.com/, for me:

I don’t think the three.js Editor lets you drag in a whole folder like that. You may need to pack it into a self-contained GLB using Blender, glTF-Pipeline, or glTF-Transform.

1 Like

This is not the first file with which there is a problem, if you need a visual example, then here is a video.

The editor cannot load multiple files at one time. You can report this as a feature request on the three.js github repository, but for now the only workaround is to combine the files into a .glb.

You are wrong, the editor can load a list of files, and even in the archive, the only problem is that the pictures, if they are not at the root, will not be able to load, but this is easily corrected in the gltf file itself through a regular notepad.

image

You see, I just deleted the paths and moved the pictures to the root as I actually showed them in the view.

Are you sure it’s a GLTFLoader issue? First, the zip you linked does load in the gltf viewer. Second - according to the Network panel, the issue appears only because the paths in the editor are resolved relatively to the root domain (and not as blobs as it’s done in the gltf viewer):

Seems like something to report, but not as an issue with GLTFLoader but with the editor? :thinking:

))) You watch the video carefully, I’m not uploading in the archive, but just files in bulk.

I will show everyone clearly how it works for those who did not know.

Yes, I did upload both as a zip (not modified as you did in the video), and as separate files (also unmodified.) And both seem to work in the gltf viewer for me.

So the question still stands - whether it’s the GLTFLoader or the editor path resolution issue (unless I absolutely miss the point :sweat_smile: )

Now this is already interesting, but judging from your video, you have a Linux operating system, and I have Windows 7, the error is - Unssuporting file format (png).

And I can be wrong, but either with the encoding something is wrong, or with the file itself. But here https://sandbox.babylonjs.com/ there is no such problem, everything loaded fine here.

Yep, not saying it’s impossible. That video was from MacOS, also tested on Windows10 just now, and it seems to be alright:

When you are uploading these files to https://gltf-viewer.donmccurdy.com/ you get errors in the console? If yes, could you share a screenshot of how the Network tab in devtools looks (it should have a few blob: requests after you upload the files.)

And you are uploading the unmodified debug_gltf.zip from the first post to the gltf viewer (as either zip or separate files)?

(As for the three editor - it’s probably ok to assume for now it’s a bit bugged; the editor seems to try and fetch the files from the root domain, so it simply receives an invalid response instead of models / images.)

The error is that one and the same, that in a crowd of files to transfer that in the archive.

:eyes:

And what requests / responses appear in the Network panel when you drop the zip / files over the viewer?