Blender-osm: OpenStreetMap and terrain for Blender

Hi, I’ve downloaded the free version of the plugin. How would I be able to use custom styled map instead of the sattelite image provided? Basically I would like to be able to use the styling I do in mapbox studio, and use that style on the overlay image in blender

Hi @hak

Set the overlay type to Custom URL as described in the documentation .
Copy the URL template from the Mapbox Studio:

  • Press Share in the list of styles or at the top bar of the Mapbox Studio editor.
  • In the section “Develop resources” use the settings as follows:
    image
  • Press the button “Copy” to copy the URL template to the clipboard
  • Paste it to the “URL template” field in the addon panel

Thanks for the quick reply! I’m testing it out right now. I get the right map, but the tiling is all wrong. Do you know what is happening?

I don’t see your how-to guide in the documentation, so you should absolutely add it in there, as it’s really helpful!

Please send the URL template via a private message. I’ll test it out.

Sure! Sending it right away

@hak,
I removed @2x from the URL template and it worked for me. I haven’t found out yet where to copy the URL template ready for use.

1 Like

Hi vvoovv,
I purchased the full addon yesterday. I was wondering if it would be possible to add a button to run the building generation on a custom shape?
I have also been playing with your material nodes and I was wondering if you could provide some info.
I have read the documentation on custom materials and I think I know how that side works, But some info on the order the building creation is done in would be helpful.
Forgive my long winded post, I do get to an actual question…

All my tests so far a based on your “commercial_ground_level_emission” material nodes.
Basically in the nodes I am selecting different level indexes to have more control over how buildings look.
I can for example easily select the first and last window in a row to change their appearance,
check if a face is at least 2xtile wide. things like that. The image below shows a debug example.
blue = x first
red = x last
pink is the mid tile ( I still have to check for odd or ever tile numbers, but thats easy enough)
yellow is faces that contain less than 2 tiles in width (to avoid some stretched parts)
green is first floor
white is top floor.

Now the question. Does the material influence the height of a building during generation?
or is it just the node group “FacadeOverlayGroundLevel” dividing up the faces to best fit the texture after the fact?

I noticed that once a building is generated using a different material won’t fit by default.
Also, the ground level vs non ground level, It might just be the osm data I am using but since most buildings are just extruded shapes aren’t most of the facades starting at ground level? could you give a bit more info on this?
Sorry for the long winded post. The addon is great. Genius move using the data UV map to store face widths and heights!

Hi @Mark_Ferguson,

Just to note for the other thread participants that we also discussed your case in the private mail exchange.

Building generation on a custom 2D shape fits better in the new upcoming version. The new version will supports facade styling. The only obstacle I see is how to represent buildings with inner yard(s).

May I ask you what is the goal of your experiments? Are you going to create a facade with multiple textures and only one Blender face? Those textures represent the ground floor, the last floor, the left part, the right part and the middle parts.

A material doesn’t influence the building height. A face is created first, then UV maps (including the one for the face width and height) are set, and then a material is applied.

It’s possible to do a kind of 3D modelling in OpenStreetMap by providing a footprint for each significant building part and attributes for it (the number of levels and on which height above the ground it starts). Take look at Manhattan. There are a number of buildings with parts starting at some height above the ground.

Hi @vvoovv,
Thanks for the explanation.

I’ll see if I do as well explaining what I am doing.
I will continue to use the same building as my last post. The process seems complicated but your node group has done most of the heavy lifting.
The aim is the same number of textures per building as you currently use. But it would not have to be limited to that. It could be expanded to add decals of various kinds. Dirt, drain pipes, wires etc. on a separate texture sheet.

Firstly I set the ‘Number of tiles U’ and ‘Number of tiles V’ back to 1.


This means the output vector of the node group is one window wide repeated.


I have taken your img_2161 and numbered the tiles like so:

As you can see in the image every window is now number 10. the lower left of the texture.
if I now split the XYZ output of the node I can add .33 (1/3 of the texture width) to the X value and window 11 will be used.
If I add .25 (1/4 of the texture height) to the Y value window 7 would be used. etc

So I can create and offset for each widow the mix them back together using the selections I have already created and then plug that into the image texture.

So for example
windows 1-3 could be upper floors
window 4-9 could be mid level
and windows 10-12 could be the ground floor.
the offsets for 4-9 can even be randomly mixed using the values you have already created for lit windows.
The output of all of this is just a vector that plugs into one image.

