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

3d tiles renderer js migration bootstrap #2295

Open
wants to merge 3 commits into
base: 3d-tiles-migration
Choose a base branch
from

Conversation

jailln
Copy link
Contributor

@jailln jailln commented Mar 15, 2024

Description

Starts the migration towards using 3dtilesRendererJS for 3D tiles. I created the 3d-tiles-migration branch in which we can merge our work related to this migration. This is a first implementation with some TODOs left in the code

Already implemented:

  • Create a new 3D tiles layer using 3dtilesrendererjs and deprecate C3DTilesLayer
  • Draco and KTX2 support
  • Cesium ion support
  • Google 3D tiles support
  • Gltf 1.0 support
  • CESIUM_RTC GLTF 1.0 extension support
  • itowns PointsMaterial support (ongoing)

Some TODOs left in the code (don't hesite to give your opinion), commits are still messy and still some stuff to do to be iso with the C3DTilesLayer implementation (see below).

Motivation and Context

#2225

Notes on the implementation

  • Used the name ThreeDTilesLayer, WDYT?
  • Even if 3dtilesRendererJS TilesRenderer is conceptually not at the same level than an itowns Layer, I decided to instance one TilesRenderer per ThreeDTilesLayer. Also I kept the C3DTilesIonSource and C3DTilesGoogleSource for C3DTilesLayer to keep working but also to keep itowns Source / Layer instanciation logic in the API (even if these sources are not really useful anymore now that we use 3dtilesRendererJS because all the logic related to querying cesium ion an google sources are handled by 3dtilesRendererJS).
  • I implemented a wrapper around threejs GLTFLoader and LegacyGLTFLoader that loads gltf regardless of their version (1.0 or 2.0) and that shares the same interface than three GLTFLoader to allow loading gltf 1.0 files with 3dtilesrendererjs (named iGLTFLoader for "itownsGltfLoader"). This class is exported so users that need to load gltf 1.0 or 2.0 files in their applications can benefit from it.
  • I implemented CESIUM_RTC gltf 1.0 extension support in the LegacyGLTFLoader
  • Regarding draco and ktx2, I decided to keep the static enableDracoLoader and enableKTX2Loader that sets the draco and ktx2 path in itowns internal instance of iGLTFLoader.

Don't hesitate to give your opinion on these choices :)

First tests

I started running some tests, it seems that:

  • Google 3D tiles display is lightning fast
  • 3dtiles_25d.html example seems slower
  • Point clouds:
    • slower
    • there seems to be a SSE issue (some visible tiles are not loaded)
    • the batch table is not loaded

I will take some time today to do some more performance tests and try to assess where these drawbacks may come from.

Remaining TODO

Still a lot to do, see this list :)

feat(3D tiles): add C3DTilesGoogleSource to start supporting Google 3D
Tiles (experimental)

fp
feat(3D tiles): add C3DTilesGoogleSource to start supporting Google 3D
Tiles (experimental)

BREAKING CHANGE: glTFLoader and legacyGLTFLoader are no longer exported.
Use GLTFParser instead (supports both 1.0 and 2.0 gltf files)
@jailln jailln force-pushed the 3d-tiles-renderer-js-bootstrap branch from d48f0d3 to 9e5266b Compare March 18, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants