Playing around with creating minecraftish/lego world landscapes in Unity 3D (procedurally generated voxel landscapes with cubes), I'm finding that the meshes created for these landscapes take up a LOT of memory. The mesh currently only consists of vertices for visible sides of a cube. Memory usage for a complex terrain may take 6 or 7 hundred megs.
These meshes could be optimized, but I'm struggling to find a decent algorithm to do this.
The algorithm has to take into account that you don't want to "merge" blocks that are of different terrain types. I guess a really simple start might be to just process all blocks along one axis, and do extra sweeps for the other two axis.
Any thoughts/suggestions/tips on this? Thanks in advance.
Here's a link to an image I currently have. Lots of blocks.\ http://img716.imageshack.us/img716/408/bigcliffs2.jpg
I forgot to mention an important bit of information. I need to keep the mesh shape, that is no merging of vertices to the point that empty or solid space is changed. The reason is, there may be creatures/etc that still need to navigate around the mesh. So I can't just create a really low detail, distorted mesh.