How to create Surroundings
Many models uses surroundings generated by OSM maps, but how we gonna do this ? Let’s find out
Required software:
Blender - Download — blender.org
Blosm plugin - Plugin
Plugin installation
Download „Blosm“ Plugin from sharepoint
Open your Blender
At the top left settings panel go to Edit - Preferences
Head to Add-ons and click on Install… button
Locate downloaded Blosm zip file and click on Install Add-on
After installing Addon, Blender should automatically prompt you with new window. If not, locate search button in existing window and type osm and you should find blender osm addon installed.
If its not checked please enable it by clicking on the empty square before addon name and than click on little triangle next to it to show addon settings
Now in addon Preferences you should see
Directory to store downloaded OpenStreetMap and terrain files
Click on folder icon next to it and choose directory you prefer. Usually is good to set same directory as client project you currently working on
OSM Website
Now we are gonna visit OSM map website
It should look like this
Locate search bar in top left corner and for the tutorial purposes you can type Skoda M18 (Škoda production buildings in Czech Republic)
Your window should look like this
In the center of the screen is our desired building but we wanna surroundings too, not just the main building
Zoom out and position view so the main building will be roughly in center
Now we gonna define desired area and export map so click on Export button in top right settings
Than we wanna click on manual area selection instead of automatic one
You should see new brightened square pop up on map
Now we can define desired area to be exported. See image bellow how to Scale and Transform area
It works just like in Photoshop. With little squares you can resize desired area
With this icon with many dots you can move desired area
Resize and Transform desired area but please keep main building roughly in center. Also you don’t need to cover huge area.
OSM website some time ago limited maximum manual area coverage so you if you select big area it will prompt you with the error message
Somewhat this area is great
Now Export it
Download file should look similar to this (Without number 4)
Blender part
Press shortcut N to bring setting panel from right and between Tool, View and others locate osm part
Here in Settings panel change server to
Click on folder icon and locate generated map.osm
Now we need to uncheck things we don’t want to import
Uncheck Import water objects
Uncheck Import forests
Uncheck Import other vegetation
Check Import railways
We can also tweak other settings but in default they are pretty set up.
Now click on Import button
If you get error after import button, just change addon map import location in step 8 (Plugin installation part)
After succesfully importing OSM maps you should see them in viewport, but as you can see we need to Rotate and Move them to match in real world
You can also Scale, Rotate, Transform them as you like but they don’t need to be perfect. They are just for the visuals. You can also modify them as you like
If your screen suddenly cut in half during zoom out. Don’t worry. You just need to change Clipping End value to 5000
During OSM transform you can see that your main building is imported too. Thanks to that you can easily match OSM position to match real world location
Please select OSM buildings in Edit mode delete main building part
Now on the right side panel you should see 2 types of objects
Triangle one (Mesh)
Line one (Curve)
Select all Curves, press F3 and search for convert to mesh
After converting please join all roads, footways, railways and similar paths into the one single object
After that you should have 2 objects - Buildings and Roads
Rename it if you like
Delete all OSM Materials and create one for roads and one for buildings
Now we optimize little bit. Select all buildings in Edit - Face mode and Merge close vertices by 0.1
Next thing to do is splitting buildings via separate by loose parts function
Last thing to do is cleanup. You can delete associated curves in way_profiles folder since we don’t need them anymore
Associated parts
This tutorial is associated with another tutorial: How to prepare OSM data for Twinzo
If you encounter any issues or need assistance with using this product, please do not hesitate to reach out for support. Our team is here to help you resolve any problems and answer any questions you may have.
To create a support ticket, visit our support portal at https://partner.twinzo.eu/helpdesk/customer-care-1