3d models (glb) loading in different coordinates

1. A concise explanation of the problem you're experiencing.

we are loading the 3d model (glb) using cesium .These models are provided by our clients.
When are loading these models are rendering in different coordinates.
Even when i specify particular location using modelMatrix.
Attached sample file for your reference

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

var viewer = new Cesium.Viewer('cesiumContainer');
    var scene = viewer.scene;
    viewer.extend(Cesium.viewerCesiumInspectorMixin);
    var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
    Cesium.Cartesian3.fromDegrees(-75.62898254394531, 40.02804946899414, 0.0));
var model = scene.primitives.add(Cesium.Model.fromGltf({
    url : '/assets/jayanagar.glb',
    
    modelMatrix : modelMatrix,
    scale : 200.0
}));

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
My client wants to load 3d models with shops images

4. The Cesium version you're using, your operating system and browser.
latest version , using chrome browser

jayanagar.glb (3.1 MB)

Can you provide a full code example I can run on Sandcastle (https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html) ? For example, I don’t see how you’re defining the model matrix.

You should be able to position the model directly just by passing in a position, like in this example:

https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=3D%20Models.html

It would also help if you explain what you expect the correct position to be, and where they are showing up instead. For example, are they on the different side of the globe? Or just a few meters off? Or is just the orientation that’s incorrect, and the position is correct?

Hi Omar,

Thanks for the response.

Here is my full code.
<html lang="en">
<head>
  <meta charset="utf-8">
  <script src="https://cesiumjs.org/releases/1.58/Build/Cesium/Cesium.js"></script>
  <link href="https://cesiumjs.org/releases/1.58/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
</head>
<body>
  <div id="cesiumContainer" style="width: 700px; height:400px"></div>
  <script>
    Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyYTIxNzIxNC05MTU4LTRkMzYtYTk4My1jZjY2YWU1NzAwOTYiLCJpZCI6MTE1NjYsInNjb3BlcyI6WyJhc2wiLCJhc3IiLCJhc3ciLCJnYyJdLCJpYXQiOjE1NTkyMjY3OTR9.DbPDfD1Nnb9dDigvG6uh_qmF-FHhIcZNhKTfiJAXha4';
    var viewer = new Cesium.Viewer('cesiumContainer');
    var scene = viewer.scene;
    // viewer.extend(Cesium.viewerCesiumInspectorMixin);
    var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
    Cesium.Cartesian3.fromDegrees(-75.62898254394531, 40.02804946899414, 0.0));
    var model = scene.primitives.add(Cesium.Model.fromGltf({
    url : '/assets/jayanagar.glb',
    modelMatrix : modelMatrix,
    scale : 200.0
}));

  </script>
</body>
</html>

I followed this link

Yes the 3d model is loading few metres off.

Thanks for providing the sample code. One more thing to test out, can you try uploading the model to cesium.com/ion, and then using the positioning tool (click “Adjust Tileset Location” in the top right after it finishes uploading & tiling) to position it? Let me know if you’re able to get it in the right position visually using that tool.

Hi Omar, I tried uploading model to ion and after uploading first it showed me a message like " Tileset location has not been set"

You should now be able to position the tileset on Cesium ion. This link will take you to the dashboard with a tutorial in the bottom right that will show you how to do that:

https://cesium.com/ion/assets/1?t=tilesetTransform