The instructions below should guide you through taking OSM data within Blender and exporting it into Unity to create a 3D terrain for a game.
- Download the zip file in BlenderGIS
- Click the green button
Code
and then clickDownload ZIP
- Click the green button
- Install the add-on by going to
Edit
and then clicking onPreferences
and then selectingAdd-ons
in the lefthand panel. SelectInstall
and then locate the ZIP file on your computer, then pressInstall Add-on
- There is an option if you expand the add-on under Basemaps called
Cache folder
- make sure you have this pointing towards a folder on your computer where you can store GIS data temporarily.
- There is an option if you expand the add-on under Basemaps called
- After installing, you should have a button on the main screen of Blender to the right of Object called GIS. Go to
Web geodata
thenBasemap
. Select the source you want (whether Google, OSM or another data source). - You will then be shown a map of the world. Scroll to the location you want, or press
g
and type in a location. Once you have your area in view, presse
as a shortcut to snip the screen in view. - To get the OSM data, go back to
GIS
and selectWeb geodata
followed byGet OSM
. You will then be able to select all the various datasets of interest to you. Be sure to selectElevation from object
. Press ok and give your computer a little time to import the data—it can take some time depending on how much there is, so keep your area of interst reasonable; i.e. don't try to import an entire city unless you happen to have a super computer 🖥 - Finally, export as an .obj file to a folder on your computer, and import into Unity. You now have an entire geographic area from the real world in your game!