Blender-osm: OpenStreetMap and terrain for Blender

add-ons

(Shade333) #161

so there is no way importing from local file?
how am i suppose select from browser and match it buildings?


(vvoovv) #162

It’s possible to import OSM from a local file as described in the documentation.

Use the same area for both terrain and OSM import. Import the terrain first to place OSM building on the terrain.


(vvoovv) #163

@Shade333

If you’d like to import an OSM file with non-rectangular area, please do the following:

  • Import the file as described in the documentation in 2D mode with both Import as a single object and Arrange into layers unchecked. A single flat Blender mesh will be created.

  • Select that Blender object and press from active to derive the map extent from the acrive Blender object

  • Import the terrain as describe in the documentation.

  • Import your OSM file once again, but now in 3D mode with both Import as a single object and Arrange into layers checked.


(anarubbet) #164

Hi!

I’m using an older version of your addon and I’d like to know more about TransverseMercator class:

  • How many “blender points” are necesary to represent a meter in real life? I mean, I want to know what is the displacement in X (from 0 to displacement blender points) if you want represent 1 meter (from 0 to 100 cm) in real world.
  • With a lat=0.0 and lon=0.0 georeferencing, why UTM coordinates returned on fromGeographic function are different from the ones I get here?

I would love to know more about TransverseMercator in general, please.
Thanks in advance and sorry for my bad english!

Ana.


(vvoovv) #165

@anarubbet

I hope that you’ll upgrade to the current version of the blender-osm addon!

UTM is a different projection than the one used by the addon.

Wikipedia article is a good source of information about the spherical Transverse Mercator projection.

One meter is equal to one Blender unit.

The central meridian used by the transverse Mercator projection comes through the center of the Blender global coordinate system. That ensures negligible distortion in the vicinity of the center of the Blender global coordinate system. Distortion will be quite noticable far away (e.g. 100 km) from the center.


(vvoovv) #166

Time to reveal some features of the premium version of the blender-osm addon. A real world woody landscape with lakes has been generated by the premium addon to be released later. It’s based on OpenStreetMap data. See the location of the virtual camera on the 2D map.
Buy the base version now to get a discount https://gumroad.com/l/blender-osm



(AnonImplied) #167

Just bought and tried the add on. Really awesome but I got a few questions. Is there going to be a way to be able to get textured buildings in the future like from the Google Earth 3d models? It kind of looks pretty drab without proper textures on the buildings. And what about roads? I see splines that represent the roads but no actual polygon road objects. Keep up the good work!


(vvoovv) #168

Hello AnonImplied!

Thank you for buying the blender-osm addon!

I will implement textured buildings and roads in the premium version of the addon.
The order of development:

  1. first, nature (3D trees for forests and textures) will be supported (see the image in the previous message)
  2. then roads
  3. then textured buildings

For now there is a simple way to get polygons for roads.
Convert the mesh with roads to Blender curves. Set a bevel object (a simple edge with two vertices along X axis converted to Blender curve) for the curve. Convert the curve back to mesh.


(matali) #169

Hi vvoovv
I got this error today:

Downloading the file from http://overpass-api.de/api/map?bbox=...
Saving the file to C:\data\OSM\osm\map.osm...
Parsing OSM file C:\data\OSM\osm\map.osm...
Downloading data for incomplete OSM relations
Downloading the file from http://overpass-api.de/api/interpreter...
Saving the file to C:\data\OSM\osm\map_extra.osm...
Parsing and processing data from the file C:\data\OSM\osm\map_extra.osm for incomplete OSM relations
Time for parsing OSM file: 0:00:02.199978
Processing the parsed OSM data...
The number of buildings: 15761
Time for processing of the parsed OSM data: 0:00:00.419996
Creating meshes in Blender...
Traceback (most recent call last):
  File "C:\blender\2.78\scripts\addons\blender-osm\__init__.py", line 86, in execute
    return self.importOsm(context, basePath)
  File "C:\blender\2.78\scripts\addons\blender-osm\__init__.py", line 122, in importOsm
    a.render()
  File "C:\blender\2.78\scripts\addons\blender-osm\app\__init__.py", line 219, in render
    m.render()
  File "C:\blender\2.78\scripts\addons\blender-osm\building\manager.py", line 145, in render
    self.renderer.render(building, self.osm)
  File "C:\blender\2.78\scripts\addons\blender-osm\building\renderer.py", line 120, in render
    self.renderElement(outline, building, osm)
  File "C:\blender\2.78\scripts\addons\blender-osm\building\renderer.py", line 149, in renderElement
    self._renderElement(element, building, roof, data, osm)
  File "C:\blender\2.78\scripts\addons\blender-osm\building\renderer.py", line 178, in _renderElement
    if roof.make(z2, z1 if wallHeight is None else roofMinHeight, None if wallHeight is None else z1, osm):
  File "C:\blender\2.78\scripts\addons\blender-osm\building\roof\profile.py", line 559, in make
    self.createProfileVertices(pv1, pv2, _pv, roofMinHeight, noWalls)
  File "C:\blender\2.78\scripts\addons\blender-osm\building\roof\profile.py", line 734, in createProfileVertices
    slot.append(pv1.vertIndex, pv1.y, self.originSlot, reflection)
  File "C:\blender\2.78\scripts\addons\blender-osm\building\roof\profile.py", line 267, in append
    parts.append((y, [vertIndex], reflection, self.index))
AttributeError: 'Slot' object has no attribute 'index'

location: <unknown location>:-1

location: <unknown location>:-1

Using latest buildbot, with gabled roof as default and roads and path. No terrain and other options at default values.

In the UI I got: 'http error 429: Too many requests", but I get this error very often and the import works anyway. So I don’t think the problem is somewhere else.


(vvoovv) #170

@matali

Thank you very much for your error report!

Could you please save a Blender file with the addon settings and send me the file to the address [email protected]

So I will try to reproduce the error.


(matali) #171

http://pasteall.org/blend/index.php?id=46388


(vvoovv) #172

@matali

Thank you for the file!

I have reproduced the error!

I’ll try to fix it till Sunday.

The error doesn’t appear if the default roof shape is set to flat.


(matali) #173

Awesome, thanks :slight_smile:


(vvoovv) #174

@matali

I identified the building outline that caused the problem. I hope to fix it soon.


(vvoovv) #175

@matali

The problem has been fixed! I’ll contact you to send you the updated version.


(vvoovv) #176

The whole Moscow (140 thousand buildings!) were imported from OpenStreetMap to Blender with the blender-osm addon.

Get the addon at https://gumroad.com/l/blender-osm


(bliblubli) #177

Really impressive, would it be possible to automatically download and project some maps on the terrain like the Blender-GIS addon does?


(vvoovv) #178

Yes, I will implement that feature in the premium version.


(bluecd) #179

Hi,

Got some problem-only an Empty can be seen, no matter if I import from server or a file. No matter 3D or 2D, what I might have done wrong?


(vvoovv) #180

@bluecd

Please save the .blend file with the result of the import and send the file to [email protected] for investigation.