3D tiles positioning

For our Cesium for Unity application we would like to render glb 3D building models as 3D tiles next. Unfortunately we still have some questions about the tileset.json file. With the following configurations our test building is rendered in the correct position:

{
  "asset": {
      "version": "1.1"
  },
  "geometricError": 20,
  "root": {
    "content": {
      "uri": "./building.glb"
      },
      "refine": "ADD",
      "boundingVolume": {
          "box": [
              0,
              0,
              10.119662404060364,
              28.177593231201172,
              0,
              0,
              0,
              24.83393669128418,
              0,
              0,
              0,
              10.119662404060364
          ]
      },
      "geometricError": 20,
      "transform": [
          -0.10187534919360568,
          0.837270424015565,
          0,
          0,
          -0.6500096920251116,
          -0.07909029443162949,
          0.5316318983137301,
          0,
          0.527739673707239,
          0.06421302126545078,
          0.6548036914983467,
          0,
          3998908,
          486569,
          4928510,
          1
      ]
  }
}

Is there a way to do this without the transformation? Since we want to render many more buildings, it is not possible to manually adjust the transformation values for each object. In the example, the transformation was necessary to move the building to the right place and scale it to the right size.

Otherwise, is there a way to georeference a 3D model beforehand, then reference it in the tileset.json file to have Cesium put it in the right place?

Should we specify a region instead of the box? If so, what is the workflow in Cesium for this?

Thanks for your help!

1 Like

I haven’t found it, but I’m writing my own importer. Maybe it’ll help you to calculate transform. Here is code:

Here is compile program jave8:

How use:

  1. Fine Place on Cesium Map Latitute,Longtitute and Heght. I use Global Anchor in UE:
    image
  2. Put this coordinate to java program:
  3. Choose glb file, scale and rootate object:
  4. Choose cataloge to write json and click create tileset:
  5. Open localization file:
    image
  6. enjoy model in cesium:

Use this tool to make own structur 3D Tiles.