Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow user to add layer from cesium ion asset #794

Open
kfarr opened this issue Aug 27, 2024 · 3 comments
Open

allow user to add layer from cesium ion asset #794

kfarr opened this issue Aug 27, 2024 · 3 comments
Assignees

Comments

@kfarr
Copy link
Collaborator

kfarr commented Aug 27, 2024

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?

Image

video of switching between google 3d tiles and a custom drone scan that has higher fidelity for striping and street surfaces

google-3d-tiles-custom-scan.mov
@kfarr kfarr self-assigned this Aug 27, 2024
@kfarr
Copy link
Collaborator Author

kfarr commented Aug 28, 2024

@rahulkgupta when you get a chance could use your review of the above and provide feedback on next steps

@rahulkgupta
Copy link
Collaborator

i am having a hard time finding the PR. could you link it here?

@kfarr
Copy link
Collaborator Author

kfarr commented Aug 29, 2024

@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:
3DStreet/aframe-loader-3dtiles-component@39e171f

@kfarr kfarr changed the title test custom cesium ion asset with aframe-loader-3dtiles-component allow user to add layer from cesium ion asset Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Do - Soon
Development

No branches or pull requests

2 participants