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

Selection in overlays works poorly on data missing ways, especially in night mode #4417

Closed
matkoniecz opened this issue Sep 26, 2022 · 14 comments

Comments

@matkoniecz
Copy link
Member

At least for me selected segment is barely visible on red "data missing" lines (and also was with previous colour version).

Especially in night mode.

I tried few obvious small changes but without actually solving it, so I am opening an issue.

@matkoniecz matkoniecz added bug and removed bug labels Sep 26, 2022
@HolgerJeromin
Copy link
Contributor

ref #4362 (comment)

@westnordost
Copy link
Member

westnordost commented Sep 30, 2022

Maybe something like this would work better as a selection marker:

image

I.e. the element is circled from some distance. This should be doable with shaders. (With shaders, it could be animated, too...)

Though, I am not entirely sure if it can be cleanly "circled" or if it would rather look like two parellel red lines some distance from the object that are cut off at the ends. Probably... :-/

@westnordost
Copy link
Member

But what could be done in any case is to add a selection animation (e.g. runnings ants)

@dokutan
Copy link

dokutan commented Oct 1, 2022

I think animating the selection would help, but not solve the problem entirely. For example the red of the street lighting overlay and the selection color are just to close to be easily discernible (i assume it would be completely impossible for colorblind people). A better solution would therefore include changing at least the one of these colors completely.

@georg-d
Copy link

georg-d commented Nov 6, 2022

Animation is IMHO a good approach, as it is known for "selection" in many softwares like e.g. GIMP and it is unique within SC and thus easier to distinguish from other visuals. In contrast, circling will probably often hide other information in lower zoom levels which are automatically applied after selecting longer ways.

For example the red of the street lighting overlay and the selection color are just to close to be easily discernible ... A better solution would therefore include changing at least the one of these colors completely.

+1; the currently selected way could e.g. be pink (and may be additionally animated). In the display of v49.0 the selection is especially hardly visually distinguishable when also the slightly blue highlight of "where I walked along in the past" exists close to the selection – on red background, the blue and the yellowish selection look mostly the same, in some artificial lighting conditions it's even worse than on daytime, and they can only be told apart by the fact that the blue line is "not that straight" when zooming in a lot:

Screenshot_20221027-231338 lit overlay, visual difference too little between selected way and other ways

@hdevine825
Copy link

I'm also used to the zoom out to view the full feature that occurs with normal quests, could this be applied to overlays?

@westnordost
Copy link
Member

westnordost commented Dec 28, 2022

So, a running ant animation is actually very easy to do and looks nice, here is the diff:

diff --git a/app/src/main/assets/map_theme/jawg/streetcomplete.yaml b/app/src/main/assets/map_theme/jawg/streetcomplete.yaml
index b32171de8..c789f699f 100644
--- a/app/src/main/assets/map_theme/jawg/streetcomplete.yaml
+++ b/app/src/main/assets/map_theme/jawg/streetcomplete.yaml
@@ -45,6 +45,12 @@ styles:
     geometry-lines:
         base: lines
         blend: overlay
+        texcoords: true
+        shaders:
+            blocks:
+                color: |
+                    float y = step(0.33, mod(v_texcoord.y / 2.0 + u_time, 1.0));
+                    color.a = color.a * y;
     geometry-polygons:
         base: polygons
         blend: overlay

However, the animation comes out somewhat jerky. Even though it looks like it, I think it is actually not a performance issue but tangram-es for some reason just does not render every frame. If I consistently move the map around (to force it to re-render the map on each frame), the animation looks smooth. I don't know what exactly the issue is and/or how to turn it off/workaround it.

So, in my opinion, while the animation looks jerky, it is not an improvement because it looks annoying. Like a badly optimized game on a low-end computer.

Do try it out yourself if you like.

ants.mp4

@westnordost
Copy link
Member

westnordost commented Jan 10, 2023

Anyone tried this? If yes, did you also notice this jerkyness and did you find it as annoying as I did?

(Also, maybe set animated: true in the .yaml file, but for me it did not change anything)

@thefirethirteen
Copy link

thefirethirteen commented Jan 10, 2023

Anyone tried this? If yes, did you also notice this jerkyness and did you find it as annoying as I did?

(Also, maybe set animated: true in the .yaml file, but for me it did not change anything)

How would one go about testing this? My best guess is I need to edit the yaml file and compile StreetComplete?

I'd like to try it out and see how it solves the red on red is barely visible problem I encountered.

Other than that, while it may be jerky, it's progress in my opinion.

I'll try testing it out sometime soon.

@matkoniecz
Copy link
Member Author

How would one go about testing this? My best guess is I need to edit the yaml file and compile StreetComplete?

yes (either locally or using this magic github actions)

@georg-d
Copy link

georg-d commented Jan 10, 2023

Anyone tried this?

No, as I do not know how to compile a mobile app like SC and do not want to fiddle myself into that for just doing it once every few years. From what I can see in the video, the animation does IMHO not look that bad as you consider it, and it seems like an improvment – though the video is showing a good case, not the worst case (selection of a line that is red and nearby is yellowish movement trace).

mnalis added a commit to mnalis/StreetComplete that referenced this issue Jan 11, 2023
@mnalis
Copy link
Member

mnalis commented Jan 11, 2023

@thefirethirteen, @georg-d and other who might be interested in trying it out without investing a lot of effort:

If you'd like to try it out, I've built debug .apk at https://github.com/mnalis/StreetComplete/actions/runs/3889262551 (you need to download and unpack debug-apk.zip, and then install resulting .apk file, by clicking on it from your Android file manager).

(Note that Debug versions of StreetComplete such as that one can be installed/installed alongside official StreetComplete, and will not affect it. Note that this testing fork also has different Dark mode theme from streetcomplete/streetcomplete-mapstyle#141, but Light theme is the same).

As for my experience, it certainly makes the element to be changed VISIBLE, so it solves that problem.
On the first look however, I can't say I'm a huge fan of things moving on the screen constantly. 🤔

@RubenKelevra
Copy link
Contributor

Here's an example for lit on sidewalks. I cannot see any "selection" here.

InShot_20230421_203525432.mp4

@matkoniecz
Copy link
Member Author

we know, that is why this issue was opened and remains open as it is unfixed

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

No branches or pull requests

9 participants