I'm trying to implement a voxelization algorithm. I successfully implemented cube triangle intersection test and made a basic voxel model from discrete box meshes. However I can't find any information on how the merging is done between the separate box meshes to create a unified mesh. A naive approach I can think of is for each face of the cube check if it overlaps with any other face, delete both faces and stitch the edges around the faces between cubes. But this seems very crude.
Is there an algorithm for doing this?