Search code examples
javaandroidopengl-esheightmap

Create a Synthetic Vision System


I would like to add this feature to my android app: https://en.wikipedia.org/wiki/Synthetic_vision_system

In short it I believe it is a terrain heightmap. I specifically need help with rendering the terrain. The rest of the display I can accomplish.

After a day of google I appear to be no closer. My research seems to point to using opengl, heightmaps and SRTM. However I have no clue how to tie it all together. None of the java examples are android specific.

Alternatively maybe using openstreetmaps and a tile overlay but I cant establish if it is possible in 3D.

The app will be a moving map based on GPS position of the aircraft. As the aircraft moves over the earth the terrain ahead will be updated.

Can someone point me in the right direction?


Solution

  • I can recommend you to use a vector format with few layers. For example, layer of depth, layer of landscape type and layer of objects. To build 3D from this data you need to divide the map in small tiles and load data in memory for visible area only. Your 3D builder will parse this data. E.g. a simple renderer (using OpenGL)... You create mesh as large as tile size and with enough count of vertexes. Next, you parse depth layer and move each vertex along Z-axis like it need. After you need to set color like it specified in type layer. And finally, you need create and locate objects like object layer data (it's already built-in meshes). When you build needed tiles you pass it to renderer.