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
[2.5D Map] Draw tour track with colors which depend on track values, e.g. elevation #893
Comments
It seems that I found a very helpful description from the 2.5D map creator ("... I investigated various approaches to line rendering ..."), how lines are painted in the 2.5D map. Until now I did not understood why it is so more complex compared than using a simple line drawing command but this description tells it. https://blog.mapbox.com/drawing-antialiased-lines-with-opengl-8766f34192dc Website as PDF: Drawing Antialiased Lines with OpenGL by Mapbox maps for developers.pdf This is another description how to draw lines with OpenGL https://blog.scottlogic.com/2019/11/18/drawing-lines-with-webgl.html Website as PDF: Drawing Lines with WebGL.pdf |
2D vs 2.5D @wolfgang-ch: it seems so, that you have now understood this complicate opengl stuff... |
This description https://blog.mapbox.com/drawing-antialiased-lines-with-opengl-8766f34192dc helped me a lot to understand what is going on in the two shaders but all the mathematics is still a part which I don't fully understand. |
The hexagon is not a bitmap it is drawn with OpenGL commands https://github.com/mytourbook/mytourbook/blob/ws-map25-track-color/bundles/net.tourbook/src/net/tourbook/map25/HexagonRenderer.java but a compass rose could be an additional bitmap layer or you can draw it with OpenGL commands :-) |
What makes it also very complex is that the 2.5D map OpenGL commands are distributed over several methods and classes (files) and it's difficult to know what is currently set or not set because these commands depend on each other. In the above hexagon example there are also some OpenGL commands which are outsourced, e.g. |
i think a bitmaplayer would zoom and move together with the map, but the compass should be fixed in size and position. This would be ideal:
but i am not sure where to put the "cafe.svg" graphics. i do not completely understand how to access icons and images in MT. For the tests i use the star from MarkerToolkit. This is working. I have a star in the middle of the screen and this is not moving with the map, only turned and tilted. This is like trekbuddy it did. |
I had to put the shader files into the net.tourbook plugin Here you can see how to access the shader file mytourbook/bundles/net.tourbook/src/net/tourbook/map25/renderer/GLShaderMT.java Lines 155 to 167 in 519e2b1
|
The
|
i think i had it done that way. havent?
but anyhow i play now with markertoolkit. sometimes when zooming and dragging, i lost orientation. |
map25 toolbar filling with cool stuff! @wolfgang-ch: Last week i tried your ws-map25-track-color branch.
When i switch the arrows on again, everything is fine. commit 519e2b1 is OK. The last commit doesn't helps... Test was on linux. |
When I run the last commit then it works with my external screen 2560x1440 which I use in my home office When I run it with my notebook 4k screen then I get this error @telemaxx Which OpenGL version/vendor are you using? |
After fixing this issue 77d32cf it is working now with the 4k display but Linux is reporting a new issue |
Linux is now also fixed bb4f924 |
After fixing these issues, the NVIDIA compiler seems to be more tolerant |
with the commit from today its fine! |
99% of the code is copied/reused from the 3D map |
A video is displaying the same color profiles better 25map-3map-color-profiles.mp4 |
Luminance can be applied to the map map25-luminance.mp4.mp4 |
Track Colors
Color by elevation
Color by gradient
Additional Options
The text was updated successfully, but these errors were encountered: