redfish64 / TinyTravelTracker

Private Android GPS tracker
GNU General Public License v3.0
136 stars 31 forks source link

Weird map rendering: lattice on building roofs #37

Closed Self-Perfection closed 6 years ago

Self-Perfection commented 8 years ago

screenshot-16-08-16-18-18-26 This does not look right

Just in case, my device is a Jolla phone with SailfshOS.

redfish64 commented 8 years ago

If your willing, can you please try installing this alternative map program which is open source and supports your OS:

https://openrepos.net/content/otsaloma/poor-maps

If it doesn't have this problem, then I can examine the differences between TTT and this program to try and fix it. On 16 Aug 2016 23:29, "Alexander Meshcheryakov" notifications@github.com wrote:

[image: screenshot-16-08-16-18-18-26] https://cloud.githubusercontent.com/assets/3757038/17704748/09cfa31e-63e7-11e6-858d-89c059260c84.png This does not look right

Just in case, my device is a Jolla phone with SailfshOS.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/redfish64/TinyTravelTracker/issues/37, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1W0tCIRj3usW_Z3GaWrQHSF3UBi2W4ks5qgddvgaJpZM4JlihF .

Self-Perfection commented 8 years ago

Okay, I tried Poor Maps and it shows map fine. I don't see how comparing to Poor Maps might help however. PM uses plain raster png tiles from different sources. And 1.1.x series of TTT as I understand now uses vector tiles which are rendered on the fly, most likely with OpenGL usage. That is completely different story, IMHO.

I've been succesfully (without noticable graphic glitches) using MAPS.ME and OsmAnd on my device for a long time. These apps also render vector map data on the fly and being android apps might be more useful examples. Especially the former one as OsmAnd does not use OpenGL, AFAIK.

Self-Perfection commented 8 years ago

Here is an excerpt from TTT start log which probably contains a hint to the reason of graphic glitch that I observe

08-17 20:36:51.453 23700 23700 D alien_init: Set process(pid = 24413) score_adj as [0]
08-17 20:36:52.080 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 
08-17 20:36:52.082 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 
08-17 20:36:52.085 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 
08-17 20:36:52.183 24413 24432 D Tangram : WARNING texture.cpp:312: OpenGL ES doesn't support texture repeat wrapping for NPOT textures nor mipmap textures
08-17 20:36:52.185 24413 24432 D Tangram : WARNING texture.cpp:313: Falling back to LINEAR Filtering
08-17 20:36:52.241 23856 24054 D GpsLocationProvider: reportLocation.flag:17
08-17 20:36:52.241 23856 24054 D GpsLocationProvider: reportLocation. Location has source information. src -gnss
08-17 20:36:52.245 23856 23865 D GpsLocationProvider: reportLocation.flag:17
08-17 20:36:52.245 23856 23865 D GpsLocationProvider: reportLocation. Location has source information. src -gnss
08-17 20:36:52.258 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 
08-17 20:36:52.262 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 
08-17 20:36:52.265 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 
08-17 20:36:52.269 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 
08-17 20:36:52.274 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 
08-17 20:36:52.277 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_line_transit for layer mz_route_line_transit
08-17 20:36:52.279 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_location for layer mz_route_location
08-17 20:36:52.281 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_current_location for layer mz_current_location_gem
08-17 20:36:52.283 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_start for layer mz_route_start
08-17 20:36:52.284 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_destination for layer mz_route_destination
08-17 20:36:52.286 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_default_line for layer mz_default_line
08-17 20:36:52.299 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_dropped_pin for layer mz_dropped_pin
08-17 20:36:52.301 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_default_polygon for layer mz_default_polygon
08-17 20:36:52.303 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source gt_point for layer gt_point
08-17 20:36:52.304 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_default_point for layer mz_default_point
08-17 20:36:52.306 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_transit_stop for layer mz_route_transit_stop
08-17 20:36:52.308 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_search_result for layer mz_search_result
08-17 20:36:52.309 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_line for layer mz_route_line
08-17 20:36:52.374 24413 24432 D Tangram : WARNING styleParam.cpp:141: Unknown StyleParam move_into_tile:true
08-17 20:36:52.466 24413 24432 D Tangram : WARNING styleParam.cpp:141: Unknown StyleParam move_into_tile:false
08-17 20:36:52.664 24413 24432 D Tangram : TANGRAM tangram.cpp:94: finish initialize
08-17 20:36:52.757 24413 24431 D Tangram : TANGRAM tangram.cpp:529: setup GL
08-17 20:36:52.790 24413 24431 D Tangram : TANGRAM hardware.cpp:57: Driver supports map buffer: 0
08-17 20:36:52.793 24413 24431 D Tangram : TANGRAM hardware.cpp:58: Driver supports vaos: 1
08-17 20:36:52.795 24413 24431 D Tangram : TANGRAM hardware.cpp:72: Hardware max texture size 4096
08-17 20:36:52.795 24413 24431 D Tangram : TANGRAM hardware.cpp:73: Hardware max combined texture units 20
08-17 20:36:52.795 24413 24431 D Tangram : TANGRAM tangram.cpp:154: resize: 540 x 888
08-17 20:36:52.802 24413 24434 D Tangram : TANGRAM tileWorker.cpp:66: Passed new TileBuilder to TileWorker
08-17 20:36:52.802 24413 24433 D Tangram : TANGRAM tileWorker.cpp:66: Passed new TileBuilder to TileWorker
08-17 20:36:54.032 23856 23867 D GpsLocationProvider: reportLocation.flag:17
08-17 20:36:54.033 23856 23867 D GpsLocationProvider: reportLocation. Location has source information. src -gnss
08-17 20:36:55.545 24413 24434 D Tangram : Failed to open asset at path: fonts/open sans-400normal.ttf
08-17 20:36:55.553 24413 24434 D Tangram : Failed to open asset at path: fonts/open sans-400normal.ttf
08-17 20:36:55.559 24413 24434 D Tangram : Failed to read file at path: 
08-17 20:36:55.566 24413 24434 D Tangram : ERROR fontContext.cpp:295: Could not load font file open sans_400_normal

