- my game world is setup with an octree, each node containing static geometry. in ode i could create a separate space for every octree node to speed up simulation. is there a simular way in bullet? so far i just add each mesh to the world itself.
- i use btTriangleMesh/btTriangleMeshShape to create meshes from static world geometry. is there a more efficient way?
- what are those btBvh* classes? couldn't find any information on that in the manual/api.
- what's the best way to perform collision tests for very fast moving bodies, like pistol bullets? should i cast a ray to check intersections with the world? or are there special classes/settings to handle this?
thanks! great library btw
some questions, btTriangleMeshShape/btBvhTriangleMeshShape
-
- Posts: 10
- Joined: Thu Nov 01, 2007 11:12 am
-
- Posts: 10
- Joined: Thu May 24, 2007 7:57 pm
Re: some questions
I was wondering about this too, when I switched to bullet. But the bullet broadphase (axis sweep) seems to be more efficient when adding this all into one world than the ODE seperate spaces model.vexator wrote:- my game world is setup with an octree, each node containing static geometry. in ode i could create a separate space for every octree node to speed up simulation. is there a simular way in bullet? so far i just add each mesh to the world itself.
the btBvhTriangleMeshShape classes is the optimized version of btTriangleMeshShape (look at the UserCollisionAlgorithm demo for its usage)vexator wrote: - i use btTriangleMesh/btTriangleMeshShape to create meshes from static world geometry. is there a more efficient way?
- what are those btBvh* classes? couldn't find any information on that in the manual/api.
The raycast is as i know the best solution.vexator wrote: - what's the best way to perform collision tests for very fast moving bodies, like pistol bullets? should i cast a ray to check intersections with the world? or are there special classes/settings to handle this?
Cheers,
noisy
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: some questions, btTriangleMeshShape/btBvhTriangleMeshShape
Please use btBvhTriangleMeshShape. You can probably add all triangles in a btBvhTriangleMeshShape. You should not use btTriangleMeshShape, it is totally un-optimized. It is more testing/comparison code, I should make that more clear. Same for btSimpleBroadphase and btSimpleDynamicsWorld, they are test/comparisons to validate the recommende btAxis3Sweep and btDiscreteDynamicsWorld.vexator wrote:- my game world is setup with an octree, each node containing static geometry. in ode i could create a separate space for every octree node to speed up simulation. is there a simular way in bullet? so far i just add each mesh to the world itself.
- i use btTriangleMesh/btTriangleMeshShape to create meshes from static world geometry. is there a more efficient way?
btBvhTriangleMeshShape is a triangle mesh with bounding volume hierarchy optimizations. This works even better then an octree. It is best to store more triangle in the btBvhTriangleMeshShape, rather then adding lots of very small btBvhTriangleMeshShapes into the broadphase.- what are those btBvh* classes? couldn't find any information on that in the manual/api.
You can use a raycast, see btCollisionWorld::rayTest. Another option is to use an object sweep, see btCollisionWorld::objectQuerySingle, but there are some loose ends that needs to be implemented.- what's the best way to perform collision tests for very fast moving bodies, like pistol bullets? should i cast a ray to check intersections with the world? or are there special classes/settings to handle this?
Hope this helps,
Erwin
-
- Posts: 10
- Joined: Thu Nov 01, 2007 11:12 am
Re: some questions, btTriangleMeshShape/btBvhTriangleMeshShape
ok thanks, i'll do that!
btw: it'd be nice if world and rigidbody had default constructors, so that one could easily derive from them. atm you have to provide a lot of information that just might not be available at the time of creation.
btw: it'd be nice if world and rigidbody had default constructors, so that one could easily derive from them. atm you have to provide a lot of information that just might not be available at the time of creation.
-
- Posts: 10
- Joined: Thu Nov 01, 2007 11:12 am
Re: some questions, btTriangleMeshShape/btBvhTriangleMeshShape
oh and another question: should i add my static geometry as separate btBvhTriangleMeshShape's or one single btBvhTriangleMeshShape containing all?