1

I have a 3D grid of binary data values (either the point is solid or it's not). I need to generate a physics mesh from that grid, but it needs to be able to move, so I can't use triangle mesh, I must use a compound shape made of boxes. I need to find the largest boxes (or rather the least number of boxes) that the grid can be split into. Here's a 2D representation of what I want to do in 3D:

rectangular convex decomposition

The first image shows each point as its own box - terribly inefficient (22 boxes). The second image shows what I would like the grid to become (4 boxes).

I realise there are convex decomposition libraries out there, but I need this to be exact, not approximate, and I thought there might be some easier method when the data is guaranteed to be in a grid. Also, I need boxes, not just convex shapes.

Any tips, pointers or help would be much appreciated :)

Clonkex
  • 3,373
  • 7
  • 38
  • 55
  • PhysX is awesome: https://developer.nvidia.com/physx - this may or may not do what you need – rhughes Jan 26 '14 at 01:25
  • @rhughes Thanks, but I don't think PhysX provides a convex decomposition library, and if it did, it probably wouldn't suit my needs. I'll have a look, though :) – Clonkex Jan 26 '14 at 01:38

0 Answers0