algorithm - How to efficiently cluster voxel space into the fewest number of similar, contiguous blocks possible? -
first, apologize if question unclear. googling , book reading have been doing on past couple weeks on topic has not revealed terminology problem trying solve. describe problem best can; if knows proper jargon me more concisely express problem, please let me know.
i doing research how feasible use voxels represent largish (256x256x256 voxels) battlegrounds destructible terrain server-hosted multiplayer games. 1 battleground exist game @ time. however, able broadcast rooms , changes terrain, trying find algorithm can group voxels fewest rectangular blocks possible. simplistic example, if bottom half of level filled voxels of 1 type , top half voxels of type, level should divided 2 blocks, 1 representing bottom half of level, , other representing top. ideally, algorithm should able run in real time deformation in terrain accounted on per-frame basis , broadcast clients. should enable clients render terrain efficiently without worrying duplicating terrain destruction logic in clients.
i have not found articles anywhere on how this. have tried looking articles on voxel engines; don't think chunking enough needs. have looked @ books , articles on data mining, without knowing correct terminology problem, haven't been able search effectively. i've looked @ computational geometry in c: second edition joseph o'rourke, not seem have help.
here approaches have tried , problems find them. block counts reported filling 256^3 space randomly dropping more 4,194,304 "earth" voxels far close bottom can go randomly selected (x,z) coordinate. "earth" blocks counted.
- octrees: fast, if split @ middle of space, produces ridiculously large number of blocks (800,000+)
- k-d trees splitting minimize weighted entropy after split: slower octrees, fewer blocks (~350,000)
- k-d trees splitting maximize information gain ratio: twice fast previous k-d trees method, generating far fewer blocks (~167,000), still slow
- k-d trees splitting minimize gower similarity: slow, generates fewer blocks other k-d tree method (~155,000)
- greedily grabbing largest subset of non-intersecting, largest volume blocks available when considering each unclaimed "earth" block block's defining point: threaded, algorithm obscenely slow (~16 minutes 8 threads on 8-core system), generates fewest blocks of (<65,536)
- greedily grabbing largest subset of non-intersecting blocks while treating block's dimensions objective scores maximize: slower other greedy approach , generates few thousand more blocks, too
considering maximum acceptable number of blocks 1 block per (x,y) coordinate represent single column, greedy volume having results considered close optimal.
i not know how compute minimum block count without using brute force approach never ends, not know whether possible better greedy volume approach. furthermore, not know how can make faster.
can give me algorithm try or @ least point me in right direction? i'd stop exploring direction , think of way approach problem if cannot done better.
Comments
Post a Comment