The line with "OpenGL ES doesn't support texture repeat wrapping for NPOT textures nor mipmap textures" is most suspicious to me.

redfish64 commented 8 years ago

Sorry about suggesting poormaps, you're right about it.

I'm using a particular library, called tangram, which is created by the developers of mapzen, to handle the opengl stuff. Unfortunately, I am not very knowledgeable about opengl and I don't have a phone running sailfish os, or an available one to install sailfish os on, so it will be very difficult to debug.

If you want, you can try and install "Eraser Maps Beta", which definitely also uses tangram and is open source. I have a feeling it will have the same issues though. If not, please tell me, and that would help a lot to compare with and try to find a solution.

https://play.google.com/store/apps/details?id=com.mapzen.erasermap&hl=en

Also, I noticed there is no text in your screenshot showing street names, etc. Are the roads, cities, etc., properly labeled?

I will do some more digging, but it will probably be slow going from here.

On Thu, Aug 18, 2016 at 1:58 AM, Alexander Meshcheryakov < notifications@github.com> wrote:

Here is an excerpt from TTT start log which probably contains a hint to the reason of graphic glitch that I observe

08-17 20:36:51.453 23700 23700 D alien_init: Set process(pid = 24413) score_adj as [0] 08-17 20:36:52.080 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 08-17 20:36:52.082 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 08-17 20:36:52.085 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 08-17 20:36:52.183 24413 24432 D Tangram : WARNING texture.cpp:312: OpenGL ES doesn't support texture repeat wrapping for NPOT textures nor mipmap textures 08-17 20:36:52.185 24413 24432 D Tangram : WARNING texture.cpp:313: Falling back to LINEAR Filtering 08-17 20:36:52.241 23856 24054 D GpsLocationProvider: reportLocation.flag:17 08-17 20:36:52.241 23856 24054 D GpsLocationProvider: reportLocation. Location has source information. src -gnss 08-17 20:36:52.245 23856 23865 D GpsLocationProvider: reportLocation.flag:17 08-17 20:36:52.245 23856 23865 D GpsLocationProvider: reportLocation. Location has source information. src -gnss 08-17 20:36:52.258 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 08-17 20:36:52.262 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 08-17 20:36:52.265 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 08-17 20:36:52.269 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 08-17 20:36:52.274 24413 24432 D Tangram : TANGRAM fontContext.cpp:36: FONT 08-17 20:36:52.277 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_line_transit for layer mz_route_line_transit 08-17 20:36:52.279 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_location for layer mz_route_location 08-17 20:36:52.281 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_current_location for layer mz_current_location_gem 08-17 20:36:52.283 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_start for layer mz_route_start 08-17 20:36:52.284 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_destination for layer mz_route_destination 08-17 20:36:52.286 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_default_line for layer mz_default_line 08-17 20:36:52.299 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_dropped_pin for layer mz_dropped_pin 08-17 20:36:52.301 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_default_polygon for layer mz_default_polygon 08-17 20:36:52.303 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source gt_point for layer gt_point 08-17 20:36:52.304 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_default_point for layer mz_default_point 08-17 20:36:52.306 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_transit_stop for layer mz_route_transit_stop 08-17 20:36:52.308 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_search_result for layer mz_search_result 08-17 20:36:52.309 24413 24432 D Tangram : WARNING sceneLoader.cpp:1407: Can't find data source mz_route_line for layer mz_route_line 08-17 20:36:52.374 24413 24432 D Tangram : WARNING styleParam.cpp:141: Unknown StyleParam move_into_tile:true 08-17 20:36:52.466 24413 24432 D Tangram : WARNING styleParam.cpp:141: Unknown StyleParam move_into_tile:false 08-17 20:36:52.664 24413 24432 D Tangram : TANGRAM tangram.cpp:94: finish initialize 08-17 20:36:52.757 24413 24431 D Tangram : TANGRAM tangram.cpp:529: setup GL 08-17 20:36:52.790 24413 24431 D Tangram : TANGRAM hardware.cpp:57: Driver supports map buffer: 0 08-17 20:36:52.793 24413 24431 D Tangram : TANGRAM hardware.cpp:58: Driver supports vaos: 1 08-17 20:36:52.795 24413 24431 D Tangram : TANGRAM hardware.cpp:72: Hardware max texture size 4096 08-17 20:36:52.795 24413 24431 D Tangram : TANGRAM hardware.cpp:73: Hardware max combined texture units 20 08-17 20:36:52.795 24413 24431 D Tangram : TANGRAM tangram.cpp:154: resize: 540 x 888 08-17 20:36:52.802 24413 24434 D Tangram : TANGRAM tileWorker.cpp:66: Passed new TileBuilder to TileWorker 08-17 20:36:52.802 24413 24433 D Tangram : TANGRAM tileWorker.cpp:66: Passed new TileBuilder to TileWorker 08-17 20:36:54.032 23856 23867 D GpsLocationProvider: reportLocation.flag:17 08-17 20:36:54.033 23856 23867 D GpsLocationProvider: reportLocation. Location has source information. src -gnss 08-17 20:36:55.545 24413 24434 D Tangram : Failed to open asset at path: fonts/open sans-400normal.ttf 08-17 20:36:55.553 24413 24434 D Tangram : Failed to open asset at path: fonts/open sans-400normal.ttf 08-17 20:36:55.559 24413 24434 D Tangram : Failed to read file at path: 08-17 20:36:55.566 24413 24434 D Tangram : ERROR fontContext.cpp:295: Could not load font file open sans_400_normal

