How does Cesium have gltf model georeferenced?

As I discussed here


When having gltf and glb file georeferenced, the coordinate could be very large, for example here in Beijing, China, a typical coordinate under epsg:3857 would be something like:


Then the model will look like this:

@javagl tells me that this is because gltf can’t handle coordinates that large and with more than 7 significant digits.

But in Cesium, to load gltf to a certain location is like:

var model = scene.primitives.add(Cesium.Model.fromGltf({
url : ‘modeldata/daedata.gltf’,
modelMatrix :Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(110.62898254394531, 40.02804946899414, 6.0));

Could you please tell me how dose Cesium handle those big coordinates?

Thank you.

I think the Cesium rendering engine stores positions using 2 float, to effectively emulate 64 bit precision, which is why it’s possible to place things at these very large coordinates.

The other thing was, at least with glTF 1.0, Cesium had an extension to store the world coordinate separately, and all the model vertices would be relative to that origin so they can remain small:

This is no longer part of glTF (as of glTF 2.0) but the 3D Tiles specification does have the same idea: