-
|
Creating a custom hill shading algorithm is currently severely restricted due to HgtCache.HgtFileInfo class being package private. Would it be possible to somehow lift this restriction (making the class public would suffice, but it might not be the most elegant solution)? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
|
What customizations do you have in mind? Hillshade colors or something else? It would be nice if we integrate these customizations so all users can use them. |
Beta Was this translation helpful? Give feedback.
-
|
So, we just started experimenting on whether hill shading can be improved (not sure about the outcome), and wanted to gain full control over the values written to the byte buffer used for creating To be more precise, implementing/overriding Many thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Here are the results. The next several screenshots are using the hill shading magnitude scales of both 3 and 1 for better comparison. All screenshots are for illustrative purposes. First our hill shading algorithm as finally used in the app (scale = 3): Compare with the default Simple algorithm (scale = 3), the default default Simple algorithm (scale = 1), the default Diffuse Light algorithm (scale = 3) -- please observe how particularly bad the Lim and Raša fjords look like: and the default default Diffuse Light algorithm (scale = 1): Here is our algorithm with scale = 1 (just for completeness): For completeness, here is the screenshot of Google terrain map ("legacy" renderer): and again the Motorider map but without any hill shading: Our biggest objection with the current hill shading algorithms is that they always show a gray overlay over an otherwise flat terrain, reducing contrast of the map, making it darker and, well, uglier. Our algorithm is based on the Simple one, nothing too fancy, but because of a change in paradigm it won't ever put a shade over a flat terrain. Additional bonus is that this also makes hills and fjords look nicer, and closer to what we see in Google maps (we can provide additional screenshots). If you're interested in including the code in the library, we need a few more days to pretty up the code etc. Also the algorithm doesn't have a name yet, so suggestions are welcome. |
Beta Was this translation helpful? Give feedback.
-
|
Which |
Beta Was this translation helpful? Give feedback.








@Sublimis thanks for the pull request! 👍
I merged it in Mapsforge.