It all started from that page. https://www.gamasutra.com/view/feature/131841/continuous_lod_terrain_meshing_.php?print=1

I didn't quite got what it was all about, so I've looked at this. https://www.researchgate.net/publication/3410916_Terrain_decimation_through_Quadtree_Morphing

Then I've got some understanding. It was about decimating the more distant patches of the terrain. And then I've just wondered about one thing. At every frame, the mesh is re-generated and re-uploaded. Wouldn't it be kinda of slow?

Ran the demo provided in the first link and got just 3 fps. What's the big idea of this "optimization"?

My current code has 1048576 vertices for 1024x1024 heightmap, undecimated, and it runs way faster. His code makes my laptop hot.

Another link. Quadtree vs multiple resolution grids for terrain rendering

That is more useful. It turns out that there might be some mipmapped meshes on the GPU, and the quadtree decides which of them are turned on.

The first question. Is my last guess correct? Second - am I right the first link isn't useful anymore? Third - how this applies to modern Android development (I mean at least GLESv2).

  • \$\begingroup\$ It sounds like you already have an even better answer than we could give you: you profiled the code to see how it actually runs. Now you yourself have everything you need to choose the technique that gives you the performance you need. What more are you wondering? We're not going to tell you to use something slower than your current method if it works fine for you. ;) \$\endgroup\$
    – DMGregory
    Sep 27 '18 at 11:23
  • \$\begingroup\$ I've thought some more on it and found a better way. Imagine that I have a fixed mesh that always follows LookAt function center except for z coord. It is log space in +x and -x, exp space in +y and -y(forward to camera) and 0 z. It is flat nonlinear terrain. Then I displace it in vertex shader with a texture. The texture is mapped to world space, the mesh in view space. So when the camera moves the vertices would have different values while the mesh would not move. \$\endgroup\$
    – user120910
    Sep 28 '18 at 2:44
  • \$\begingroup\$ And because it's a terrain, the world space is also the tangent space. So the normals for such a dynamic terrain might be calculated with just 3x3 Sobel kernel over the heightmap. \$\endgroup\$
    – user120910
    Sep 28 '18 at 6:34

You must log in to answer this question.