Published by breki on 17 Jul 2008 at 09:10 pm
OpenStreetMap In 3D
Well Google Earth it is not ;).
A long time ago I mentioned I’ve been dreaming about drawing OpenStreetMap maps in 3D. Well for past few days I’ve been playing around with DirectX. Basically I took Mini 3D Terrain Viewer tool kindly provided by Patrick Murris and did some cannibalising of the code to make it draw a SRTM3 generated relief with an Kosmos-exported map of my home town Maribor (OSM map).
Here are some screenshots of the results so far (you can download somewhat larger versions of images from here).
The images are reduced from 1680×1000 resolution due to bandwidth constraints. The Kosmos-exported map which was used as a texture has a resolution of around 8000×8000 pixels (elevation contours are a part of that image and not rendered as 3D objects themselves). The whole thing was rendered on a GeForce 7600 GS.
This is just a crude prototype of 3D rendering which I want to introduce into Kosmos in the future. My wish is to draw OSM elements directly in 3D and not as part of a texture, but since I’m not an expert on DirectX, this could take a while (any helpful suggestions from 3D experts will be appreciated). But even in this crude state I think it looks quite nice, don’t you think?
5h4mr0(k on 17 Jul 2008 at 22:53 #
Nice!
I was thinking if something similar could be done by using the altitudes for each point of a GPS trace. Then you could get a nice picture of roads that are cut into mountains.
blackadder on 17 Jul 2008 at 23:47 #
very nice work
anselm on 18 Jul 2008 at 0:12 #
it is awesome. drawing triangle strips in 3d for roads and other features would not be terribly hard either. it would be nice to imagine what you could then do; such as indicating colored volumes for town boundaries.
Harry Wood on 18 Jul 2008 at 1:27 #
Looks awesome! Could be a good trick to try to apply to my whitewater maps, since good whitewater is found in the valleys between big mountains.
breki on 18 Jul 2008 at 7:05 #
Thanks guys. I’m looking forward to your feedback once I get this prototype into Kosmos GUI (probably in the release 2.2). Maybe I’ll publish a temporary standalone app just for 3D rendering even before that.
elin ibbotson on 18 Jul 2008 at 9:24 #
Very nice but it needs DirectX. I cut my map programming teeth on a viewer for British OS maps which uses Java 3D (http://britain.poco.org.uk/desktop.html). I can’t share it because of copyright restrictions on the maps, but the principle would apply to any map source including OSM. Why not use Java instead of Microsoft stuff then it would run on anything. There’s an awful lot of us using Linux or Macs - anything but Windows!. I like the idea of Kosmos but - MS .net!!
breki on 18 Jul 2008 at 16:30 #
Elin, from my post to the OSM-talk mailing list:
“Guys, I understand what you’re saying and in general I agree, it’s better to use an open and portable technology than a closed-source like MS. But I live in a real world, my programming skills are in C# and MS.NET (mostly because I also use it in professional life, for which I’m only partly to blame). If I had decided 10 months ago that I’ll start implementing Kosmos in Java (not to mention migrating from Windows to Linux), then Kosmos would now still be just a simple command-line tool (or maybe I would have given up, who knows). It’s the experience in a technology that allows me to concentrate on a concrete problem I’m solving and not on the nitty-gritties of a particular technology.
While I believe in portable apps, I find portable GUI-s to be quite lacking regarding the user experience (at least on Windows, I don’t know about other OS’s). There are exceptions, of course.
Anyway, Kosmos is open-source (I’ll release the new source with the upcoming 2.1 release) and has quite a liberal license so if anyone’s interested and has the time and will, he can “cannibalize” the code and make something new and portable.”
Igor
Living with Dragons » Bumpy Map on 18 Jul 2008 at 23:17 #
[...] guy who created Kosmos, the windows user-friendly renderer for OSM, has done some really fun stuff. Using NASA’s SRTM3 height data to create a bumpy ‘canvas’ representing the [...]
igorbrejc.net » OpenStreetMap 3D - Short Video on 18 Jul 2008 at 23:37 #
[...] uploaded a short video of the OSM 3D rendering in [...]
Openstreetmap » Archive du blog » Quelques nouveautés intéressantes en vrac on 19 Jul 2008 at 0:17 #
[...] travail sur Kosmos pour le rendu des cartes en 3d. Quelques images et une [...]
Rene Schulte on 23 Jul 2008 at 13:50 #
Hello Igor,
very nice program. I fully understand your decision for .Net and against Java. Kosmos3D will also work on Linux with Mono and OpenGL as the graphics API.
Maybe you could give OpenTK a try (http://www.opentk.com):
“The Open Toolkit is a game development library for .Net/Mono with an elegant, yet powerful, API. It enables you to bring your ideas to fruition, leveraging the full power of .Net, OpenGL and OpenAL.
OpenTK needs no setup. It runs on Linux and Windows and works with all .Net languages, like C#, VB.Net and IronPython. Best of all, it is - and will remain! - free for both commercial and non-commercial projects. ”
I have done a project with OpenTK. OpenTK has a quite intuitive interface and I think it could be the right graphics API for your project too.
milovanderlinden on 23 Jul 2008 at 14:00 #
Nice work!
Regarding cross-platform and more options:
You might also take a look at the “Virtual Terrain Project” which is truely cross-platform and has some GIS-sy options, for instance to put in building blocks:
http://www.vterrain.org/
Good luck and I would love to see more of this wonderfull work!
breki on 23 Jul 2008 at 16:21 #
@Rene:
I’m investigating several cross-platform 3D engines… Here are some of them:
http://axiomengine.sourceforge.net/wiki/index.php/Main_Page
http://irrlicht.sourceforge.net/
http://www.horde3d.org/
I haven’t seen opentk yet, I’ll take a look, thanks for the info.
@Milo
Vterrain site is a great source of information, I already used it extensively for the work on Kosmos.
Regarding portability: this is not just an issue of 3D rendering, there are also portability problems regarding the GUI and the things that are missing or differently done in Mono. Kosmos 1.x was kind-of-portable in Mono, but there were a lot of problems.
Unfortunately I don’t have the time to support multiple platform development, so I’m forced to stick to Windows (for now).
Rene Schulte on 24 Jul 2008 at 9:51 #
OpenTK has an active and helping community. There you can also find a guy named JTalton, who codes a 3D Model Editor called Golem3D (http://www.golem3d.com).
breki on 24 Jul 2008 at 14:55 #
Rene, thanks for the info. BTW, very cool website you have…
igorbrejc.net » Status Update On Kosmos on 01 Aug 2008 at 21:25 #
[...] abandoned the approach of continuing working on the cannibalized code from Mini 3D Terrain Viewer simply because there were too many problems which I didn’t know how to solve easily. Anyway, [...]
Kosmo on 19 Aug 2008 at 17:00 #
Looks nice,
it has potential, make further
greets
Kosmo
(OSM Newbie)