Skip to content

Premium Version

Vladimir Elistratov edited this page Sep 19, 2019 · 98 revisions

Contents

Introduction

This page contains documentation for the premium version of the blender-osm addon: blender-osm (premium).

In addition to the features of base version the premium version provides:

  • Import of buildings from OpenStreetMap with default materials, tileable building textures and UV-mapping applied.
  • Default materials and textures to mimic lit windows for a late evening setting
  • Import of forests and single trees as 3D objects
  • Options to use custom tileable building textures (e.g. from textures.com)
  • Satellite imagery and web maps projected on a terrain

Subsequent releases will include more details and variability for imported buildings and other features depending on user feedback.

Important notice: the addon does not provide real textures for each imported building!

Important notice: materials with textures aren't exported to external formats at the moment since they are designed for Cycles rendering engine!

Buy the addon at gumroad.com!

By purchasing the addon you support the addon development. All customers will get the addon source code under GPL license! All default textures and materials supplied with addon are released under the CC0 (public license)!

Installation

It is recommended to use the latest official stable version of Blender from https://www.blender.org/download/. The blender-osm addon works for both Blender 2.80 and Blender 2.79.

Buy the addon at gumroad.com. You will get two zip archives which we recommend to download separately:

  • blender-osm.zip. Do not unpack it! If you are on Mac and it unpacked the file automatically, compress the folder back to blender-osm.zip.
  • assets.zip. Unpack it to some location at your hard drive. It contains default materials and textures, material templates, custom setup scripts. It will be referred to as asset pack.

Install the addon via the usual Blender way:

  • Important! Delete the base version or the previous version of the addon if you have one:
    • Edit → Preferences... → Addons
    • Type osm in the search box in the top left corner of the Addons tab to find the addon
    • Press Remove button in the GUI box with the header Import-Export: Import OpenStreetMap (.osm)
    • Restart Blender
  • Edit → Preferences... → Addons → Install...
  • Find the file blender-osm.zip in your file system and press Install Add-on from File... button
  • Enable the addon by checking the Enable Add-on
  • Set a directory to store downloaded OpenStreetMap, terrain, satellite imagery and web map files by pressing the button . It makes sense to create a special directory for that. It's strongly recommended to uncheck the option Relative Path in the file dialog when setting that directory as shown here.
  • It's recommended to set the directory with the content of the asset pack supplied with the addon. Set it by pressing the button . Choose the top-level directory where the files building_materials.blend and vegetation.blend are located. It's possible to override that setting in the addon GUI.
  • To use satellite imagery and web maps provided by Mapbox company, enter your Mapbox access token in the field Mapbox access token . If don't have it, press the button Get it! to get one for free. See the instruction Getting Mapbox access token how to get it.
  • Set the option Viewport Shading to Look Dev or Rendered to see textured scene. The option is normally located at the top of the Blender 3D View as shown on the screenshot.
  • Perform a quick test of blender-osm (premium). The addon GUI is located on the osm tab of the right side panel of the Blender 3D View (see the image below). The panel is toggled with the N key. Press the button import . In a few seconds the skyscraper district of Moscow should appear in Blender.
  • An important note for users of the Blender 2.79. The addon GUI is located on the osm tab of the left side panel of the Blender 3D View. The panel is toggled with the T key.

OpenStreetMap import from the server

Before proceeding to import, note that the addon has 3 modes of operation set by the toggle button :

  • 3D realistic (the default mode): buildings are imported with textures; satellite imagery and web maps can be projected on a terrain.
  • 3D simple: this mode turns the premium version into base one. Please refer to the documentation of the base version of the addon. In particular, toggle this mode to import roads and paths as Blender curves with a profile object.
  • 2D: this mode is also from the base version of the addon. Please refer to the documentation of the base version of the addon.

