An error occurred in the GLB file in the sandbox

Hi, I used blender2.8 to export GLB and GLTF, and this error occurred when I tried to upload it to the sandbox, the same error occurred in my project。

This is a GLB file:
http://cdn.xidayun.com/map23.glb

This file works fine on threejs, and I’ve found that Babylon can load properly if I don’t use AO maps.

This is how you set up the AO map in blender, and you can see a blender official document here:
glTF 2.0 — Blender Manual

Pinging our glb mastermind @bghgary

1 Like

This is because the glTF is using texCoord: 3 which is not guaranteed to work everywhere. Babylon glTF supports only 0 and 1.

See the table in https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes and the statement:

clients are not required to support more indexed semantics than described above.

If you intend on this glTF working everywhere, you can only use up to 2 UV sets.

I will add code to throw an error when texCoord >= 2.

1 Like

For this specific asset, there are only two texture UV sets, so there isn’t really a reason to use 0 and 3. It should just use 0 and 1.

1 Like

@bghgary Thank you for your answer. As you said, blender exported four sets of UV maps, because the default use of 0 and 3 in gltf caused this error. I have deleted 1 and 2. Now the problem has been solved. Thank you again.:smiley::smiley::smiley::smiley::smiley::smiley::smiley::smiley:

2 Likes