Blosm: Import of Google 3D Cities, OpenStreetMap, Terrain

Thanks, for pointing me to the right instructions. I followed them precisely but swapped out Poland for Ukraine and got an OSM data file at 28 674kb. But when I try to import them Blender seems to be unresponsive for an indefinite amount of time. Is it going to work?

I have a reasonably poweful computer with 64 GB ram and 3090RTX card. Do you know how I can speed it up? If I can just get the mesh data into Blender I have other software that can do booleans or conform it to the mesh, if that’s what Blender is struggling with.

@Markus_Schille

Did you also change the condition in http://overpass-turbo.eu/ for the admin _level to

["admin_level"="2"]

Again, I managed to get the mesh into Blender, but it didn’t look meaningful.

No, if I change the admin level to 2 it gives me a preview (in overpass) that includes the entire border of Russia.
[out:xml];
relation(area:3600060199)[“boundary”=“administrative”][“admin_level”=“2”];
(._;>;);
out meta;

I tried several other admin-level numbers (by chance, not knowing what they are), but only 4 and 6 seem to only include borders inside Ukraine (the way Ukraine and the West think of them anyway). So even though it also included some subdivisions inside Ukraine I tried 4. I don’t know if that is causing too much data?

@Markus_Schille

I just downloaded the data without looking at the preview at http://overpass-turbo.eu. That explains why I didn’t get any meaningful results.

Try this request, i.e. adding one more condition ["name:en"="Ukraine"]. That kind of request means: get the data within the given area and with the given conditions.

[out:xml];
relation(area:3600060199)["boundary"="administrative"]["admin_level"="2"]["name:en"="Ukraine"];
(._;>;);
out meta;

Then you should get the area of Ukraine in Blender with the setup script base_borders.py.

Ah, thank you! That preview looks promising!

Heey, It worked. I first tried to import into an empty blender scene, with no previous import. I wonder if there is an issue or bug if I have a target terrain set in the UI, because when I had that, Blender would hang indefinitly long, but when I removed the target terrain it imported in seconds.

Sure thing, here are a couple of examples:



@Markus_Schille

You could try manually applying the Shrinkwrap modifier to the borders to project them on the terrain.

@LeighAH

The mesh seems to be the same, but the resolution of textures seems to be better.

Could you point me to those buildings on the map? I could make some experiments.

Alternatively you could experiment yourself by patching the addon code as described here. It is an issue about the same problem in addon’s Github repository.

Sure, the cathedral is at 53.343428391333084, -6.271234637542595
The row of houses is nearby at 53.342352386447544, -6.273304766729269

I tried tweaking the values as suggested, but going any lower than the default seems to throw an error “No 3D tiles were imported. 0 Errors occurred during the import.”

Thanks for all your guidance in this process. The exporting of the materials is what troubles me…when selecting the imported tiles (joined all as one) in Blender the Tools section doesn’t appear for me. Is this because I should uncheck ‘Join 3D Tiles Objects’? Any other ideas that would cause this?

I thought I could work around this by just unpacking the resources (jpeg texture files) but the .mtl file that exports alongside my OBJ doesn’t include the file paths, seemingly no matter what settings I choose. Thoughts?

Hi @brother_lode

The section Tools in the addon panel appears if you select one or more Blender mesh objects.

I would need to combine height data from Google and adjust buildings from OpenStreetMap and wonder if anybody have found a way to do this in some efficient way? I would also need to identify windows in fasades from Google 3D tiles and create Blender meshes and wonder if there is any way to atomize this process?

Hi @maxt

I can’t provide a solution to your tasks. However I can note that Google and OpenStreetMap can be superimposed correctly, but the height must be adjusted manually.

@LeighAH

It seems that Google Maps and Google Earth do provide more detailed textures at the maximum level of details.

It’s possible to load Google 3D Tiles in a web browser to check that out. Copy the code from the section Simple example from the page Work with a 3D Tiles renderer to your text editor. Find the string YOUR_API_KEY using the search functionality of your texture editor and replace it with your Google 3D Tiles Key. Save the file with the extension html and open it in a web browser.

Loving this add on so far!

I have one question though since I can’t find info in the documentation:

How did you achieve the lit-up traffic in this example image?

Also, is it normal for the 3D (realism) setting in premium to only import the buildings with no roads?

Thank you!

1 Like

Hi @flat.circle

Thank you for using our addon!

The streets can be imported in the 3D simple mode. Streets in the 3D realistic mode will be provided in the future versions.

You could apply an emissive material to the imported streets to get the effect of the lit-up traffic.

Originally it was done in a more complicated way. A map style was created in Mapbox Studio: white streets on black background. The resulting map was imported in the addon (custom overlay type in the overlay section of the addon). That map was used as a filter in a material with an emissive color.

1 Like

That’s great to hear!

I think I figured out a pair of workarounds since posting the message

1: Using the paid add-on HardOps:

  • Duplicate the road
  • Convert it to a mesh
  • Enter edit mode & select the boundary loop
  • Use hOps’ ‘convert to curve’ tool
  • Switch curve type to nurb, and adjust thickness
  • Exit Edit mode, raise this layer up on the Z-axis slightly
  • Give it a material consisting of:
    - Layer weight → Color Ramp → Math (Multiply) → Emission node → the volume output

2: Using a particle system

  • Duplicate the road and convert to mesh
  • Set up a basic particle system set to ‘hair’
  • Create an icosphere object
  • Set particle system to render as object with the icosphere as the object and ‘Vertices’ as the source
  • Adjust parameters to your liking
  • Give the icosphere a similar emission material as above
  • Adjust particle scale & randomness
  • Hide the emitter in the particle system settings
  • Raise on Z-axis
1 Like

@flat.circle

I’d like to see some of your renderings with the lit-up traffic if possible.

Take a look at the new video by CG Geek featuring the import of Google 3D Tiles with the Blosm addon: