Importing UTM georeferenced model

Hey!

I’m trying to import a gltf-model which is georeferenced with UTM-32 CRS. And I’m unable to have it appear in Cesium. I’ve tried different scales and combinations of position-property, model-matrix and orientation. Spent a while looking through this forum to find a solution.

Can I please get some guidance on importing this correctly or to remove the georeference from the model before importing?
The models I’m dealing with is received from clients, so I don’t have the original project file for the model.

Using react-resium, code example:

if (context.viewer && context.camera) {
      const viewer = context.viewer;

      const model = viewer.entities.add({
        model: {
          uri: 'models/Bygning.gltf',
          scale: 1,
        },
        position: Cesium.Cartesian3.ZERO,
        // @ts-ignore
        orientation: Cesium.Quaternion.IDENTITY,
      });
    }

Example model:
Bygning.zip (148.5 KB)

Do you know what software exported this model? I think you’ll need to remove the georeference. Have you tried uploading it to Cesium ion (and select “Host as glTF”)? That may normalize the geometry to make it possible for you to position.

You may also find this community article useful on understanding how the coordinates work here: https://medium.com/terria/georeferencing-3d-models-for-cesium-7ccf609ee2ef

When I upload the model with .gltf and .bin file to Ion it doesn’t show up in the ion preview.

We found that we could use FME to remove the georeference, which works for now!

Glad to hear you’ve resolved this!

Can you tell me the asset ID for this? I’d like to take a look to determine whether this is a bug.

Hey!

The assetID is 116665

1 Like

Ok, so if you upload it and host it as a glTF, it won’t show up in the asset preview because the model itself is so far from its origin, but if you know where the model is supposed to be on the Earth and fly there you may see it.

If you upload it and tile it as 3D Tiles, Cesium ion will normalize the coordinates so it shows up in the asset preview window and can be positioned, but you’ll experience jitters because of the really large coordinates the model has.

So removing the georeference from the model itself and adding it when visualizing in CesiumJS will produce the best result as you’ve discovered. Thanks for sharing the asset ID so we can confirm that!

1 Like

Thanks for checking it out @omar!