-
Notifications
You must be signed in to change notification settings - Fork 65
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
Voxel binary operations #4119
Comments
Hello @mariuszhermansdorfer , This merged PR just adds UI command that performs some binary operation on voxel objects. Indeed, it is mostly useful if the voxels are filled with signed distances (SDF). So it takes two voxel objects and produces the third voxel object as a result. Actually it was present in MeshInspector under "Voxel Operations" name on Test tab. We just made a few improvements in it and moved in MeshLib. The command mostly adds UI to the functions from OpenVDB library, which performs actual processing. At this moment the tool is not interactive, so it just produces the result for the current positions of input objects and closes. But technically it shall work rather fast for small voxel volumes and one can try to show its result immediately after moving one of input objects. Thanks for the idea and for the video. |
I’d love to see more SDF functionality in MeshLib. OpenVDB is a great foundation but a lot of value could be gained from making it more interactive. Especially the blending aspect, where multiple bodies blend with each other based on proximity and don’t necessarily have to touch each other. One of the dev branches of the OpenVDB repo introduced fVDB. It has plenty of ML-related functionality, but an interesting aspect for MeshLib could be CUDA-based mesh to grid conversions. From an end-user perspective, I’m very interested in the following workflow:
Now, imagine that this whole sequence can be done interactively with hundreds of binary operations. This opens up a very interesting CSG workflow which very few geometry kernels can provide. |
Yes, it is an interesting direction for further MeshLib development. Yet it requires significant efforts, so we need to prioritize it against other ideas first.
Yes, we currently support both OpenVDB and CUDA in MeshLib, but they are hardly compatible in between. OpenVDB presents memory-efficient tree-based storage for voxels close to input meshes, which is hard to process in CUDA. So all our CUDA algorithms work with not-OpenVDB voxel representations.
As with all voxel-based algorithms, all details smaller than one voxel will be inevitably lost. For most detailed mode not-voxel approaches will be still necessary. |
fVDB introduces a few methods to at least create the grids with CUDA. Have a look here: And a bunch of other operations on grids:
Fully understand, but one can always dream :) |
Here is an interesting paper about a general method of creating SDFs even from broken geometry: https://nzfeng.github.io/research/SignedHeatMethod/index.html |
Thanks for the paper. It is a great theoretical achievement indeed. We do have both Pseudonormal and Generalized Winding Number (GWN) computations of SDF in MeshLib, but new GSD seems to demand much more computational recourses, and it does not look GPU/CUDA friendly as well. The main benefit of new GSD is its ability to provide good quality level sets. But on practice it can be much faster to build level set 0 from GWN, which is already good mesh without self-intersections and holes, and starting from it compute signed distances with simple methods not requiring to fight with degeneracies. |
Hey @Fedr,
I just saw that this PR has been merged: d705e22
Does it allow for SDF-style modelling similar to this one? Specifically the smooth blending options between primitives.
https://www.youtube.com/watch?v=2EPTambcvyM
The text was updated successfully, but these errors were encountered: