Neirdan wrote:
-Export the generated mesh (vertices + indices) and feed it to a meshbuffer so bullet generates a shape
This is what we are doing in Cubiquity and it works pretty well. That said, there are two more options which it would be interesting to investigate:
- Create a 'surface extractor' which generates a list of cubes instead of a index/vertex buffer. These cubes should be combined into larger cuboids where possible. Similar to you first suggestion, except it would be done inside PolyVox rather than combining in Bullet.
This code was posted to the forums and could be a starting point.
- Extend Bullet with a volume primitive in addition to its existing heightmap primitive. No idea how to do this, but in principle it could bypass the mesh completly and just do the collision checks against the volume data.