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

Declutter roadmap #1097

Open
4 tasks
pjcozzi opened this issue Aug 30, 2013 · 4 comments
Open
4 tasks

Declutter roadmap #1097

pjcozzi opened this issue Aug 30, 2013 · 4 comments

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 30, 2013

A ESA Summer of Code in Space 2013 project.

Usecases

Expect 10s to 100s to 1,000s of labels. We don't need to do the advanced cases below right away.

  • Lots of static labels, e.g., labels for all the states in the US.
  • Lots of dynamic labels, e.g., our KML of all the satellites.
  • Combination of static and dynamic labels.
  • Adding and removing labels at runtime.
  • Changing a label's scale, pixel offset, eye offset, etc. at runtime.
  • Have 2D screen-space regions that are keepout zones, i.e., areas that decluttered labels can't enter. These areas may be used for a heads-up-display or credits display.
  • Advanced: (well not that advanced), declutter billboards and declutter groupings like labels and billboards linked together.
  • Advanced: Keep labels above and/or in front of terrain. Perhaps based on Enhancing the Visibility of Labels in 3D Navigation Maps.
  • Advanced: Declutter a label from a model with articulations, e.g., using dynamic eye offsets.

Design Goals

  • Practical - it's one thing to just minimize overlap between 2D bounding boxes on a 2D screen, but it is another thing to usefully declutter labels in the scene and convey labels at the right level of detail in a meaningful way. For example, making it so that 2,000 labels don't overlap still clutters the screen with 2,000 labels. Hierarchical approaches need to be used.
  • Robust - given the wide array of usecases, our algorithm needs to be tested with a variety of input.
  • Performance - the algorithm needs to run very quickly since it needs to be recomputed frame-to-frame. Can we exploit frame-to-frame coherence? Will web workers lag too many frames behind? Is a GPU implementation possible?
  • Temporal coherence - when labels or the camera move, the declutter algorithm shouldn't drastically snap labels into place. Instead the label should be moved into place over several frames.

We care much more about a useful solution than a fancy implementation.

Approaches

Some ideas discussed with @ognjenb for brainstorming...

Low-tech

  • Change label scale, translucency (even down to 0 - transparent), or screen-space rotation angle based on one or more criteria:
    • Distance to label from the viewer
    • Number of overlapping labels, e.g., if two labels collide, fade one or both out
    • As the view changes from a top-down to a horizon view (useful for ground scenarios)
  • Limited: change a label's horizontal and vertical origins to move it to the right/left or up/down. A label's pixel offset provides more fine-grained control.
  • Use priority to minimize the movement of labels from their initial position. For example, static labels may stay fixed, but dynamic labels are allowed to move. In general, a Cesium app will not often know a priority other than static or dynamic.
  • Allow the user to select the maximum number of labels to show, then pick the "best labels" each frame.
  • Option to draw lines from a decluttered label to its original world-space position.
  • Define a maximum distance that we are willing to move a label before we allow it to overlap (perhaps with translucency).

Hight-tech

  • Combining labels in hierarchies built in advance (not per frame) using k-means clustering in world space, i.e., 3D space, not 2D screen-space. Combine based on similar strings and proximity?
  • Combining labels dynamically based on bounding-box overlap in screen space.
  • Force vectors, masses and springs, and collision via separating axis theorem of bounding boxes. Temporally Coherent Real-Time Labeling of Dynamic Scenes. Can we speed this up by only using forces in a local neighborhood? And/or only running this on parts of the screen that need it?

Supporting Cesium Features

Test Data

TBA

Papers

@ognjenb
Copy link
Contributor

ognjenb commented Aug 30, 2013

Thank you for the summary! There are 2 studies I did not see before.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Feb 17, 2015

Chapter 4 of Usability Oriented Visualization Techniques for 3D Navigation Map Display (2014) may also be useful.

@adivalerio80
Copy link

I am having an issue in facilities.kml where the labels are cluttered. I have looked ant your suggestions above. I resized the labels and the text but it doesn't solve the whole issue. I am currently trying to make the labels a fixed size in the kml so that when you zoom in they labels naturally get bigger. Do you have any suggestions?

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Nov 3, 2016

Initial implementation: #4240

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

No branches or pull requests

4 participants