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

Support EXT_mesh_features #407

Closed
nithinp7 opened this issue Nov 30, 2021 · 2 comments · Fixed by #654
Closed

Support EXT_mesh_features #407

nithinp7 opened this issue Nov 30, 2021 · 2 comments · Fixed by #654
Labels
enhancement New feature or request

Comments

@nithinp7
Copy link
Contributor

nithinp7 commented Nov 30, 2021

@kring I haven't fully dived into the spec differences between this and EXT_feature_metadata yet, but just to take inventory of the things that need to be done:

  • Add the EXT_mesh_features extension
  • Refactor upgradeBatchTableToFeatureMetadata so that it actually upgrades to mesh_features instead.
  • On the Unreal side, refactor FCesiumMetadataPrimitive (maybe just the constructor?) Will the in-memory representation of primitive metadata be the same, do the actual structures and metadata access api need any change?
  • Add FCesiumMetadataTexture (or some such name) and an api to access this on the cpu.
  • Styling? Is this just for metadata textures or for per-vertex metadata as well?
    • For metadata textures: can we send the texture itself straight to Unreal with a NEAREST filter, then in the fragment shader sample the feature id for that texel, and then do a color lookup in the fragment shader based on the id? Can the fragment shader part be deferred to the user, who presumably knows more about the tileset and the desired id-based coloring?
    • For per-vertex metadata styling, we'll need to hack a way to send feature ids as vertex data, probably sneak it through as a UV coordinate.

Does this list sound about right? Are there any huge pieces I'm missing?

@kring
Copy link
Member

kring commented Nov 30, 2021

Add the EXT_mesh_features extension

👍

Refactor upgradeBatchTableToFeatureMetadata so that it actually upgrades to mesh_features instead.

👍

On the Unreal side, refactor FCesiumMetadataPrimitive (maybe just the constructor?) Will the in-memory representation of primitive metadata be the same, do the actual structures and metadata access api need any change?

I'm not too familiar with what's different between the two specs. If the changes suggest API changes - e.g. new names, new concepts, etc - we should go ahead and evolve the API to match the spec. But no changes needed otherwise.

Add FCesiumMetadataTexture (or some such name) and an api to access this on the cpu.

👍

Styling?

Let's treat this as a separate issue, as it could easily be 10x the work of everything else here put together. :)

For per-vertex metadata styling, we'll need to hack a way to send feature ids as vertex data, probably sneak it through as a UV coordinate.

Static meshes have a "vertex color" that I believe is commonly used for this purpose. We're already using it for... actual vertex coloring though. So we'll have to figure out something there. Maybe even move to a custom static mesh class if necessary.

@ptrgags
Copy link

ptrgags commented Nov 30, 2021

@nithinp7 just to make sure you're aware, the EXT_mesh_features spec has a changelog at the bottom

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

Successfully merging a pull request may close this issue.

3 participants