Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: fetch failed #237

Open
akdmousom opened this issue Dec 12, 2023 · 5 comments
Open

TypeError: fetch failed #237

akdmousom opened this issue Dec 12, 2023 · 5 comments

Comments

@akdmousom
Copy link

When i try to transform this error show me.

gltf prob

@yuepem
Copy link

yuepem commented Oct 3, 2024

Hi, have you solved it?

@donmccurdy
Copy link
Member

donmccurdy commented Oct 3, 2024

Would it be possible to share a .gltf model in a .zip, to reproduce this problem?

Aside, I would strongly recommend NOT applying Draco before passing the model in with the --transform flag. The --transform flag must then decompress the data, and then recompress it, and this will introduce additional compression-related quality loss unnecessarily. The --transform flag applies Draco automatically. I think normally there would be a warning logged about that, but perhaps it's not getting that far due to the error, of which I'm not sure of the cause.

@yuepem
Copy link

yuepem commented Oct 3, 2024

Hi, I downloaded the 3D model from Sketchfab. It contains 4 files, as shown in the screenshot below. I navigated to the folder containing these files in my terminal and executed the command: "npx gltfsx name.gltf" then got that error; The strangest thing is it worked well for the first time, and it failed when I tried the second model.
image
Here is the files:
earth.zip
Thanks

@donmccurdy
Copy link
Member

donmccurdy commented Oct 3, 2024

Hm, for me this completes quickly on the attached model.

npx gltfjsx --transform ./scene.gltf --transform

I'm using Node.js v20, I would expect this to work on Node.js v18+, is it possible you're using an older version?

I would also caution that this model relies on the old spec/gloss glTF extension, and three.js requires metal/rough PBR. To see the correct appearance in three.js you'll need to convert the materials. That conversion, and optionally packing to .glb, may resolve these issues as well.

@yuepem
Copy link

yuepem commented Oct 3, 2024

I tried, but still failed. Could you explain how you did it? What dependencies did you use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants