How does Cesium have gltf model georeferenced?

As I discussed here

(Geometry twisted while given a vary large coordinate(e.g. under epsg:3857) · Issue #1610 · KhronosGroup/glTF · GitHub)

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:

“x”:12958095.124851028,“y”:4865499.469870342,“z”:0

Then the model will look like this:
QQ截图20190510113815

@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:

https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md

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

https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/Batched3DModel#batched3dmodelfeaturetablertc_center