Hey Asmi, that terrain looks awesome in the last pic
How far is it done ?
I'm not asmi, but may be I should comment it since asmi don't actually know about progress at my side in the last two months because he wasn't very active at that time. (so I was making changes in my local copy of source code)
Last two or so months I was working on updated terrain engine. I separated TerrainManager into 2 classes: TerrainClient (3D API independent part) and TerrainManager (depends on specific 3D API) and rewritten code for procedural generation part, added some code for fft-based water, converted depth-field trees from proland (which has GPL license), added code for rendering of things like rocks (instanced on random points low-poly meshes) and grass (billboards on the random points too) also was trying to convert openstreetmap xml files into client-readable format and was trying to find a way to implement rendering of openstreetmap's data in client (roads and buildings).
I think that these awesome depth-field trees (
http://hal.inria.fr/docs/00/65/01/20/PDF/article.pdf) are best option for this client. (simple billboards have popping artifacts and looks very ugly from above, while meshes can quickly decrease fps to unplayable level even on very good hardware) They are very fast to render (you can have 100 000 in one frame with good fps on video card like 470gtx) and allows to have an image of same quality with an image rendered with high-resolution meshes if you aren't too close to them. The only drawback of this technique is high texture memory usage - authors use an array of 181 256x256 RGBA8 fully mip-mapped textures for each tree type and it means that 1 tree type consumes ~58 mb of texture memory. And it will be 2 times more if you have 2 tree types - but we can deal with it by reducing size of textures 128x128 which shouldn't affect quality when you have tree that covers less than 128x128 region on your screen.
I wanted to implement these trees earlier but I didn't have a code for them to look at so I created that ugly mesh/billboard thing first. But now, when the source code of proland (which have these trees) are available I think that these trees should be implemented in the client. Currently this feature is fully coded but not debugged yet.
It should be possible to convert OpenStreetMap data into client-readable format. these planet dump files (which have size about 315 GB) are xml files which contain nodes(vertexes) ways(lines). It is possible to read ways, find only those you want to sort by tags (roads, buildings etc.) find nodes for them and create meshes with ways in tile local coords. Size of file in client-readable format shouldn't be more than few gbs with compression. Then it is easy to render them using geometry shader and linestrip primitives. I wrote a converter but amount of data is very large and my computer has too low amount of RAM (it is required for a stage when each of ways finds a coordinates for its nodes -> indexes of way nodes are "random" -> a lot of random-access reads which is possible to deal with only when data is in RAM. file with nodes has size of 27gb while I can't allocate more than 3gb -> very slow process) so this feature will be last to finish.
Tesselation of terrain also will be improved. In the previous version terrain used trianglelist/patchlist_3cp primitives with tesselation. It lead to ugly cracks in tile mesh when I tried to make tesselation factor variable. I "fixed" it by assigning constant tess. factor to all triangle edges. It made too tesselated mesh when it wasn't needed and decresed the fps. After reading some code of other projects it is clear that terrain tesselation must use adjacency information in hull shader to find correct tesselation factors on triangle edges that match between adjacent triangles.
Also previous version of terrain engine used normals computed in domain shader. It lead to very bad quality of terrain at low mesh resolution and too bad fps when quality was good and mesh resolution was high. The best was to deal with it is too use lower polycount mesh with precomputed per-pixel normal map.
Procedural generator and texture loader will be combined into one thing that loads textures and then can use shaders to add fractal noises on heightmaps, precompute normals and increase quality of textures and land cover maps. It will increase performace of procedural terrain since it will be GPU-based generator and should eventually allow SpaceEngine quality of terrains. (which btw uses GPU-based terrain generator)
Water will be made same way nvidia ocean demo does it.512x512 fft generated heightmap and 512x512 per-pixel normal map updated every frame using CS.(but with lower resolution of mesh, tesselation and better performace)
Rocks on the ground will be instanciated low-resolution meshes. nothing interesting here. grass/shrubs/bushes can be made same way but with billboards.
Right now I will go back to coding it to a working code. First updated version with core features (tile rendering, terrain client + terrain manager and texture generator/loader) should be available at the beginning of september. Other features will be completed after that.