OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2011-11-22 00:21:15

Tordanik
Super Senior Member
From: Germany
Registered: 2008-06-17
Posts: 1,551
Website

Introducing OSM2World

Some of you already know my current Open Source project, OSM2World, but I have not yet written about it on this forum. With an OSM2World image being featured as the current "image of the week", I think it's high time to change this.

Domblick%20Innstadt.png Openlayers%20Rostock.png BenchesNKPOVDetail.png

OSM2World is a 3D renderer/converter written in Java. It can create 3D models from OpenStreetMap data.

Features include:

  • writing .obj and .pov model files (you can also easily add more output formats)

  • rendering .png images, including map tiles

  • drawing directly to OpenGL

  • a graphical interface with real-time rendering

  • a command line interface with many configuration options that supports automated rendering of images on servers

  • support for a growing number of OSM attributes and objects, from billboards and benches to railways and buildings

Read more about it here:

If you want to use OSM2World or even help to make it better, you are welcome!

Offline

#2 2011-12-13 12:17:28

Re: Introducing OSM2World

Can OSM2World combine normal OSM data with digital elevation data from SRTM or OpenDEM?

Online

#3 2011-12-13 12:26:11

viw
Super Senior Member
Registered: 2010-05-15
Posts: 1,818

Re: Introducing OSM2World

vvoovv wrote:

Can OSM2World combine normal OSM data with digital elevation data from SRTM or OpenDEM?

Take a look at options/elevationcalculators

Offline

#4 2011-12-13 12:38:47

Re: Introducing OSM2World

What is options/elevationcalculators ? Where to look for it?

Online

#5 2011-12-13 12:45:34

Tordanik
Super Senior Member
From: Germany
Registered: 2008-06-17
Posts: 1,551
Website

Re: Introducing OSM2World

vvoovv wrote:

Can OSM2World combine normal OSM data with digital elevation data from SRTM or OpenDEM?

Yes, it can do this, but only if you convert that data to an OSM format and merge it with the input data.

The quality is very much hit-or-miss at the moment. That's why elevation calculation is disabled by default. If you want to try it and are working with OSM2World's graphical interface, you can use the menu entry "Options -> ElevationCalculator" mentioned by viw. Among the non-zero elevation options, "ForceElevationCalculator" is going to produce the least broken results with normal input data. ("EleTagElevationCalculator", for example, would require you to edit/preprocess the input so that every single node has an ele tag.)

As a future perspective: Elevation calculation is a feature that I've planned for from the beginning and I expect to have it working reliably at some point during the next year, but I'm still working on it.

Last edited by Tordanik (2011-12-13 12:46:45)

Offline

#6 2011-12-13 13:11:08

Re: Introducing OSM2World

Tordanik wrote:

Yes, it can do this, but only if you convert that data to an OSM format and merge it with the input data.

Can I use the data from here without additional preparation: http://geoweb.hft-stuttgart.de/SRTM/srtm_as_osm/ ?

Online

#7 2011-12-13 13:25:03

Re: Introducing OSM2World

A minor bug for Povray:
#include "osm2world_trees.inc" is missing but trees from that file are included to a generated .pov file

Online

#8 2011-12-13 13:35:59

Re: Introducing OSM2World

I'm interested in exporting to povray
How can I assign a bitmap texture to a class of surfaces?

Online

#9 2011-12-14 02:12:01

Tordanik
Super Senior Member
From: Germany
Registered: 2008-06-17
Posts: 1,551
Website

Re: Introducing OSM2World

vvoovv wrote:
Tordanik wrote:

Yes, it can do this, but only if you convert that data to an OSM format and merge it with the input data.

Can I use the data from here without additional preparation: http://geoweb.hft-stuttgart.de/SRTM/srtm_as_osm/ ?

IIRC another user of OSM2World has already used these for his experiments, so I think they should work in principle. A bit of preparation might be necessary as the files declare using API version 1.5 instead of the current 1.6 version. I could test this myself tomorrow if you want a more definitive answer.

A minor bug for Povray:
#include "osm2world_trees.inc" is missing but trees from that file are included to a generated .pov file

Oh, I'll look into that.

I'm interested in exporting to povray
How can I assign a bitmap texture to a class of surfaces?

You can overwrite the default textures by using #declare instructions. For example, to replace the boring grey for asphalt surfaces with a bitmap texture, add

#declare texture_ASPHALT = texture {
  pigment {
    image_map {
      png "mytexture.png"
    }
  }
  finish {
    ambient 0.5
    diffuse 0.5
  }
}

in the upper part of the .pov file (somewhere above the "material and object definitions" preferably) or in an .inc file included from the .pov file.

The easiest way to find out what materials are used in a scene is probably to scroll through the "material and object definitions" section.

