# Gaps in LoD terrain

This topic is 4674 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Alright, I've been working on a terrain renderer based very closely on this paper on continuous LoD: http://www.vis.uni-stuttgart.de/~roettger/data/Papers/TERRAIN.PDF I've implemented all the stuff about quadtrees, rendered the heightmap and have it applying lod based on camera distance & surface roughness (rendered using triangle fans). Now, as it says there should be, there is a problem because of the different level of LoD on neighboring nodes causes visible gaps to appear. It proposes some solution for this, but after re-reading it I simply do not understand it, seems like he's throwing a bunch of stuff out of nowhere. The quadtree is stored in a 2D array (something like quadtree[x][y]) and is calculated every frame recursively. if anybody has messed with something similar, I'd really appreciate it if they could offer some sort of explanation for his equations or something, and maybe some tips on how to apply that to the quadtree. I understand *what* the problem is, but how to fix the problem (partly due to how it's stored) I do not get. Thanks for any help!

##### Share on other sites
Here is my quick analysis: Every vertex is part of 3 or 4 adjacent rendered nodes either as a vertex or an edge midpoint. The LOD constraints ensure that the height of the point is within 1 LOD for all the adjacent nodes. By forcing the blending factor for the vertex in every adjacent node to be the minimum of all the adjacent nodes, you will close the cracks. I haven't implemented it so that's the best I can do.

Now, my question is why are you using this algorithm? It is obsolete. For a terrain of a reasonable size and resolution, you will be drawing hundreds (or thousands) of triangle fans.

Since you already have the quadtree implemented, I suggest you look at the "Chunked LOD" algorithm.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 28
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634113
• Total Posts
3015570
×