Roassal3 icon indicating copy to clipboard operation
Roassal3 copied to clipboard

Support Level of Detail simplification for text

Open tinchodias opened this issue 5 years ago • 4 comments

Due to zoom out effect, text labels can be illegible so probably a view render can be optimized by drawing a horizontal line instead. Example of the scenario:

Screen Shot 2019-06-25 at 11 05 32

I read this technique is called Level of Detail in 3d rendering, that simplifies the polygons and textures that are too far away from the camera.

tinchodias avatar Jun 25 '19 15:06 tinchodias

The thickness of the horizontal line should be the height of the text. So, I add to this issue: if the height of the text will be much less than a pixel, then it can just be ignored in rendering. I mean, something like:

  • [ textHeight > 3 pixels ] => [ renderText ]
  • [ textHeight <= 3 pixels ] => [ renderLine ]
  • [ textHeight < 0.5 pixels ] => [ doNothing ]

What do you think?

tinchodias avatar Jun 25 '19 15:06 tinchodias

Make sense to me. We could have 8 pixels and 3 pixels as thresholds instead.

bergel avatar Jun 25 '19 15:06 bergel

In this case should I put and interaction for the canvas to do that or is this supposed to be the default behavior of rendering for RSLabel?

akevalion avatar May 05 '20 00:05 akevalion

Do we still need this?

akevalion avatar Sep 21 '20 17:09 akevalion

Created new class to handle this behaviour RSZoomLevelText https://user-images.githubusercontent.com/10532890/195396232-9734a609-2087-4cb1-a3f7-497d2cbb0406.mov

akevalion avatar Oct 12 '22 16:10 akevalion