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

Add per feature post processing to an entire 3D Tileset #6657

Open
bagnell opened this issue Jun 4, 2018 · 6 comments
Open

Add per feature post processing to an entire 3D Tileset #6657

bagnell opened this issue Jun 4, 2018 · 6 comments

Comments

@bagnell
Copy link
Contributor

bagnell commented Jun 4, 2018

Per feature post processing only works on individual features of a tileset. It woul be nice if it worked on an entire tileset.

See #6476 (comment)

@OmarShehata
Copy link
Contributor

This just came up on the forum. In this case, the tileset has no features. Since we now consider tilesets that don't have any features to implicitly all be one single feature (#7255), this may be easier to do now.

@ProjectBarks
Copy link
Contributor

From what I read in Cesium3DTileset.js this does not seem achievable without a large overhead. Since each tile is given its own pickId you would need to first recursively get all pickIds, then add them to the PostProcessingStageCollection.

Where it gets complicated is if any tiles unload/load back in; you would need to reflect those changes in the PostProcessingCollection. Managing that list of loaded/unload tiles would become burdensome. I think someone could implement this via existing API (without a cesium change) but certainty would be beneficial.

@ProjectBarks
Copy link
Contributor

If I were to go about solving this here is how I would do it:

  1. Make selected work on a wider set of cesium features. I know Models work but primitives, and entities do not. This is a consequence of their API's not exposing their pickId as a private property of their class. Fixing this would provide continuity over the post processing library.
  2. Make the .selected property of PostProcessingCollectionprovide inclusive and exclusive filtering. Currently post processing shaders will do one of three things: not respond at all _(the majority do this)_, filter selected inclusively, or filter selected exclusively. Because of the lack of consistency it makes it unclear what shaders work with the selected properties and which ones do not. Perhaps we have.selectedand.selectedMode: inclusive, exclusive`.
  3. Add 3D tileset support. Which would work as follows:

From what I read in Cesium3DTileset.js this does not seem achievable without a large overhead. Since each tile is given its own pickId you would need to first recursively get all pickIds, then add them to the PostProcessingStageCollection.

Where it gets complicated is if any tiles unload/load back in; you would need to reflect those changes in the PostProcessingCollection. Managing that list of loaded/unload tiles would become burdensome. I think someone could implement this via existing API (without a cesium change) but certainty would be beneficial

@OmarShehata
Copy link
Contributor

Came up again over email. Here the 3D Tileset was an individual building that they were trying to highlight with an outline over mouse over.

@Frank-Chan
Copy link

Came up again over email. Here the 3D Tileset was an individual building that they were trying to highlight with an outline over mouse over.

Any solutions there?

@cognitiveplus
Copy link

Hey guys, is it still not possible?
I would want to apply custom color correction shader to custom tiles, but using czm_selected() and stage.selected = [cesitum3DTileset] simply doesn't do anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment