Voxel Grid Occlusion Culling Help

I want to impliment Occlusion Culling in my game, its currently a voxel grid of 100 X 100 X 100. It runs quite slow because everything is rendered at the same time, what is the best way to impliment occlusion culling? or is there a better method to solve my problem? I can provide code if needed.

You mean cubes like minecraft?

Block worlds are not made up of blocks. They are made of visible faces. 100x100x100 is not even that big.

Algorithm goes something like this:

for every cell in the grid {
   if cell is not empty {
      for every neighbor {
         if( neighbor is empty ) {
            emit a face
         }
      }
   } 
}

Collect all of the faces into one mesh.

You can go very far without worrying about occlusion culling. For example, Mythruna does not use any occlusion culling and I render plenty of ‘blocks’.

https://www.youtube.com/@PaulSpeed42/videos

4 Likes