Search found 5 matches

by anton.nagornyi
Thu Sep 22, 2016 8:55 pm
Forum: General Bullet Physics Support and Feedback
Topic: Voxels collision
Replies: 10
Views: 16561

Re: Voxels collision

We did an Openvdb integration to bullet for a project. It uses an abstraction layer, so it probably wouldn't directly help you, but what we ended up doing to collide was generate triangles for outer edges of the voxel data, and made it work as a custom concave shape. You can find the code for it he...
by anton.nagornyi
Thu Sep 22, 2016 8:45 pm
Forum: General Bullet Physics Support and Feedback
Topic: Voxels collision
Replies: 10
Views: 16561

Re: Voxels collision

I would not use compounds of boxes. You will get a lot of ghost collisions with internal edges which will be difficult to handle. It might be also very inefficient. The slow cooking times are indeed a problem. When I experimented with this I wrote a fast mesh compiler to handle this. The voxel mesh...
by anton.nagornyi
Thu Sep 22, 2016 5:45 am
Forum: General Bullet Physics Support and Feedback
Topic: Voxels collision
Replies: 10
Views: 16561

Re: Voxels collision

Voxels are made of boxes, therefore it would be very easy to make a btCompoundShape with boxes as the subshapes. You could coalesce adjacent boxes to build an optimized set. You could even share any btBoxShape 's that happen to appear more than once in the optimized set. This would be much easier t...
by anton.nagornyi
Thu Sep 22, 2016 5:28 am
Forum: General Bullet Physics Support and Feedback
Topic: Voxels collision
Replies: 10
Views: 16561

Re: Voxels collision

I think mesh colliders are the right way to do this. How many voxels did you batch into one mesh? A good size might be something around 12x12 voxels. Is PhysX cooking really so slow that it cannot do this on the fly? This can be done also in parallel. I have very detailed environment. My chunk is 6...
by anton.nagornyi
Wed Sep 21, 2016 7:02 am
Forum: General Bullet Physics Support and Feedback
Topic: Voxels collision
Replies: 10
Views: 16561

Voxels collision

I have implemented procedural mesh generation based on the marching cubes algorythm. This is done in Unity. To make it work with PhysX I have also created mesh colliders for that generated mesh. The problem I have is that cooking mesh colliders in PhysX takes a lot of time. I don't khow how faster i...