1
\$\begingroup\$

Some creativity/sandbox games have a terrain editing feature. When thinking of a terrain, I'm thinking of a grid of vertices. The elevation of each vertex is then determined by a heightmap (image). And the user can edit this elevations, so you get mountains and valleys.

Most times terrain editing is 'just' changing the height component of the positions of vertices in an existing grid of a fixed amount of vertices.

Now I see some games that make it possible to do the following: enter image description here

This seems way more complex than just a grid and a heightmap.

I have thought a lot about this, but what is the best/most common approach to implement this?

  1. I think it's difficult to find a good data structure for the vertices.

  2. I'm pretty sure, during editing, vertices are also created and added into the terrain, which also seems complex.

  3. All attempts to create indices seems a hell of a job to me. (Think of rendering this in triangle strips)

\$\endgroup\$
  • 1
    \$\begingroup\$ This type of terrain usually uses a "Marching Cube" algorithm. Just looking up that term should give you plenty of documentation on the subject. \$\endgroup\$ – Dennis Jun 15 '18 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.