1 (edited by danielesuppo 2019-07-31 18:46:44)

Topic: Horizon2_Bing Maps - Loading new tiles freeze Unity

Hello, I've noticed that quite often (at least with my internet connection) when I move the map and new new horizon tiles should be loaded Unity freeze, until the first new tile is loaded, next all other horizon tiles are loaded and everything is ok.
Is there a workaround for it?
Many thank!
P.S I'm using 9x9 count for horizon to try to have an horizon always in front of the camera, maybe it's too much?

Re: Horizon2_Bing Maps - Loading new tiles freeze Unity


Unfortunately, I did not understand your description of the problem.
Please explain this in more detail.
I think the video will be very helpful in understanding the problem.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

3 (edited by danielesuppo 2019-08-01 15:44:49)

Re: Horizon2_Bing Maps - Loading new tiles freeze Unity

It's not easy to make a video because it doesn't happen every time, and it would not show the problem, I'll try to explain myself better:
1) when the Map is panned, or zoomed, the horizon script load new tiles (maybe "tile" is not the right word.. "pieces" of map in low resolution to show the horizon around the main Map
2) all these "pieces" are loaded and showed one after the other
3) sometimes it take a bit too much to load and show the 1st "piece". During this time (a couple of seconds, or more) I can't do anything: the map can't be panned, or zoomed, and the camera can't be rotated.
4) when finally the 1st "piece" of the horizon is loaded and showed I can interact with the map again (pan, zoom, camera rotation is working again), and all the other "pieces" are subsequentially loaded.

Re: Horizon2_Bing Maps - Loading new tiles freeze Unity

I am very surprised that you have no exception.
9 * 9 * 32 * 32 = 82 944 vertices.
Unity has a limit of 65k vertices per mesh.

Why do you need such a large horizon?
Camera Clipping + Fog will make the end of the map invisible.
Take a look at Google Earth. There the fog begins very close.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

5 (edited by danielesuppo 2019-08-05 20:47:54)

Re: Horizon2_Bing Maps - Loading new tiles freeze Unity

Ok, maybe I'm using your script in the wrong way.
I did a comparison between Google Maps and what I get with my settings.

I've attached a picture.

My goal would not to have the very best map quality (indeed Google Maps is not so "high res") but to have quite a good quality, a large horizon and, if possible, not too much difference between the Map and the horizon (just like with Google Maps), regardless of the zoom level.

Actually the higher is the the zoom level, the less is the the horizon (I would say obviously), at least on my test.
And most times panning the map the horizon seem to disappear (you wrote me that's because the horizon script is working like that, but it's quite disturbing...).

So, to try to have to largest possible horizon, with every zoom level, I've (maybe naively) increased the count value to 9x9 (the default settings 3x3 didn't do the job at all).

But, this take obviously a long time to load, and unfortunately does'nt completely solve my problem.
With a "close-up" the horizon isn't visible... I mean, it's still there but it's not enough to have the perception of an horizon.
I'm using fog and camera clipping, but it's too unnatural to clip everything when, in reality,you should see much more far away.
Moreover I have some paths that should be drawn also at this zoom level, but them actually fly in the sky (them don't show in the attached picture).

You did a really great job, and I know that I should not even try to compare Google Maps with Online Maps so forgive me,
and I assume that I'm working with too large numbers, but I can't understand how to solve my issues:
Is it possible to fine-tune the Horizon script settings (and maybe the Map too?) so to:

1) extend the horizon (at least in "close-up" view), while keeping a good horizon quality (Google Maps as a reference, sorry)
I've tried to increase the "Zoom offset up to 5 but does not solve the problem, rather it's worse).
P.S. the best would be to have more or less the same horizon area (in Km) regardless of the zoom level, on the base of the memory

2) less perception of "appearing"/"disappearing" horizon tiles when panning the map.
I mean, when I pan the map suddenly the "piece" of horizon disappear, next I have to pan the map quite a bit before a new "piece" appear...

Many thanks!

Post's attachments

Attachment icon map-issue.jpg 492.46 kb, 24 downloads since 2019-08-05 

Re: Horizon2_Bing Maps - Loading new tiles freeze Unity

I see two ways to solve the problem:

1. Use two 3x3 horizons with different zoom offset (for example 3 and 6).
In this case, you will get a view as 24x24 (almost).
At the same time, you will only use 18 tiles, versus 81 for 9x9.
There is only one problem here:
Right now the horizons will conflict, because both horizons will want to give their elevations to the map.
This is solved by a simple bool value, which will give you the ability to specify that only the near horizon should give elevations to the map.

2. Generate distant areas using Real World Terrain (or analogues), and use as a distant view.
This will work much faster and give you full control over distant areas.
But at the same time, this will require a change in the logic of the map.
You will need two things:
a. Make that the map has a real world size.
http://infinity-code.com/atlas/online-m … ample.html
b. Make that the map changes its location in the scene, instead of just changing the coordinates of the center point.
I have such a script.
I do not remember whether I posted it on the forum or not.
If necessary, I will publish it.

The first way is simpler, and you can do it yourself.
The second way is more difficult, but it will give you a better result.

To fix the appearance / disappearance of elevations, try caching this.
Example of caching implementation here:
http://forum.infinity-code.com/viewtopi … 5279#p5279

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!