Follow the steps below to import textured buildings in the 3D realistic mode:

  • Press the button select to select a map extent for your area of interest. A browser window pops up with the special page to select the map extent. Follow the instructions on the webpage. At the end of this step you will have a string with coordinates copied to the clipboard. Now return back to Blender.
  • Press the button paste to paste the coordinates of your area of interest.
  • If you want to place OpenStreetMap buildings and other objects on the terrain, download and import the terrain first by setting the value of the drop-down list to terrain. Further details about terrain download and import can be found here. At the end of terrain import a Blender object for the terrain will be set automatically in the field . You can also set a Blender object for the terrain imported before. Actually an arbitrary Blender MESH object can be set as a terrain in the field . Leave that field blank to place all imported OpenStreetMap objects on the zero level.
  • You can import satellite imagery or web maps any time before or after OpenStreetMap import. Please refer to the documentation section Image overlay import for details.
  • To assign materials for a late evening setting to the imported buildings, set a value of the field Percentage of lit windows between 1 and 100. As its name implies, it defines approximately, how many windows of the imported buildings will be lit. The value of 30 percent normally gives nice looking scene. It's also possible to change the percentage of lit windows after the import of buildings and see the effect immediately. Keep the value of the field set to zero to assign the materials without light emission (i.e. for a day setting). Note, that if the percentage of lit windows was set to zero before the import, any change of the field won't produce any effect after the import.
  • Optional. blender-osm (premium) comes with reasonable default settings. However you might want to tweak some of them as described in the documentation of the base version.
  • Optional: toggle Blender System Console to track the progress of download and import of OpenStreetMap (Window → Toggle System Console).
  • Press the button import to start download and import of OpenStreetMap data.
  • The imported scene can be dozens of kilometers wide! It makes sense to set the far clipping distance of the 3D View at least to 10 thousand! The setting is located on the right side panel of the Blender 3D View (see the image). The panel is also known as Properties region and toggled with the N key. You may also want to increase the far clipping distance of your render cameras.
  • Enjoy the imported scene!

OpenStreetMap import from a local file

  • Important! Do not forget to set a directory in the addon preferences to store downloaded OpenStreetMap and terrain files as described in the installation instructions. The directory is set in the field on the image above.
  • Set the value of the drop-down list to file (see the image above).
  • Select an OpenStreetMap file on your local disk by pressing the button as shown on the image below:

  • The rest of the steps is the same as for the OpenStreetMap import from the server. Note that the GUI for selecting a map extent is not shown since the map extent is defined by your OpenStreetMap file.

Import of forests and single trees

Please refer to the dedicated page Import of Forests and Single Trees

Setup script and Blender file with materials

A setup script can be set in the field . It defines how materials from the Blender file building_materials.blend from the asset pack supplied with the addon are applied to imported buildings depending on attributes of each building.

If no setup script is set, the default one is used. A number of setup scripts can be found in the asset pack in the directory assets/setup:

  • uv_only.py: assigns UV-coordinates to the imported buildings without setting materials
  • neoclassical.py: applies textures with neoclassical facades to all kinds of residential buildings
  • premium_default.py: the default setup script used, if no setup script is set in the field

If you are familiar with coding in Python and OpenStreetMap tagging, you can try to customize any of the supplied setup scripts to suit your needs.

Below is the simplified description, how the materials from the Blender file building_materials.blend are assigned to each imported building in the default setup script premium_default.py.