Offline

#10 2012-01-14 20:44:31

Re: Introducing OSM2World

Tordanik wrote:
vvoovv wrote:

Can OSM2World combine normal OSM data with digital elevation data from SRTM or OpenDEM?

Yes, it can do this, but only if you convert that data to an OSM format and merge it with the input data.

Could you please explain a bit how do you merge OSM data with SRTM?
It is not clear either from http://wiki.openstreetmap.org/wiki/OSM2 … ation_data

http://wiki.openstreetmap.org/wiki/SRTM does not help much, although it mentions srtm2osm, which in turn has a section about merging:

http://wiki.openstreetmap.org/wiki/Srtm … rging_Data

Is it what you are using?

Thanks a lot!

Mayeulk

Offline

#11 2012-01-16 18:08:37

Tordanik
Super Senior Member
From: Germany
Registered: 2008-06-17
Posts: 1,551
Website

Re: Introducing OSM2World

Mayeul wrote:

Could you please explain a bit how do you merge OSM data with SRTM?

I'm not actively working with SRTM data myself right now, so I can only speak from my limited experiences and users' reports.

OSM2World can work with ele tags on nodes and/or ways, so whatever process you use needs to result in that representation. Merging data simply means that the SRTM-derived data and the original OSM data need to be in the same file. For manual one-time experimentation, even combining layers in JOSM should be sufficient. The srtm2osm tool looks as if it would work very well for the task, too. (But no guarantees, as I haven't used it myself yet.)

Offline

#12 2012-01-26 16:08:10

Re: Introducing OSM2World

Hi
I'm new user to osm2world. I'm trying to render data downloaded previously from OSM by JOSM editor. But unfortunately I recevie only this crash box: crash01.jpg
What's wrong? Please help me.

Last edited by archOSM (2012-01-26 16:09:08)

Offline

#13 2012-01-26 17:01:14

Tordanik
Super Senior Member
From: Germany
Registered: 2008-06-17
Posts: 1,551
Website

Re: Introducing OSM2World

archOSM wrote:

I'm trying to render data downloaded previously from OSM by JOSM editor. But unfortunately I recevie only this crash box:

Can you send me the file you are trying to load? That would it make it easier for me to find the reason why it doesn't work. My email address is listed on http://osm2world.org/contact/

That error may be caused by various problems, including incomplete ways and - under certain circumstances - incomplete relations.

Offline

#14 2012-02-13 00:46:38

Tordanik
Super Senior Member
From: Germany
Registered: 2008-06-17
Posts: 1,551
Website

Re: Introducing OSM2World

In case anyone wondered: We have since identified the reason for the "Could not perform conversion" issue. While errors like that are often caused by the extraction procedure, that was not the case here. Instead, broken building geometry within the OSM database triggered the problem. The area in question contained building areas with only 2 distinct nodes, as well as self intersecting outline polygons.

OSM2World actually provides meaningful error information in cases like those when it is run from command line, but these details unfortunately do not show up in the graphical user interface yet. This is something I intend to improve with a future release of OSM2World. I also plan to make it more robust: Preferably, it should drop these buildings or try to make the best of them and output a warning, but continue the conversion.

Offline

#15 2012-07-18 02:59:06

Tordanik
Super Senior Member
From: Germany
Registered: 2008-06-17
Posts: 1,551
Website

Re: Introducing OSM2World

It has been a while since the last official release and there's still some work left until 0.2.0 is finished, so I decided to write a post about current developments at OSM2World. The most important feature of the next version will be the newly introduced support for textures. It has already been implemented for OpenGL and OBJ; the POVRay export doesn't support textures yet.

Passau%20from%20Inn%202012-07-15%20300px.png

While I'm at it, I'm adding a few interesting details beyond basic texturing. This includes rendering of building walls with multitexturing and color blending. This allows (as previously described in another thread) to set a wall's material, color and elements such as windows independently.

OSM2World is not yet evaluating any detailled attributes for windows. The software simply tries to find a plausible window arrangement based on building shape and number of levels, e.g. by making sure that the number of windows on each wall is an integer. A small number of building types, such as garages, get special treatment.

Textures can be PNG or JPG files. PNG textures also support an alpha channel. This allows partial transparency, as demonstrated below with a chain-link fence, which also allows a more realistic rendering of trees.

300px-OSM2World_0.2.0_-_Transparent_fence.png

Adding textures has been made possible to a large part by Marek's initiative to create a Texture Library and the contributors who have donated textures. Many textures used in the renderings above have been taken from that library and its existence has motivated me to implement the feature in OSM2World.

Offline

Board footer

Powered by FluxBB 1.4.8
Hosting sponsored by Oxilion