WARNING: LONG POST with pictures.
On the new game, I want to do a third person, open world action RPG, with a over the shoulder camera. Think Soulborne games or third person Elder Scrolls games.
Anyways, this new viewing perspective and player freedom means that the environment is far more visible and important. As such, I like to have more diverse and interesting terrain. At the same time, I need some method to
quickly create those said terrain; AND give them the right collision behavior; AND make them navigable by the AI.
The first thing that comes to mind is voxel terrain, or Minecraft. If everything is in a grid, then it simplifies a lot of the math underneath. So let's start with that. With some amount of effort, this is the result:
(PLACEHOLDER ART)
Not too bad huh? This picture doesn't shown it but the engine already replicated most of the Minecraft features, such as "infinite" terrain extending towards all directions, creating/removing blocks, and even Minecraft's unique "lighting" system.
But of course, there is a pretty big problem: Cubes. Lots of cubes. Lots of not exactly pleasant to look at cubes. So the next step is attempting to smooth out the cubes:
After considerable amount of effort, this is the result. Looks fairly solid at first glance. But there is a severe artifact on diagonal "cliffs":
Unfortunately, after even a greater amount of effort trying to fix it, I concluded that this is a limitation due to the constraints of the grid system. I am not sure how to solve it, or that it is even possible to fix.
One thing I could do is to use a regular height map for the terrain instead:
Much smoother.
Unfortunately, height maps are only 2D, and they don't allow things like caves, or tunnels, or buildings... So this is where I am stuck now.
Something I considered is use the heightmap for the base terrain and the voxel grid system for things that are build on top of the terrain. It will take some effort to integrate the two separate system together tho. Or perhaps just use the smooth voxel system, accept it's limitations and call it a day? Or something else? Not sure yet. Currently weighting the options...