Document toolboxDocument toolbox

How to create Surroundings

Many models uses surroundings generated by OSM maps, but how we gonna do this ? Let’s find out


Required software:



Plugin installation

 

  1. Download „Blosm“ Plugin from sharepoint

  2. Open your Blender

  3. At the top left settings panel go to Edit - Preferences

    image-20240529-113018.png

 

  1. Head to Add-ons and click on Install… button

  2. Locate downloaded Blosm zip file and click on Install Add-on

  3. 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.

  4. 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

  5. Now in addon Preferences you should see Directory to store downloaded OpenStreetMap and terrain files

  6. 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

 

  1. Now we are gonna visit OSM map website

  2. It should look like this

  3. Locate search bar in top left corner and for the tutorial purposes you can type Skoda M18 (Škoda production buildings in Czech Republic)

  4. Your window should look like this

  5. In the center of the screen is our desired building but we wanna surroundings too, not just the main building

  6. Zoom out and position view so the main building will be roughly in center

  7. Now we gonna define desired area and export map so click on Export button in top right settings

  8. Than we wanna click on manual area selection instead of automatic one

  9. You should see new brightened square pop up on map

  10. 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

  1. 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

  1. Somewhat this area is great

  1. Now Export it

  2. Download file should look similar to this (Without number 4)


Blender part

 

  1. Press shortcut N to bring setting panel from right and between Tool, View and others locate osm part

  2. Here in Settings panel change server to

  3. Click on folder icon and locate generated map.osm

  4. Now we need to uncheck things we don’t want to import

  • Uncheck Import water objects

  • Uncheck Import forests

  • Uncheck Import other vegetation

  1. Check Import railways

  2. We can also tweak other settings but in default they are pretty set up.

  3. Now click on Import button

If you get error after import button, just change addon map import location in step 8 (Plugin installation part)

  1. 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

  1. If your screen suddenly cut in half during zoom out. Don’t worry. You just need to change Clipping End value to 5000

  2. 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

  3. Please select OSM buildings in Edit mode delete main building part

  4. Now on the right side panel you should see 2 types of objects

  • Triangle one (Mesh)

  • Line one (Curve)

  1. Select all Curves, press F3 and search for convert to mesh

  2. After converting please join all roads, footways, railways and similar paths into the one single object

  3. After that you should have 2 objects - Buildings and Roads

  4. Rename it if you like

  5. Delete all OSM Materials and create one for roads and one for buildings

  6. Now we optimize little bit. Select all buildings in Edit - Face mode and Merge close vertices by 0.1

  7. Next thing to do is splitting buildings via separate by loose parts function

  8. 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