0

I searched a lot of solutions online but none helped. I tried putting the gltf model on this website (https://gltf-viewer.donmccurdy.com/) and it is working fine but when I tried using it on glitch the texture and scene.bin file failed to load. https://glitch.com/edit/#!/feline-lifter?path=index.html:21:13

Error im getting: Error im getting

I kept getting this error and I don't know how to fix it! also this is my html code: html code

Paolo Mossini
  • 1,064
  • 2
  • 15
  • 23
nandayo
  • 11
  • 1
  • 1
  • Welcome to Stackoverflow, please provide the code which you have tried so we can reproduce your problem. – Tox Dec 23 '19 at 10:54
  • Does [this](https://stackoverflow.com/questions/59267892/gltf-file-not-showing-in-aframe) anwser your question ? – Piotr Adam Milewski Dec 23 '19 at 11:03
  • @Tox https://glitch.com/edit/#!/feline-lifter?path=index.html:21:13 u can try it here bro my code is all there at index – nandayo Dec 25 '19 at 15:45

1 Answers1

0

The errors suggest that something is trying to find resources at

https://cdn.glitch.com/textures/*something*.jpg

That something would be the GLFT Loader, which is fed with sinister lies in the .gltf file:

"buffers": [
{
  "byteLength": 12440812,
  "uri": "scene.bin"
}
],
"images": [
{
  "uri": "textures/alpha_baseColor.png"
},
{
  "uri": "textures/alpha_metallicRoughness.png"
},
(...)

if you look up the paths to the assets, they are neither in the textures folder nor in ..any folder. They are wherever glitch decides to throw them. So the paths in the .gltf file are not valid when it's being loaded at a glitch hosted website.

Either:

  1. Convert the model to .glb, which consists all resources
  2. Throw the model on github where paths are relative, making the paths valid.
  3. Change the paths using the glitch assets links.
Piotr Adam Milewski
  • 14,150
  • 3
  • 21
  • 42