1
votes

I have a pretty large terrain mesh (heightmap), and I'd like to be able to divide this into smaller chunks... After reading posts and articles, I've found this about terrain LOD:

No you don't. In your typical terrain renderer the data is subdivided into tiles. And usually those tiles subdivide again, and again to implement level of detail. What sets the tiles apart are the vertices they reference. So you'd have one large vertex array for the terrain data, and a lot of index arrays for the tiles. By calling glDrawElements with the right index arrays you can select which tiles to draw at which level of detail.

Answer by datenwolf, link to the post:

OpenGL: Are VAOs and VBOs practical for large polygon rendering tasks?

EDIT:

I read my heightmap from file, usually from a .BMP image, and I displace a regular grid with these height samples. I'm using VBOs, VAOs, DrawElements(), triangles (not strips) and shaders (still without tesselation shader, I implement it next week).

Is there a good algorithm uses this, or could somebody share an article about this method?

1
sry i accidently hit an enter while writing:/ - David Szalai
How do you generate your heightmap? Randomly? - DashControl
not my day... I've edited:D - David Szalai
Seems like you're trying to subdivide the triangles that make up your terrain into smaller triangles(i.e. barycentric subdivision), to add more detail to your terrain. I've only ever done it for rectangles though(using diamond-square algorithm). Am I on track here? - DashControl
actually I want to do some kind of frustum culling on my terrain, I will use tesselation shaders too on my landscape for more detail, but i still need something to restrict rendering the terrain outside of the frustum. The quadtree rendering seems good for this. - David Szalai

1 Answers

1
votes

I searched Google for quadtree terrain rendering (I think you where missing the keyword quadtree) and this came up:

http://vterrain.org/LOD/Papers/

A lot of publications, the second one already looks very interesting.