allow user to add layer from cesium ion asset
As a user, I wish to be able to add 3d tiles hosted on cesium ion such as a 3d drone photogrammetry. The user would provide an asset ID and a cesiumIONToken and a new user layer would be created that renders this. I can then modify the position, orientation, scale of the asset to match my scene.
R&D to make this
Here's the result of a timebox'ed exercise to get cesium ion tiles working in 3DStreet.
I was able to barely get cesium 3d tiles to load using the existing loader-3dtiles component by adding cesiumIONToken and url values. here is the syntax as json inside of 3dstreet.json scene:
{
"components": {
"loader-3dtiles": "url: https://assets.ion.cesium.com/2133402/tileset.json?v=3; cesiumIONToken: [redacted]; cameraEl: #camera;",
"rotation": "-90 0 90"
},
"data-layer-name": "CESIUM ION TEST Layer β’ Treat Plaza",
"element": "a-entity",
"id": "testingtesting123"
}
you can see it on this scene (to get this to work, you'll have to add a location to turn on google 3d tiles AND you have to enter viewer mode / return to editor) https://3dstreet.app/#/scenes/e3e314ef-656e-4a9e-a15a-abc9fb84b9be.json
unfortunately I can't save the scene. There is an error RangeError: Maximum call stack size exceeded when I attempt to save.
- should this be a new component such as cesium ion asset? that may address the saving issue at least. the user can also just provide an asset id and we use a default cesium ion token if none is provided.
- in theory we should use an api all to find the tileset URL instead of using the inferred URL structure: https://cesium.com/learn/ion/rest-api/#operation/getAssetEndpoint
- when loading the tiles there is a console error
Uncaught TypeError: Converting circular structure to JSON - this requires manual placement and sizing of the tiles. as a user scanning a scene, the only way to guarantee scale and placement is to use a meterstick or other calibration marker in the scene itself.
- do users expect to use both cesium ion tiles and google 3d tiles at the same time? yes this can work, video recorded, see below
- what is the next step? wait until customer is ready to use and then productize?
video of switching between google 3d tiles and a custom drone scan that has higher fidelity for striping and street surfaces
https://github.com/user-attachments/assets/1653fa19-052d-4730-abbf-d86a6c917089
@rahulkgupta when you get a chance could use your review of the above and provide feedback on next steps
i am having a hard time finding the PR. could you link it here?
@rahulkgupta there is not a PR. The above pasted json snippet can be injected in a scene's json description to load an arbitrary cesium ion asset ID. The problem is that there is no UI for a user to create this, and it does not save correctly it has to be manually inserted via firefoo or manual editing of JSON.
I made a commit on the 3dtiles loader repo just to update the demo with a cesium ion example if you want to see a declarative / a-frame version instead of json code: https://github.com/3DStreet/aframe-loader-3dtiles-component/commit/39e171fe20aef94e872fc461664c9132b587831b