Skip to content

Use scene.pick to get per-point properties #7408

@lilleyse

Description

@lilleyse

Per-point properties (intensity, etc) can be used for styling but cannot be fetched back. A use case is being able to pick a point on the screen and get its properties.

One approach I could see here:

  1. Render each point's index in the pick pass.
  2. Use that index to fetch the value in the property's vertex buffer.

For (1) we would need to add a per-point ID vertex attribute. In WebGL 2 we can instead use gl_VertexID. This might be a special case for the pick pass because we don't want to create a pick id for every point. We'd also need to think about how this relates to Cesium3DTileFeature.

To speed up (2) we could keep vertex buffers resident on the CPU instead of offloading to the GPU like we do now. Maybe it would be on demand since we wouldn't want to do that by default.

Forum post: https://groups.google.com/forum/#!msg/cesium-dev/hjSPlQZjdc4/jKUdE9nDCAAJ

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions