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

Starting discussion on future extension support? #185

Closed
dbuck opened this issue Jun 3, 2021 · 7 comments
Closed

Starting discussion on future extension support? #185

dbuck opened this issue Jun 3, 2021 · 7 comments
Labels
enhancement New feature or request
Milestone

Comments

@dbuck
Copy link

dbuck commented Jun 3, 2021

I was checking out some of the recent changes in the 3d-tiles-next branch here, and it brought up some thoughts about future extensibility.

First item I was interested in the ability to just use GLTF as the content within tiles via 3DTILES_content_gltf
-> Replace the B3dm wrapper with gltf.

@gkjohnson
Copy link
Contributor

I think being able to register an extension that uses certain predefined hooks to preprocess tiles like seems like a good design in the long run. It looks like GLTFLoader lets you register a full class that defines the hooks you'd need, but I'm not super familiar with the details of that code. For some of the more basic extensions I think it makes sense to just support them by default, though, which is probably the easier place to start. Were there any other extensions you were looking at using? What kinds of hooks would they wind up needing?

For GLTF and GLB support I'd be okay with just adding those in the TilesRenderer.parseTile function. Looking at the Cesium implementation it seems they already load GLB and GLTF files for the 3d tiles as well as others.

It probably also makes sense to start logging unsupported extensions so it's more clear what functionality is being skipped or might be broken when loading a tileset with an extension -- though I'm not sure how many of those are out in the wild yet.

@Rennzie
Copy link

Rennzie commented Dec 21, 2021

Hey @gkjohnson had you given this much more thought? We're looking at using the upcoming gltf extension EXT_mesh_features. Possibly something we could help with next year.

@gkjohnson
Copy link
Contributor

Hi @Rennzie! #230 by @dbuck adds support for the 3DTILES_content_gltf extension which will enable use of GLTF and GLB files in the tileset json files. That PR is nearly done and should be ready to merge after a couple more changes.

It doesn't add support for the GLTF extension EXT_mesh_features, though, and typically GLTFLoader extensions live in the three.js repo. However given that the extension seems designed with 3d tiles use cases in mind and I expect it to use Batch and Feature Table implementations I'm happy to house it in this repo. If you'd like to provide a GLTFLoader extension implementation in a PR along with some tests and sample data we could get it merged. I think step one is just getting the extension going and once #230 is merged we can get it integrated in TilesRenderer.

@dbuck
Copy link
Author

dbuck commented Jan 4, 2022

I went a little deeper on extensions today. In addition to the basic GLTF support in #230, I've got a first pass ExtensionSystem modeled very loosely after the GLTFParser plugin system.

Test here: matterport#4 if you have some early thoughts @gkjohnson? - It's sitting on top of #230 + some other utilitarian changes so it's too messy for a direct PR as yet.

@gkjohnson
Copy link
Contributor

@Rennzie #230 has been merged now and I've created #236 to track the implementation of EXT_mesh_features if you'd like to contribute.

@Rennzie
Copy link

Rennzie commented Jan 19, 2022

Hey @gkjohnson, sorry for the delay (holidays and all).

Our priorities have changed at the start of this year so I'm not going to be able to make an immediate start. Hopefully that changes but please don't wait.

@gkjohnson gkjohnson modified the milestones: v0.x.x, v0.3.36 Jul 6, 2024
@gkjohnson
Copy link
Contributor

I added some basic plugin architecture in #603 that is heavily inspired by three.js' GLTFLoader plugin system. Basically you register a plugin and the TilesRenderer class can call a specific function on one or all registered plugins at different points during the tiles renderer update / load loop. We can continue to add new "hooks" as needed to support new plugins we want to provide in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants