Open william-silversmith opened 3 years ago
I suspect this could be done with a kind of multi-source dijkstra-like algorithm that colors in the "territory" of a point. When the search encounters another color, you test to see which is the minimum.
This would be roughly:
1 uint64 volume: 1,073 MB
1 uint32 "color" volume: 536 MB
1 uint32 graph: 536 MB
1 float32 output: 536 MB
Total: 2.645 GB
A similar kind of algorithm in dijkstra3d runs at about 4 MVx/sec (42 sec for a 512 cube) while the current 8x algorithm took > 100 sec on a faster machine. I suspect that this would be a bit faster.
Currently, we increase the volume 8x in order to accommodate the voxel graph. For a 512x512x512 uint64 volume, this increases the memory usage.