glTF 2.0 GLTFLoader in Three.js: transparency, material smoothness, file size

I’m testing the Blender glTF 2.0 Exporter, to export 3D models from Blender to be imported by Three.js r87 GLTFLoader used in Freeciv WebGL. Previously, I used the Three.js BinaryLoader to import the Three.js binary format files into Freeciv WebGL. However, when I try to upgrade to using glTF 2.0 (binary .glb) format instead, I currently have these issues:

  • The alpha transparency of materials is not shown in the glTG 2.0 version. This can be seen on the Settlers unit. Does the GLTFLoader support transparency?
  • The material looks much smooter in the old BinaryLoader version, than in the glTF 2.0 GLTFLoader version.
  • The glTF 2.0 file is 725 kb, while the Three.js binary format file is 612 kb. (This is not a bug, but it is interesting to note!)

gltf-2 0-bugreport

The code I use to load the glTF 2.0 file is identical to the webgl_loader_gltf.html example.

Are these known limitiations of the glTF 2.0 GLTFLoader, or limitations of the Blender glTF 2.0 Exporter, or perhaps in my implementation ?

I have attached the Blender file and the exported .glb 2.0 file here also.

Author: Fantashit

1 thought on “glTF 2.0 GLTFLoader in Three.js: transparency, material smoothness, file size

  1. According this, all viewers are using the same loader, right?

    The loaders are different for each engine; it’s just that each of those engines uses WebGL.

    The model looks correct in my viewer (using the three.js engine and loader) and Babylon (using its own loader). VirtualGIS uses Cesium, so I think the problem is isolated to their engine. You can report that here:

Comments are closed.