Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivating voxels? #110

Open
jasper-lu opened this issue Dec 29, 2020 · 2 comments
Open

Deactivating voxels? #110

jasper-lu opened this issue Dec 29, 2020 · 2 comments

Comments

@jasper-lu
Copy link

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.

@NBickford-NV
Copy link
Collaborator

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!

@hendursaga
Copy link

documentation on gvdb has been pretty sparse

No pun intended?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants