Voxel Plugin For UE4

Mmmm, I can see the intersection problem, intersection didn’t come to mind as normally things like that wouldn’t pass through each other I had assumed they wouldn’t intersect with your application. Voxels really could be used for combining volumes together well, also if you are only storing on/off for them as well then you can store voxels in a bit per voxel assuming you handle the byte boundries manually (array of bytes, 1 bit per voxel, overflow bits in last byte of array to make byte even) or a byte per voxel when doing it naively or when requiring additional information like specific material. With compression it would be even smaller as RLE is easy to implement and is incredibly efficient with 0/1 data.

Something like what you describe would really only need a compressed flat array of data per volume and combining volumes together would be copying to a new array with a bounds equal to the extents of the two combined (minus the intersection) and then setting empty / full as required per both volumes. The only difficult operation is the mesh to voxel volume creation and that has quite a few third party tools that do it well already.

That being said the storage and combining of volumes for a 0/1 data volume is really easy to implement and I think my plugin would be just a huge mass of overhead / excess features that you wouldn’t need for something like that.