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] Show direction arrows similar like in the 3D map #516
Comments
After many many hours and days of try and error, I could finally setup a dev environment to easily edit/test the vtm sources MT commit VTM commit |
Finally, now static symbols are painted on the tour path but the more complex math part for me is coming, that the direction arrows are showing in the correct direction Video_2022-08-13_143945_edit.mp4 |
Direction arrows are now working :-)))) What helped me a lot for the math, examples in the internet, e.g.
m25-arrows_edit.mp4But there are some issues |
Implementing and testing 2.5D map features is sometimes creating nice effects which were not intended m25-arrows.mp4 |
Should this be the next direction arrow ? next-direction-arrows.mp4 |
looks like a Paperplane, nice. the current position could be an animated bicycle or an walking man. instead of the point. |
And the MT user will choose their favorite icon in the MT preferences 😄 |
... or can add their blender file |
That seems advanced for a "normal" user |
Z-Fighting is now fixed @telemaxx Can the "old" direction arrows now be replaced with the new arrows ? |
Yes of course, you're arrows/sharks are looking a lot cooler than my arrows |
The direction arrow settings are now saved in the track option profiles Video_2022-09-01_154548_edit.mp4 |
There are a few track color issues when the opengl depth buffer is activated for the track. It seems that the line shader algorithm is not supporting track opacity:
map25-issues.mp4In the video it was not visible that the track inner color in not opaque for the background |
good 3D Benchmark. how was the Performance, could you turn and move in Realtime? |
I recorded this video with 30 fps and it is smoothly m25-performance.mp4Last week I saw this video where each item is also moved and is not static as the direction arrows https://www.youtube.com/watch?v=kuy17LVDESk&list=PLRL3Z3lpLmH1EF4g__4gPevJhTArzy0k5 It also performs very good with all my tours |
On the road to a new feature there are sometimes interresting effects. m25-dir-arrows.mp4 |
The animation speed can now be selected m25-animation.mp4When the 2.5D map is losing the focus, then the framerate will drop to 1 fps otherwise the selected fps is used. Dropping the fps to 1 will reduce the power consumption (and the pc vent could also stop earlier) Power consumption with 30 fps Power consumption with 1 fps Is there a need to run animations when the 2.5D map do not have the focus ? |
With https://synthclipse.sourceforge.net/ the shader file editor (c++ editor) has similar features as when it would be a java file, HOWEVER this tool is not compatible with Mylyn tasklist, both need the same plugin but with different versions, so I'm using a separate Eclipse instance |
This animated triangle is now using a different approach than the prevous animated arrows. The triangle position is now computed in the shader (GPU) and not in the CPU. This allows now to move different models on the tour track. It took me some day's to finally get a working solution for the first step 😄 but there are additional steps, correct direction, smooth moving, ... 👷 m25-track-animation_edit.mp4 |
Nice 👍 |
One small step further m25-rotated-triangle.mp4 |
Now it looks better, OpenGL has invinite possibilities, when you understand it m25-rotated-triangle-2.mp4 |
The map can now be synched with the animated position (the map is centered to the animated model). This is not yet perfect and fully smooth but better than before 😉 m25-animation-sync-pos.mp4 |
The map can now be zoomed in that not the whole tour is fully visible, this was currently a limitation. The model renderer can now smooth out e.g. page up/down or mouse-wheel events in the map player. So in this video the model is smoothed out with several page up events,. It was also needed, that the map position is smoothed out. m25-animation.mp4 |
The model is now moving very smoothly even when this video do not look always smoothly. The map location is now also automatically adjusted to the model position which is centered in the map after the animation has ended. There are still issues but it's now better than before 😄 m25-smooth.mp4 |
Now with autoplay 😄
The next step will be to show the moved model in the center of the map when in autoplay mode. m25-autoplay.mp4 |
The autoplayed model can now be centered in the map view. m25-flight.mp4 |
The plane is now turning better m25-flight2.mp4 |
The more I follow what you are developing here, the more it makes me think of a feature I always had in the back of my mind:
Note in highlighted red, the instant comparison of which tour is ahead |
I've never thought, that the 2.5D map should be displayed multiple times which is the reason why this map can be currently displayed only once and contains many static fields for just one instance. OpenGL can have multiple views but this would be time consuming to implement it like any other OpenGL code. An alternative (but not so cool) could be to compare tours within the tour chart, they can be displayed multiple times for different tours, you just need a player for the tour chart similar like the new map player. One of my next steps is that the model movement speed is according to the distance or time, currently it is according to the optimized track which skips time slices, except when you zoomed in very very close. |
I'm also using this track to test the moving model and here you can see how the speed is currently implemented and it's problems: When a distance between 2 points is larger then the speed is higher and vice versa, on a "normal" track this is not so good visible that you can recognize it. With the tour editor I modified an existing tour to have less points which can sometimes be easier to debug it. m25-speed.mp4 |
Maybe then having multiple objects on a single 2.5D map ? A 2D map would be fine too
Like you say, it's not so cool because a map, I think, is more easy for a user to see what the current location is than on a graph/chart. But having both the chart (bottom of my screenshot) and the map (top of my screenshot) would help |
GLTF models can now be selected in the UI when they are setup. I'm planning to set these 3 bicycles as being packaged into MT Interresting is to see, tha the Penny-farthing model is also changing slightly the map colors, I've not yet recognized it until now. This model needs also a little bit more time to be loaded, therefor there is a delay when it is selected. m25-model-selection.mp4Map model edit dialog |
When a model is imported, then mostly it is not looking in the forward direction and the head is not at the correct position, this can be adjusted in the import dialog. With the Live update feature it can be easily adjusted. m25-live-update.mp4 |
Test Animated ModelThe animated model is now merged into the main branch and can be tested 😎 Here are some hints and known issues Start AnimationCurrently the animation can be started only this way in the
Changing this procedure is on my todo list at the top Center ModelThe model can be centered in the map when the map sync action is selected Hidden ModelDuring loading of the map tiles, the model can be flickering or is partly hidden Model Issues
Re-liveIs not working properly Background FPSIs not working properly when enabled |
This morning I increased the model max size from 1'000 to 10'000 to be able to can see more details |
This is a monster skateboard with the model size of 2000, so there is room to the max. That the model is better visible, the map tilt rotation axis can be adjusted which I did for this picture There is a nice effect when the map model and direction arrows are displayed at the same time because the skateboard is slightly bumping up and down. m25-model-and-arrows_edit.mp4 |
I'm using the FastStone capture tool to record the videos. Until now I had to convert the recorded video from WMV format into MP4 by using an external tool, I used https://www.freeconvert.com/wmv-to-mp4 Since a few days, this capture tool can now also save directly into the MP4 format 😎 |
I've used several times the open-source project OBS Studio and i had a good experience with it |
The model + model cursor can now be displayed/hidden in the tour player view The model turning is now more realistic, the higher the turning angle the more it turns, before it was a static value. It was not so complicated to implement it, than what I first thought. mytourbook/bundles/net.tourbook/src/net/tourbook/map/player/MapPlayerManager.java Lines 994 to 1003 in ed2ded3
m25-smooth-turning.mp4 |
re-Live is now partly fixed
The painted track is almost correct when just one tour is displayed but with many tours are displayed then the painted track is more and more wrong What will not be fixed is the jerky painting of the track this would need a whole new track painting algorithm -> too complicated m25-re-live.mp4 |
re-Live stress test with all my tours m25-re-live-all-tours.mp4 |
Finally, this feature is now production ready 😎 |
…are expaded and the models are displayed in the 2.5D production map :-) This solved #516 (comment) I still keep the model data in a separate plugin as is is very large and otherwise the whole net.tourbook plugin would be needed to be expanded. The expanded files could also be easier hacked when needed.
The current direction arrows are using bitmaps which has UI limits when displayed rotated.
This very first approach is using a circle instead of an arrow 2.5D/3D symbol, this will be the next step but first learning of OpenGL skills is needed
The text was updated successfully, but these errors were encountered: