Physics btTriangleIndexVertexArray vs btOptimizedBvh

@normen



Hey, I just noticed, that all Mesh collision shapes going into a btTriangleIndexVertexArray, is there any reason for this ?

Since i currently try to use it for larger terrains, where a HeightfieldCollisionShape is not working properly anymore (due to it’s internal working of constructiong a pseudo mesh for probably colisions if I understood the internal working), it would probably give kind of a performance boost to use btOptimizedBvh.

Would it?

I will test and report back.

1 Like

ok, forget this post, i figured that you are already doing that in the other class ^^ :slight_smile:

Yeah, bullet uses them automatically as well I think when its about really using the mesh in the space. Creating them from scratch or implementing them as a “jmeOptimizedBvh” would be a bit of a pain, I thought you meant that ^^

HM yeah thats second in row, since the convertation currently needs quite some time. I think about providing a direct vertexStridinginterface , since currently all data is copied there and then another time into the bvh stuff.



Also exposing the partial rebuild of that class would be intresting. When i get time to do so :slight_smile:

Thing is you have to generate or store the data a second time anyway for many meshes as they have to be regenerated as triangle meshes. Then ofc its generally a good idea to double the data if you intend to multithread, just like any modern animation or gl painting API does it.