I want to make game terrain using something like a heightmap, but I want vertical cliffs and none of the usual artifacts that go along with the limited resolution of a heightmap. So why not use marching squares to turn the heightmap into a contour map? Next we can triangulate the contour map to generate a 3D mesh with smooth lines at any angle and no difficulty with vertical cliffs.
Here is a youtube video summarizing an algorithm for triangulating contour maps: Contour Map Triangulation, Visualization & Pathfinding
Unfortunately it looks quite complicated and computationally intensive. Is there any hope of being able to recalculate that mesh frame-by-frame as the user draws the heightmap? Does anyone know of a way to simplify this problem?
↧