This project was about doing some terrain generation via a quadtree and heightmaps.
The quadtree was used to control the level of detail in the terrain. For this I used a simple algorithm that took into account the distance from cameras position to the point of the terrain in the original plane. Each leaf node in the quadtree represents the position and scale of the same plane mesh of 32*32 vertices.
The problem on combining heightmaps with such level of detail techniques is that, in the edges where the precision changes, gaps appear. To solve this, I used the approach explained by Filip Strugar in his paper from July 2010. Explained simply, what it does is offset the position of half the vertices slowly until we reach the same edge layout as the smaller precision. This is done in the GPU, and we need to pass the information of the neighbors precision of the current node.
After this I played around a bit with creating noise rather than loading heightmaps directly.
And together with adding this noises for the terrain, I used various textures that blended together depending on the height of the terrain, for having a bit more of a terrain looking terrain. Also, added bluish plane at height 0 that changes alpha depending on the angle to act as water over low areas.