Topic: 3d Buildings Mesh Generation

Hi Alex,

Just starting out with your maps and it looks great so far. May I ask a couple of questions

1. Is there a way to trim buildings mesh to map boundary ?
2. After changing buildings material in the inspector , some of the buildings still have strange appearance.
3. How does buildings parameters work. OSM will provide building heights , what floor Height and Min building Height control?
   Are these just in case when OSM does not have data?
4. Last one. What ever I do buildings generation seem very slow. Is there a way / hack to speed it up. Maybe after the user found a location I can cache the mesh data in the background ?

I saw you got a buildings cache script. May I have it, please? I have sent email to support.

Thank you

Post's attachments

Attachment icon Screenshot 2021-09-15 at 10.25.11.png 289.66 kb, 58 downloads since 2021-09-15 

Re: 3d Buildings Mesh Generation

Here is a video of buildings mesh generation
https://youtu.be/Bi9NKVZ2hpg

Re: 3d Buildings Mesh Generation

Hello.

1. Unfortunately, there is no such possibility.

2. Unfortunately, you are not using materials in your video.
Quite possible that Use Color Tag cause this problem.

3. OSM does not always have the height of buildings or number of floors.
If the height or number of floors is present in the data, this is used.
If missed, then random number of floors in the range that you specified is used.

4. There are two problems here:
a. OSM Overpass response speed, which is often very slow.
b. The size of the data. In a city it can be several megabytes of XML file.
You can greatly speed up the generation of buildings by reading them from vector tiles.
It is not very difficult to implement, but in Online Maps it most likely will not be implemented, because:
https://forum.infinity-code.com/viewtop … 7683#p7683

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

4 (edited by artpen 2021-09-16 07:52:06)

Re: 3d Buildings Mesh Generation

Thank you Alex,
It is all clear. And thank you for the buildings script. It will keep me going until new asset is released.
Amazing work, thank you

Re: 3d Buildings Mesh Generation

Regrading Question 4.
I got your buildings cache script. Does it allows to cache buildings in the background.
Say while user is looking at the map in 2D, buildings are being generated in the back ground, so when switched to 3d at least most of them are done?

I tried Mapbox SDK (and it has a lot of problems) but their building generation is so fast, you think they are using vector tiles for it ?

Re: 3d Buildings Mesh Generation

No, this script does not cache data in the background.

Yes, I know for sure that it is faster because of the vector tiles.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: 3d Buildings Mesh Generation

Is there anything I can do to make it faster ? sad

Re: 3d Buildings Mesh Generation

If you have programming experience, then you can not use the current building system, but create a new one that will read buildings from vector tiles.
It's not very difficult.
Unfortunately, I don't have time right now to make an example for you, but if you can wait 2-3 weeks, I will give you an example.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: 3d Buildings Mesh Generation

It would be amazing. I am sure it will be useful not only for me. I can wait.
But will give it a shot myself. I do have programming experience, first time working with GIS though, maps are not easy

Re: 3d Buildings Mesh Generation

Example of generating buildings from Mapbox vector tiles is attached. Use this instead of Online Maps Buildings.

Post's attachments

Attachment icon MapboxBuildingManager.cs 27.45 kb, 74 downloads since 2023-03-08 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

11

Re: 3d Buildings Mesh Generation

This sounds amazing....

Unfortunately, I get an "HTTP/1.1 401 Unauthorized" error as soon as buildings should load. Anything special to consider?

Re: 3d Buildings Mesh Generation

Please make sure you have entered the correct Mapbox access token.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

13

Re: 3d Buildings Mesh Generation

Yes, I put my MapBox access token in the Access Token field of the OnlineMaps component.

I checked the url string in TryLoadTile() and it just ended with: "accessToken="
So I added my Access Token to the string.

Now I receive following errors though:

1. Curl error 61: Unrecognized content encoding type. libcurl understands identity content encodings.
(With no script reference, just like that)

2. Unrecognized content-encoding
MapboxBuildingManager:OnTileWWWComplete (OnlineMapsWWW) (at Assets/Infinity Code/Online maps/Scripts/Addons/MapboxBuildingManager.cs:543)

The second one is the Debug Error from OnTileWWWComplete().

I use Online Maps version 3.7.10.1. If you think it could matter I can try to update the package.
Unity Version: 2021.1.6f1

Thank you very much.

Re: 3d Buildings Mesh Generation

Please enter your key in Key Manager.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.