Problem with gzipped tileset

Hi Cesium community,

I have gzipped the tileset and trying to use it in cesium js from my local system but it is giving unexpected token error/ is not valid json, please look into attached
gzippedtileerror.

My question is, can I directly use gzipped tilesets from my local system or not?
if not, how can I enable my iis server for gzipped tilesets if i’ll pass gzipped tileset (stored in postgresql database/3dcitydb) through iis server?

Thanks
Basant

Hi @basant1431,

Were all the files gzipped together? Generally tiles are served rather than being loaded directly from disk, and are served as a tileset.json file and a tree of tile files.

There is a .3dtiles database file you can create with open source tooling, but that is generally then passed to other tools like Cesium ion or an on premise asset server which serves the json and tile files at separate urls. It’s not loaded directly into CesiumJS or other runtimes.

Individual gzipped files should be fine, but need to be served with the correct encoding. CesiumJS’s server.js should have an example of how to do this.

Thanks,
Gabby

Hi @Gabby_Getz ,

For now I have compressed one individual tileset using CesiumGS/3d-tiles-tools and has served to cesium js like below:-
viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: ‘./3DTilesData/CESIUM_Tileset_Solid/LOD2_wt-gzipped/tileset.json’
})).
I have gone through .3dtiles database file, but the problem is, There is no instructions how I have to use it with postgres/3dcitydb database on iis server (our application is running on iis server). So, can you please just give me some instructions on how I have to use it with postgres/3dcitydb database on iis server.
One more thing, Our tileset has been created from citygml files, but I can see “3D Tiles Tools” are mostly built for the tiles which are created by gltf files. so, will 3d tiletools work properly for the tilesets which are created by other format than gltf.

Thanks
Basant

Hi there,

Again, the .3dtiles database file is not served statically as is. You will need to break the file apart into the tileset.json file and individual tiles.

I’m not sure there is free or open tooling for serving 3dtile file directly. You can upload it to Cesium ion if a cloud-based solution will work, or we do have an asset server configured for serving these locally as part of our on-prem solution.

so, will 3d tiletools work properly for the tilesets which are created by other format than gltf.

It should. If not, you can file a ticket with that github repo with the specific details.

I’m hesitating to point to this, because it really is only a VERY basic draft, but there is a PackageServer.ts in the demos/ folder of the 3D Tiles Tools that shows the basic approach of serving the contents of .3dtiles files directly. This contains several TODO comments, and is NOT intended for real applications, but may be useful for first, basic, internal experiments.