Blender-osm: OpenStreetMap and terrain for Blender

add-ons

(JuhaW) #243
if uVecLength==0:
     uVecLength=0.000001

(Klutz) #244

Oops! Sorry, you’re right, of course! (Corrected my original post.) Thx!


(vvoovv) #245

Dear @lynnnn,

Thank you for purchasing the blender-osm addon!

Please save the blender file after the error showed up and send me it for examination to the address [email protected]


(vvoovv) #246

@Klutz and @JuhaW,

Thank you for your advices! Once I will have the Blender file from @lynnnn, I hope to fix the problem as soon as possible


#247

Thank you guys @Klutz and @JuhaW for helping me to solve this problem. And vvoovv I’ve emailed you the Blender file, thanks in advance!!


(vvoovv) #248

@lynnnn,

Thank you for reporting the problem. I am glad to inform that the problem has been fixed.

Please use the download link in your purchase confirmation e-mail to get the latest addon version.

I am sorry for inconvenience caused by the problem.


#249

@vvoovv Thank you soooooo much for mixing it. Now it’s looking amazing. Great job on building this addon!!


(Dimitar) #250

@vvoovv, this may be the most useful addon i’ve used…and I use many! The premium version is a great improvement! Thank you so much for continuously working on this. I can only imagine once the wider architecture/archviz/masterplanning community finds out about it, they will have a reason to use blender. May do a tutorial on covering the wonderful features soon.

I have a couple of feature suggestions / requests:

  • could there be an option for the gabled roof slope. When i was doing an import of simple terraced housing, the roofs appear to be too steep at the moment. I imagine it’s using the floor to floor factor currently.
  • i looked at the python scripts for materials and even though, i haven’t dabbled too much with OSM data with respect to building tags, it seems like they do exist - residential, commercial, etc based on your code. Wondering if it’s possible to assign quite different style of texture to residential and office? I’m thinking brick rowhomes and glass office buildings as an example. Again, not sure how well buildings are tagged, but there could also be some assumptions based on the area of the building footprint. If area is less than 70 sqm (or something variable), make all buildings residential and assign these types of textures.
  • not sure if it exists in osm data or not, but having plots would be a great addition
  • really looking forward to the upcoming features of forests and more variability options.

Thank you again!


(vvoovv) #251

Hi @dimitarsp

Thank you very much for purchasing the blender-osm addon and for the encouraging words!

I am currently rewriting how buldings are styled both in terms of their shape and cladding. It will be possible to customize many things.

  1. Roof slope for gabled roofs.
    Currently it can be done via a custom setup script. I will send you an example tomorrow.

  2. Assigning materials based on building properties.
    Here is some statistics how many buildings have the type assigned in OSM. 82% of all buildings in OSM don’t have the type assigned. The area of the building footprint can be accessed in the setup script. An example will provided for you.

  3. Plots
    They aren’t available in OSM

  4. Forests
    The code to plant forests is already there. What prevents me from announcing it is the lack of general purpose low polygon models for trees that “look nice”.


(Bazil14) #252

Hi @vvoovv , Thank you for the amazing addon, I’ve just upgraded to the premium version but i am having an issue with assigning materials to the buildings, this is the error i get when i try to import

Traceback (most recent call last):
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\__init__.py", line 153, in execute
    return self.importOsm(context)
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\__init__.py", line 225, in importOsm
    a.render()
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\app\__init__.py", line 383, in render
    m.render()
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\building\manager.py", line 167, in render
    self.renderer.render(building, self.osm)
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\building\renderer.py", line 134, in render
    self.renderElement(outline, building, osm)
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\building\renderer.py", line 163, in renderElement
    self._renderElement(element, building, roof, data, osm)
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\building\renderer.py", line 175, in _renderElement
    roof.render()
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\realistic\building\roof\__init__.py", line 60, in render
    super().render()
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\building\roof\__init__.py", line 220, in render
    self.renderWalls()
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\realistic\building\roof\flat.py", line 46, in renderWalls
    self.mrw.renderWalls(f, w)
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\realistic\material\renderer.py", line 337, in renderWalls
    self.render(face, self.b.wallsColor)
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\realistic\material\renderer.py", line 343, in render
    self.setColor(face, self.vertexColorLayer, color)
  File "C:\Users\jbarrie3\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-osm\realistic\material\renderer.py", line 119, in setColor
    loop[vertexColorLayer] = color
ValueError: BMLoopCol: sequence size is 3, expected 4

location: <unknown location>:-1


Any Help would be much appreciated


(vvoovv) #253

@Bazil14,

Please save the blender file after the error showed up and send me it for examination to the address [email protected]


(vvoovv) #254

Just to inform that the problem reported by @Bazil14 has been solved by @Bazil14 himself.
The cause of the problem was usage of unstable Blender release.

Please always use the latest stable Blender release from https://www.blender.org/download/


(vvoovv) #255

Blender 2.8 beta has been released. Time to port the blender-osm addon to 2.8!

The former Tools panel won’t be available anymore. The blender-osm GUI will be moved to the opposite side of the 3D View.

image


(polarkernel) #256

