Why does Cesium ION use CMPT for my GLB upload, and can I control this?

Hi,

I’m trying to render some 3D tiles from Cesium ION using Deck GL.

The 3D tiles are created from a GLB model of a building which i’ve uploaded to Cesium ION.

The tiles partially load, but it seems that Deck GL can’t handle CMPT tiles very well (see: [Bug] Error: Tile3DLayer: Failed to render layer of type cmpt · Issue #8789 · visgl/deck.gl · GitHub).

According to that issue, they haven’t seen CMPT tiles used commonly.

My question is therefore:

  • In what circumstances does Cesium ION choose to make CMPT tiles, rather than b3dm, from a GLB model?
  • Can we force Cesium ION to create b3dm rather them cmpt - or do we have any control over this?

Thanks!

Hi,

If I understand correctly you tiled some data with Cesium ion and are trying to stream it in DeckGL but are getting an error about CMPT format data. You would like to produce B3DM based data instead.

Cesium ion supports a number of different formats and different options for tiling those format. It will help us better answer your questions if you can provide some additional information:

  • What is the format of the data you uploaded?
  • What program created this data?
  • Do you have a specific asset id for the asset that produced CMPT? That will allow us to look up the options used for this particular asset.

Regards,

Hi @mdc9001,

Thank you very much for looking into this. You understood correctly.

The file I uploaded is a GLB file. It’s a model of a building which was created in 3D Studio Max.

Here is the asset ID: 2434162

I also tried a modified version here: 2538925

Thanks

Thanks for that additional information. Those models were tiled with the 3D model setting. I have reached out to our team that works on that tiler to get more information about when it would produce B3DM vs CMPT output.

Thanks @Jason_Sobotka.

Sorry this might be me being stupid…but should I be able to access this asset via the usual API e.g.:

https://api.cesium.com/v1/assets/2542649

I get a 404 - not found when I try that.

Thanks,
Joe

Ah, I apologize. I don’t have a way to get it over to the right place.

Ultimately, composite tiles are part of the 3D Tiles 1.0 spec. Not properly supporting them is a limitation of deck.gl. Disabling it is not something we would expose to users.

See 3d-tiles/specification/TileFormats/Composite at main · CesiumGS/3d-tiles · GitHub

Ok - interestingly when I raised it with Deck GL they said they had never come across a need for CMPT. However, i’ve tried several GLB files and find it always produces at least some CMPT tiles.

We’ll explore further whether Deck GL could be modified to support them.

I’d be curious to know in what circumstances it produces CMPT tiles and whether it is anything to do with how the model is created? You mention that CMPT is part of the 1.0 spec. Are there any changes in 1.1. which may affect that?

I assume the tools you mentioned are not something available publicly?

Thanks for looking into it @Jason_Sobotka and @mdc9001

@joedc

It will generate composite tiles anywhere there are multiple materials or models within a tile. That’s interesting (and unfortunate) they said they found no need.

In 3D Tiles 1.1, cmpt is deprecated in favor of glb.

Here is something you can try. Download GitHub - CesiumGS/3d-tiles-tools and run the upgrade command on your tileset. It should convert the cmpt files into glb in a new 1.1 tileset. Once that is done, reupload into ion as 3D Tiles.

@Jason_Sobotka ok I see.

If cmpt is being deprecated it sounds like it may not be the best approach long term.

I’ll have a look at the new GLB approach in 1.1.

For context, I’m trying to use cesium ion to upload a fairly large GLB (>100mb) and to break it into tiles for improved performance over the web. So I’d like to understand in v1.1 if it’s possible to still ‘tile’ the GLB using cesium ion rather than having to download the full model when serving it.

I had a go with 3D-tile-tools earlier to try to convert the GLB to b3dm, but the output was a single b3dm the same size as the original GLB. I’ll look into it further as you suggest

@joedjc I have a workflow that should get you unblocked. I tested this with your tileset and it worked, so if you have any questions let me know.

  1. Upload your original asset into ion and select make available for download (or just make the existing tiled asset available for download)

  2. Download tileset and extract to a folder on disk

  3. For these next steps you will need node, npm, and git installed.

  4. open cmd/terminal git clone git@github.com:CesiumGS/3d-tiles-tools.git

  5. cd 3d-tiles-tools

  6. git checkout upgrade-cmpt We need this branch as the existing upgrade command doesn’t touch cmpt files. This branch will do the complete upgrade for us.

  7. npm install

  8. npx ts-node ./src/cli/main.ts upgrade -i <path to your tileset> -o <path to your tileset>/upgraded --targetVersion 1.1

  9. Once completed, you should see in the upgraded folder a tileset.json with a bunch of glb files. Zip these up and re-upload to ion, select 3D Tiles as the data type.

1 Like

Hi @Jason_Sobotka,

Sorry for the delay - I just got a chance to try this.

It worked perfectly! And Deck GL is able to render the 3D tiles.

Thank you very much for your help on this issue - really appreciated.

1 Like