How to implement digging in a 3D world (NOT VOXEL TERRAIN!)

  3d, c++, gl-triangle-strip, terrain

I have been thinking for a long time about how to implement a 3D world in which it would be possible to dig holes, but I still have not had any ideas. I will describe to you a little how it should look. Imagine that you are a character in the game, and you are digging a hole under you. The top of the world is below you that you are digging. Until some point, she dowing lower and lower, as soon as the past height of the vertex is further by a certain number compared to its old position, new vertices will be added at this point. All other actions when digging the ground should work in the same way as digging the ground to the side, up.

One friend suggested that I might have to use linked lists along with arrays, and from a mathematical point of view, most likely I need to count the volumetric cut in the shape. I have no idea how to do this because my knowledge of mathematics is very low.

The game "7 days to die" implements these features. I can dig tunnels in rocks and hills of various shapes. Below I left screenshots for clarity. I hope for your answer!
Thank you in advance!

Added vertices when digging down:

enter image description here

The vertex that we are digging goes down:

enter image description here

What should happen if we dig up all the surrounding vertexes:

enter image description here

Source: Windows Questions C++

LEAVE A COMMENT