3D Tiles tileset.json seems to be wrong?

I’ve been using GitHub - tum-gis/cesium-terrain-builder-docker: Dockerfile for the geo-data/cesium-terrain-builder app with quantized mesh support. to create terrain files.

However, when I upload them to cesium ion there are no issues, but if I use them in my code then I get the error

DeveloperError: Expected schema to be typeof object, actual typeof was string
Error
    at new DeveloperError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:10062:13)
    at Check.typeOf.object (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:10160:13)
    at MetadataSchema.fromJson (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:75500:26)
    at new MetadataSchemaLoader (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:75646:69)
    at ResourceCache.getSchemaLoader (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:76161:20)
    at processMetadataExtension (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:125036:44)
    at Cesium3DTileset.fromUrl (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:124896:37)
    at async window.startup (<anonymous>:16:3) (on line 13)

Not sure what the issue is? Is something missing from my tileset.json below?

{
  "tilejson": "2.1.0",
  "name": "etl_split_xyz2_rasterized_cog",
  "description": "",
  "version": "1.1.0",
  "format": "heightmap-1.0",
  "attribution": "",
  "schema": "tms",
  "extensions": [ "octvertexnormals" ],
  "tiles": [ "{z}/{x}/{y}.terrain?v={version}" ],
  "projection": "EPSG:4326",
  "bounds": [ 0.00, -90.00, 180.00, 90.00 ],
  "available": [
    [ { "startX": 0, "startY": 0, "endX": 1, "endY": 0 } ]
   ,[ { "startX": 2, "startY": 1, "endX": 2, "endY": 1 } ]
   ,[ { "startX": 4, "startY": 3, "endX": 4, "endY": 3 } ]
   ,[ { "startX": 8, "startY": 6, "endX": 8, "endY": 6 } ]
   ,[ { "startX": 16, "startY": 12, "endX": 16, "endY": 12 } ]
   ,[ { "startX": 32, "startY": 25, "endX": 32, "endY": 25 } ]
   ,[ { "startX": 64, "startY": 50, "endX": 64, "endY": 50 } ]
   ,[ { "startX": 128, "startY": 100, "endX": 128, "endY": 100 } ]
   ,[ { "startX": 257, "startY": 201, "endX": 257, "endY": 201 } ]
   ,[ { "startX": 515, "startY": 403, "endX": 515, "endY": 403 } ]
   ,[ { "startX": 1031, "startY": 807, "endX": 1031, "endY": 807 } ]
   ,[ { "startX": 2062, "startY": 1614, "endX": 2063, "endY": 1615 } ]
   ,[ { "startX": 4125, "startY": 3229, "endX": 4126, "endY": 3230 } ]
   ,[ { "startX": 8250, "startY": 6459, "endX": 8252, "endY": 6460 } ]
   ,[ { "startX": 16501, "startY": 12919, "endX": 16504, "endY": 12921 } ]
   ,[ { "startX": 33002, "startY": 25838, "endX": 33008, "endY": 25843 } ]
   ,[ { "startX": 66004, "startY": 51677, "endX": 66016, "endY": 51686 } ]
   ,[ { "startX": 132009, "startY": 103355, "endX": 132032, "endY": 103372 } ]
   ,[ { "startX": 264018, "startY": 206711, "endX": 264064, "endY": 206744 } ]
   ,[ { "startX": 528036, "startY": 413422, "endX": 528128, "endY": 413489 } ]
  ]
}

Hey @a.okeefe289, thanks for the question.

It looks like you’re actually creating a quantized mesh not 3d tiles. These normally have a layers.json not a tileset.json. They also need to be loaded as a terrain provider in CesiumJS instead of as a Cesium3DTileset. I believe CesiumTerrainProvider.fromUrl or CesiumTerrainProvider.fromIonAssetId may be what you want. We have a Sandcastle demo showing this off.

Let me know if you’re still having issues and we can try and figure it out.