The line with "OpenGL ES doesn't support texture repeat wrapping for NPOT textures nor mipmap textures" is most suspicious to me.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/redfish64/TinyTravelTracker/issues/37#issuecomment-240493975, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1W0vVHQmrTXAGefH7J-DFCMKaBU_IYks5qg0vJgaJpZM4JlihF .

Self-Perfection commented 8 years ago

In installed Eraser Map 0.12.0 for comparison.

It show the same lattice/grid on roofs. Therefore roof problem is a tangram library issue.

But unlike TTT Eraser Map displays street names and other labels. Please check again log fragment that I posted above. There are font loading errors in this log. I believe this is a reason of missing labels.

Self-Perfection commented 8 years ago

I have opened issue regarding grid in Eraser Map butracker. Thank you for help in narrowing it down.

Should I start new issue regarding missing labels on map / font loading?

matteblair commented 8 years ago

Hello! I work on the tangram library for android. This problem may be very easy to solve, but I don't have a Sailfish OS device to test. Can you try changing https://github.com/redfish64/TinyTravelTracker/blob/master/app/src/main/assets/map_style.yaml#L720 to read:

                    if (dot(vec3(0., 0., 1.), worldNormal()) < 0.5) {

And see if building roofs render correctly?

redfish64 commented 8 years ago

Thanks, blair1618! I updated the yaml file as you suggested, and it will be in v1.1.10. Along with that, I added some missing font files that should hopefully fix the missing text issues.

You can monitor the f-droid buildserver at: https://f-droid.org/wiki/index.php?title=com.rareventure.gps2/lastbuild&redirect=no It will be in build 54.

Self-Perfection commented 8 years ago

Screenshot of version 1.10 from F-Droid running on my Jolla screenshot-16-08-19-14-38-05 Please note:

  1. Labels are now visible (thank you!)
  2. Grid is absent on building roofs (yay!)
  3. Grid is still present on building walls ( :( )
Self-Perfection commented 6 years ago

Apparently the TTT have switched to another map rendering engine and does not show map in 3D anymore. And therefore lattice on buildings have gone. I close this issue as it is not relevant to recent versions.