I’m looking for a solution for terrain deformation. Obviously one popular method people enjoy is using voxels, but I really don’t think I need that. What I was thinking would be more of a 2D implementation … like a blanket, capturing just using information about the surface rather than details on every single piece of information about whats underneath.
What I was thinking was 200x200 tiles (even just 2D sprites) to encompass the map. In-game, users can raise and lower these tiles. When a tile is raised and lowered, the sides/corners of all adjacent tiles would need to be raised and lowered to compensate, allowing for a smooth transition. From the top using an orthographic camera, it should look like equally sized tiles, regardless of the elevation changes.
In order to make this happen, I need to be able to manipulate the corners of these tiles in real time. Essentially, each tile is four points which will “draw” a piece of floor between the four points. This is where I have an issue. Is there any way to draw geometry in real time by using coordinates? If not, I can spawn an actor and use these points to calculate the appropriate location and rotation (which will cause me a few headaches, I’m sure).
Does anyone else have any thoughts on this, on if this could be done or a better way to attempt it? It might end up being more work than simply trying to use voxels but I’m looking for other options before I delve too far into it.
Edit: What I’m trying right now is using procedural mesh’s for my “tiles”. I can modify the vertices in real time to allow for terrain deformation. So far, it seems … OK. My game takes a little bit of a performance hit drawing a bunch of these at once, but I might be able to optimize it. Not sure.