iakov.dev

Geometry optimisation for voxel meshes

· 1 min read

Geometry optimisation for voxel meshes

I’ve optimised the mesh generation. Until now the voxel mesh was generated as is, and the only thing I removed was the internal faces. That produces a huge amount of vertex data, which is slow to load into the GPU, slow to process on the CPU, and so on.

The new algorithm reduces vertex data by a factor of three to four, though it makes mesh generation slightly slower. There is one more possible downside. The result is no longer a regular mesh, so ambient occlusion based on vertices will be hard to apply. I hope my version of SSAO will handle it.

This is the new version of the mesh generation:

Voxel terrain built with the new optimised mesh generation