Dynamic 3D world rendering using Unity3D

Looks quite impressive! Can’t wait to walk in 3D through my town!

Thanks eis_kalt. Very nice thing!
Best regards,
Marek

The latest changes in demo project demonstrate various aspect of usage:

  • *SimpleMap2D *scene loads 2D map of large area with low detail terrain and allows you to skip the certain objects (e.g. buildings, trees) using MapCSS rules for different zoom levels. You can also pan/zoom map.
  • *SimpleMap3D *scene loads one tile with all details (full detail terrain, buildings, trees) and adjusted tiles with low level of details. You can walk and interact with environment: modify facade of building, make craters. Tiles will be loaded/unloaded automatically.
  • GpsTracking scene demonstrates how to work with Location Services (e.g. GPS). Nmea file is used as GPS signal source to simulate movement.
  • *GuiEditor *scene demonstrates several features: map editor (create new map object such as buildings, barriers, trees; adjust terrain height), current address resolution (detects where you are), dynamic switch between 2D/3D maps (2D map shows larger area). You may find video which shows this scene in action above.

Next version will support custom textures for map objects, e.g.:

Version with textures is published!

Working on rewriting core logic using C++ to make it completely independent from Unity3D and increase performance. Also support of multiply zoom levels are planned (e.g. render Earth as globe on zoom level one and buildings/all details in 3D on highest level).

Running on mobile devices is still target.

Just first raw results showing chosen direction - rendered globe at zoom level 1:

No texturing yet, color gradient logic is slightly broken, but I was able to use coastline data (from natural earth shapefiles) and mesh generation is quite fast.

Just added future ability to specify color/gradient for each country:

It will be just one country specific rule in mapcss, e.g.:

area|z1[sr_geounit=Germany] {
color: gradient(yellow);
}

…and it is so easy to apply texture to generated mesh keeping assigned country colors (+ borders) :

Not bad!

But do you plan to release any software package or web service that can be accessed by normal users? In an easy way?

When this moment will come, will there be a release announcement or blog posting by you?

Current plan is start from releasing this as FREE unity asset for desktop and mobile platforms (e.g. Android) when all major features are implemented and it is stable (cannot estimate so far the concrete date, but for sure I need several months). I’m already aware about making it easy to use and considering this as a MUST requirement.

Nice thing, that core part has no dependency on Unity at all as I’m writing it using C++11 without any Unity or platform specific API. You call something like loadTile with quadkey, desired mapcss style + callbacks which are called to return you back generated mesh or raw data (node/way/relation for given region if you want to process it from your code). Then is up to specific engine to build “game object” from this data.

Theoretically it can be reused in some other 3D gaming engine or visualization software.

I will keep posting here and at Unity forum.

Another feature: offsetting polygons:


Here, some countries are moved up and water is moved down. All parameters are dynamically configurable via mapcss, e.g.:

area|z1[sr_geounit=Germany] {
color: gradient(orange);
height: 1;
}

It’s not difficult to process some places:

Here, text and sphere for each place are created on unity3d side from geodata provided by the library. Of course, visual representation can be improved: text from opposite side of globe should not be visible, but this is just example.

I made old implementation open source.

I updated initial post with the latest information

I was able to create Android build (armeabi-v7a). It contains so far some hardcoded values (sdcard path for offline map data, start geocoordinate), but shows that it is working and performance quite good even without any additional improvements which I’m pretty sure I can do.

Test build is here: https://1drv.ms/u/s!Amj1U012bYtsgp9HH9r6yx9bKP1cjg
(temporary, will remove it soon)

So, I added scene with bird-eye level of details (zoom=14) and globe [zoom=1]. See screenshots in updated first post.

Cool, thank you!

Just need to create unity asset and android build so that people can try it without guessing what is it and how to make it work :smiley:

Please do this! It would be great to use it.