To add yet another layer of variation, If each building has a vertex colour added (I have been testing using random vertex colour for connected faces) This can be used to randomly mix a set of images that contain the same underlying tile structure.

I will email you an example file later. I can’t share it here as it relies heavily on your node group and that is part of the premium addon.
I hope this made some sense.

Hi, I am working a lot with 360degree VR.
Due to this I do render a lot of 360 images.
In an interior that’s not a big issue, you model everything and than fake the window view.

Outside its much more evolved, but there is a slow tendency that clients want more than just a static movie or rendering.
Let’s say you want to walk completely around one inner city building and have that look fairly real. You would perhaps take some photos of streets leading away from the building, but often adjacent building and trees stop you from taking pictures of everything.

I do own the OSM add-on. It’s really helpful to get the ground and general building shapes.
Still there are no real facade textures and the heights and rooftypes are not correct for most buildings.

There are also great tutorials to create “a” city and there are also a few city modeling add-ons which help in creating such a generic city.
Usually these cities are made up of some set of more or less generic building blocks at randomized scale. Textures are also randomized. So, as a backdrop it might be ok. But closer not so much.
They can look very cool and surely are great for a game or product backdrop.

BUT they are not REAL.

So the tricky part is if you want the actual buildings of a real existing city and not just rough building approximations with generic windows on it.
It becomes even more tricky if you have a smaller city without skyscrapers.
Especially as most of these are not even available on Open Street Map or Google in 3D.

So here is the question to those working frequently with actual real cities and architectural exterior models.

What is your preferred work flow to create those kind of real environments in the most efficient way?
Which add-on and resources are you using?
Are you using drone shots & photogrametry (very often we are not allowed to fly extensively in cities).
Are there ways to extract Google Earth models and use that as a reference when adjusting OSM models?
Where do you get your base data from?
Do you model everything?

Could you be so kind and share a bit of know-how? That would be so cool!
Maybe we should even start a separate thread for this. I put it here because OSM is based on the real world.

Thanks for diving into this.

Pretty

Import of very large terrain areas is possible now in blender-osm! The whole terrain of Switzerland is imported in the screenshot below. Get the new version using your purchase/download confirmation e-mail!

image

Use the reduction ratio in the terrain panel for the large areas to reduce the vertex number for the imported terrain:
image

That was made possible thanks to the contribution from our customer Allain. He publishes wonderful educational videos made with Blender in his Youtube channel. He used blender-osm addon to create his latest video about the physics of tides: https://youtu.be/hBsG8XtWeSA?t=996

1 Like

See your GPX hiking tracks in Blender with the blender-osm addon!

Import of GPX files is available in the latest version of the addon. Get it using the link your purchase/download confirmation e-mail or download the addon for free at Gumroad. Import the terrain and satellite imagery first. Then import GPX track.

image

3 Likes

@ vvoovv

Is there way to override terrain import source?

To use higher resolution terrain mesh.

At moment accuracy doesn’t seem to very high for terrain. Is the source for terrain open street map? It seems to be 30 meter accuracy.

BTW fantastic plugin.

Hi @SquareRoot,

That the only public domain terrain dataset with world wide coverage.

Hello ! I’ve just purchased the premium version. It looks awesome,you’ve done a very hard work. After all these months, is it finally possible to export buildings with textures or is it still under development ?

Thank you for your time and patience!

Hi @3D_Fan_Made_Movies,

Thank you for purchasing the premium version!

Export of textures will be available for testing later this week. I’ll contact you via a private message.

Hi.

Just small suggestion.

Is it possible when selecting rectangle.

We can manually enter dimensions of rectangle.

That way you can control the actual size and make it perfect square selection X and Y direction.

Makes working with images much easier.

@SquareRoot ,
Sorry for the delay with the reply.
A short Python script can be created for your case.
Script input: latitude and logitude of the center of the rectangle, dimensions of the rectangle
Script output: a string with coordinates of the rectangle that can be copied and pasted to the blender-osm addon.

A highly requested option is available in the latest version of the Blender-OSM addon!

It’s now possible to set the maximum size of the resulting image for the satellite imagery to increase its resolution. The option is located in the Overlay section.

image

1 Like

Thank you so much for your hard work man… I’d give you a hug if I could =)
I will check your experimental version and tell you how it is !!