If a building is marked in OpenStreetMap as the commercial one (e.g. it contains offices), the addon tries to import the following groups of materials:

  • commercial_ground_level.1, commercial_ground_level.2 and up to commercial_ground_level.20
  • commercial.1, commercial.2 and up to commercial.20
  • commercial_ground_level_emission.1, commercial_ground_level_emission.2 and up to commercial_ground_level_emission.20 (imported if the value of the field Percentage of lit windows isn't zero)
  • commercial_emission.1, commercial_emission.2 and up to commercial_emission.20 (imported if the value of the field Percentage of lit windows isn't zero)

If a specific material isn't available in the Blender file building_materials.blend, a warning is printed in the Blender Console.

A material commercial_ground_level.N (where N is a number between 1 and 20) is assigned to a building facade that starts from the ground level. A material commercial.N is assigned to a building facade that starts one or more levels above the ground.

Materials commercial_ground_level.1 and commercial.1 will be assigned to the facades of the first imported commercial building. Materials commercial_ground_level.2 and commercial.2 will be assigned to the next imported commercial building and so on until the maximum number of available materials for the commercial buildings is reached. Then the count starts again from 1. That maximum number can take any value between 1 and 20.

Materials commercial_ground_level_emission.N and commercial_emission.N are assigned to the building facades instead of the materials commercial_ground_level.N and commercial.N, if the value of the field Percentage of lit windows isn't zero.

In the same way materials are assigned to buildings marked in OpenStreetMap as residential (e.g. a building with appartments or a private house). The names of the materials in that case are residential_ground_level.N, residential.N, residential_ground_level_emission.N, residential_emission.N.

Default commercial, residential and neoclassical groups of materials in the Blender file assets/material.blend are designed with two layers of textures:

  • the lower texture layer: a seamless texture representing wall cladding (brick or plaster)
  • the upper texture layer: a trasparent texture with windows, balconies and some facade decorations placed above the lower texture representing the wall cladding

The final diffuse color of the wall cladding of a building facade is influenced by the color assigned by the addon to the vertices that constitute the facade in question. If the wall color is set for a building in OpenStreetMap, then it is assigned to the vertices of the building. Otherwise, a color from the list of predefined colors given in the setup script is assigned to the vertices of the building.

Using custom textures

It's possible to use custom textures (e.g. from textures.com) instead of the default ones. Please refer to the dedicated page Using custom textures

Image overlay import

The addon supports import of a number of image overlay types:

  • Mapbox Satellite: satellite imagery provided by Mapbox company
  • OSM Mapnik: a general-purpose web map displayed at openstreetmap.org
  • Mapbox Streets: a general-purpose web map generated by Mapbox company out of OpenStreetMap data. The web map can be seen here.
  • Custom URL: a web map based on a custom URL template. Examples of valid URL templates are given in the dedicated subsection.

  • Set the value of the drop-down list to image overlay (see the image above).
  • An image overlay can be projected either on the imported terrain or on a flat mesh created during the overlay import. To project the image overlay on the imported terrain, set the Blender object for the terrain in the field . Note that the addon sets the value of the field to the Blender object for the terrain after the terrain import. To project the image overlay on the flat mesh, keep the field unset and select a map extent for your area of interest as described at the beginning of OpenStreetMap import from the server.
  • Select an image overlay type in the drop-down list .
  • If you selected Mapbox Satellite as the image overlay type, be sure to set Mapbox access token in the addon settings as described in the Installation.
  • If you selected Custom URL as the image overlay type, enter the URL template in the field below the drop-down list . Examples of valid URL templates are given in the dedicated subsection.
  • By default the option Set default material is checked. It means that a default Cycles material from the asset pack supplied with the addon will be applied to the Blender MESH object serving as a terrain. The imported image overlay will be used by the Image Texture Cycles node of the Blender material. If that option is unchecked, the imported image overlay can be still found among Blender images in the Blender's UV/Image Editor under the name overlay.
  • Press the button import to start download and import of the image overlay.
  • The download progress will be displayed on the Blender 3D View area. If a specific image tile was downloaded before and is available in the addon data directory set in the addon preferences, then the cached version of the image tile will be used instead of downloading it again.
  • Enjoy the imported image overlay! Normally it is projected on the Blender MESH object serving as a terrain. But it can be found any time among Blender images in the Blender's UV/Image Editor under the name overlay.

Custom URL

This image overlay type is based on a custom URL template, that defines a tiling scheme for the web map. The template should contain the symbols {z} (zoom level), {x} (horizontal tile coordinate), {y} (vertical tile coordinate). For example:

  • http://tile.openstreetmap.org/{z}/{x}/{y}.png for the default OSM map at osm.org (also known as Mapnik)
  • http://mt.google.com/vt/lyrs=s&x={x}&y={y}&z={z} for satellite imagery provided by Google. Important: use it on your own risk since this way of using contradicts the terms of use of Google Maps
  • http://mt.google.com/vt/lyrs=m&x={x}&y={y}&z={z} for the standard map provided by Google. Important: use it on your own risk since this way of using contradicts the terms of use of Google Maps
  • http://mt.google.com/vt/lyrs=t&x={x}&y={y}&z={z} for the terrain map provided by Google. Important: use it on your own risk since this way of using contradicts the terms of use of Google Maps

Terrain import

  • Set the value of the drop-down list to terrain (see the image above).

  • Select a map extent for your area of interest as described at the beginning of OpenStreetMap import from the server. If the map extent was set before, you can skip this step.
  • Optional: toggle Blender System Console to track the progress of download and import of the terrain (Window → Toggle System Console).
  • Press the button import to start download and import of the terrain.
  • The imported terrain can be dozens of kilometers wide! It makes sense to set the far clipping distance of the 3D View at least to 10 thousand! The setting is located on the right side panel of the Blender 3D View (see the image). The panel is also known as Properties region and toggled with the N key. You may also want to increase the far clipping distance of your render cameras.
  • You may want to edit the mesh of the imported terrain in the Blender EDIT or SCULPT modes. In the EDIT mode you may find useful proportional editing.
  • You can import satellite imagery or web maps and project them automatically on the terrain. Set the value of the drop-down list to image overlay and refer to the documentation section Image overlay import for details.
  • Set the value of the drop-down list back to OpenStreetMap and import OpenStreetMap from the server or from a local file.

Links and Contacts

You can’t perform that action at this time.