I just purchased blender-osm premium. Using urban scenes, I was able to reproduce similar results as depicted in the documentation of the addon. It is really a great job you have done, congratulations!

However, my main goal is to create a almost realistic scene of villages in a rural environment that I have mapped at OSM myself. It was my hope that the addon provides a large first step in this direction (and I still hope it does), but maybe it was not its intention. A first attempt was quite amusing, for instance all slurry tanks of the farmyards got windows. :smile:

The feature to use tags for “Simple 3D buildings” was very helpful. At least the buildings get almost the correct shape. Tagging color and material seems not to work always. Sometimes the wall got plaster material instead of brick, although it was tagged with building:material=brick. Maybe there is a bug there. A feature to create forests in a future version, as promised, will be a great enhancement for such scenes!

The premium version provides some customization possibilities, but they remained unclear to me and I hope I may get some help here:

  • blender-osm (premium) allows custom setup scripts. However, the example script for custom textures didn’t help me much, because it is an exact copy of the default setup script. It seems that the script allows to define the wall and roof materials for different buildings tags, but not for facade overlays. Could I for instance remove the facade windows for slurry tanks somehow in a custom setup script?

  • Custom materials may be defined in materials.blend. The description, how to do that, is excellent and I was able to define my own materials. However, I can’t see, how I can apply them to my buildings. Maybe my skills in Blender are not sufficient. Could somebody give me some hints that illustrate this to me?

I like it to define the buildings using tags in a local OSM-file. In principle, I could use even private tags as long as I do not upload them. These could be used in the setup script to define the materials for roof, wall and facade in detail, even for single special buildings. Defining names for custom materials that could be accessed in the setup script would make the addon extremely flexible. I do not consider this as a feature request, but should a similar idea fit to the architecture of the software, the addon could extend the number of use cases widely.

Thanks for any help!


(vvoovv) #257

@polarkernel

Thank you very much for purchasing the blender-osm addon and for your detailed feedback!

Buildings can have only one type of cladding (brick or plaster) in the current version of the addon. However that’s easy to fix from my side.

Concerning the custom facade textures. First, Blender materials are generated out of the given facade textures. At the moment the generated group of materials is selected from the list which contains only 3 predefined entries: commercial, residential and neoclassical. Then the Blender material is assigned to a building based on OSM attributes in the setup script. For example if a building is marked as residential in OSM, then the Blender material “residental” is assigned to the building. I am going to introduce a text field in addition to the list with the predefined entries. So it would be possible to give an arbitrary name to the group of Blender materials and use it for specific building or other objects imported from OSM.

All tags assigned to a building in OSM can be accessed through the tags attribute as one can see in any setup script.

The code for forests is ready. I even ported it to the Blender 2.8.

Regarding slurry tanks. I will send you a private message to get more information from you since not everyone in this thread is interested in reading about slurry tanks :grinning:

In general, I am very interested in adding more realism to the rural scenes imported from OSM.


(Lumpengnom) #258

Hi,
i recently bought the premium version as well and am very happy with it.
I have a question regarding gabled roofs.
Is there a way to influence what is on the gabled parts of the walls? At the moment the facade texture simply tiles windows over the every wall. But on gabled walls the windows often don´t fit and are cut off. Can this be avoided somehow? It would be better if the gabled part just got plaster material without windows.


(hellocatfood) #259

I recently bought the premium version of blender-osm having previously used blender-gis for working with osm files. I’m trying to use your plugin define which data is imported from the osm file, specifically the “areas” attribute.

To illustrate I’m using this location https://www.openstreetmap.org/export#map=17/52.48010/-1.88626

In Blender-GIS I get this result when importing.

In Blender-osm I get this result.

Having the buildings is really useful but at the moment I want to import the areas data. Can this be achieved?


(vvoovv) #260

@Lumpengnom,
Thank you very much for purchasing the blender-osm addon!

After porting the addon to Blender 2.8 and initial release of forests, I am going to concentrate on adding more realism for buildings and solve that issue with the gabled roof.

By the way, you message is also related with the preceding message about providing more realism for rural areas, since many buidlings in the rural areas have the gabled roof.


(bluecd) #261

Hi,
Ive also bought premium, good job, I appreciate.

A question/request:

  1. Could imported terrain be somehow adjusted as to resolution /both 3D and image/ during import or its preset?
  2. Could you add some ‘skirting’ /as an option maybe/ to an imported terrain - so it formed kind of ‘solid’ and not a ‘cloth’ only?

cheers,


(vvoovv) #262

@hellocatfood,

Thank you very much for purchasing the blender-osm addon!

You task can accomplished with a custom setup script. I created one for you. Please download the custom setup script from here. Then set the field Setup script in the addon GUI to that file. I’d also recommend to switch to the 3D simple mode and uncheck unneed data layers (e.g. buildings).

The custom setup script has been created out of the default one. The custom part is located between the lines 56 and 75. The addon will create a separated Blender object for the residential and industrial areas. The other areas of the land usage will be placed into the Blender object with the name ending landuse_other.

If you need to separate other types of areas, create similar code snippets for them. Please see here how specific areas of the land usage are tagged in OSM. The code snippet must be placed BEFORE the one for the other areas (landuse_other).