gltf problem


I tried to show a gltf file into cesium, but it does
not appear.

The gltf is in the epsg:4326 projection.

I use the code below to add the gltf :

var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(0.0, 0.0, 0.0));
var model = scene.primitives.add(Cesium.Model.fromGltf({url:‘’,modelMatrix:modelMatrix,heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,scene:scene,scale:1.0,}));
Cesium.when(model.readyPromise).then(function(model) { console.log(model.boundingSphere) });

The model is not displayed and the log never appears in the console while the file seems to be loaded (no error displayed).

Can you tell me if the file is correct and how to add it in
cesium for it to work.


Test.gltf (470 KB)

Hi Thierry,

It looks like your glTF is quantized, and I also noticed that it consists of a large number small primitives. Usually a small number of large primitives is much more efficient when possible.

Do you have a special use case that needs quantization and the large number of small primitives?

Otherwise, did you try converting your model to an ordinary glTF using the default settings for obj2gltf or collada2gltf, and then displaying it on Cesium based on the 3D Models Sandcastle example?

If not, it’s all covered in this tutorial:




Thank you for your reply.
The file is extracted from a city in 3D CityGML format.
I used Global Mapper to convert the file into Collada, then the online converter Collada2Gltf.
I also tried the glb file but it did not show up either.
I wanted to know if the projection ESPG: 4326 is correct for a glft file?
I did different tests in different projections and sometimes psecifying the coordinates of the model in modelMatrix.
The model never appeared.
Is it really displayed or not?
Is it displayed in the right place?
I do not know how to check if it appears somewhere or not.
Did you try to visualize it?

Thank you

Test.glb (181 KB)