NVIDIA / gvdb-voxels

Sparse volume compute and rendering on NVIDIA GPUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deactivating voxels?

jasper-lu opened this issue · comments

This may be the wrong place to ask this but documentation on gvdb has been pretty sparse as far as I could find it. I see that there is an option for activating space in gvdb. What is the proper way to perform the inverse operation? i.e. remove old voxels that are no longer needed.

Hi Jasper!

This is a good question (and a perfectly OK place to ask). Surprisingly, I think there might not be a way to do this at the moment. I think it's possible to emulate this by removing nodes from the tree (to do this with a node, go to its parent, then remove the corresponding child node ID from the child list, e.g. by setting it to an invalid value). However, this doesn't recover the underlying memory (so, for instance, if one allocated a large tree, then removed all its nodes using the above technique, it would still occupy its maximum size). It might be good to include some sort of scheme for recovering this space - probably with some sort of API to compact the tree, defragmenting memory?

I'll keep this issue open as a feature request. If possible, could you let me know about how you might use an operation to remove voxels, so that I can design an API around those use cases?

Thanks!

documentation on gvdb has been pretty sparse

No pun intended?