How to perfrom collision check Whether there is collsion between a given volume box and FloatGrid ? #1120
Replies: 4 comments
-
It very much depends on the exact behaviour you're after. Is the There are a number of tools at your disposal to try. I'd recommend starting by taking a look at:
|
Beta Was this translation helpful? Give feedback.
-
Yes the float grid is a level set. I have a float grid representing of an outdoor envoirmemnt. The voxels sizes are about 0.1 meter. Then I have box with 6D pose, center postion and orientation. The box pose is randomly generated by some other parts of code, once a pose is generated then I want to look up whether the generated pose of box is in collision with envoirment voxels. all of this voxels have a value that is assigned, if there is a collision between box and envoirment voxels, |
Beta Was this translation helpful? Give feedback.
-
Right, so you also want to return the values of any voxels which overlap with a given domain. If it were a case of getting a yes/no answer to an intersection, then the tools in A quick way to start might be to loop over all values in your (I have not tested the below, this is just a starting point)
To reiterate, there are plenty of optimisations that can be made here. You can leverage VDB's node hierarchy to quickly discard portions of the tree and more efficiently thread over individual branches. But hopefully this gives you some idea as to whether VDB is suitable for your use case. |
Beta Was this translation helpful? Give feedback.
-
THank you for your help. It is very useful. I Believe openvdb suits my needs here, thing is that I didnt want to reinvent the wheel and wanted to know whether there are existing tools out there to achieve collisions detection(finding intersections more precisely). Since the number of voxels I have are +1M, efficiency is extremely crucial. I was not aware of For the clarity, I am only interested in active interiors of grid and if more than one volume intersects with domain, then simply take the interpolation of intersecting voxels. |
Beta Was this translation helpful? Give feedback.
-
Hi I am wondering whats the most efficient way to perform collision checks within openvdb ?
I look through whole documentation and API but didnt see anything related to it.
Beta Was this translation helpful? Give feedback.
All reactions