I have terrain 257x8193 and one sphere. And it cause very low performance level on android device.
With 50-100 balls i get low perfomance on pc also. But if replace terrain with just a plane - everything is nice.
What can i do? It's unexpectedly that terrain in bullet is so slow.
[solved] Why btHeightfieldTerrainShape is so slow?
-
- Posts: 2
- Joined: Mon Oct 05, 2015 11:15 am
[solved] Why btHeightfieldTerrainShape is so slow?
Last edited by andrey5000 on Wed Oct 07, 2015 10:03 pm, edited 1 time in total.
-
- Posts: 9
- Joined: Tue Sep 08, 2015 6:40 pm
Re: Why btHeightfieldTerrainShape is so slow?
I'm assuming you are trying to use btHeightfieldTerrainShape as a shape for the "scenario".
Are you sure you created the btRigidBody as a static object (mass=0)? If you are, could you try to change btHeightfieldTerrainShape to btBvhTriangleMeshShape?
Are you sure you created the btRigidBody as a static object (mass=0)? If you are, could you try to change btHeightfieldTerrainShape to btBvhTriangleMeshShape?
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: Why btHeightfieldTerrainShape is so slow?
Also how big is the ball in relation to the terrain, and how quickly does it move? TerrainMeshShape basically works by testing each triangle within the projected rectangle of the balls movement on the terrain.
This post might be of help : http://www.bulletphysics.org/Bullet/php ... f=9&t=8755
This post might be of help : http://www.bulletphysics.org/Bullet/php ... f=9&t=8755
-
- Posts: 2
- Joined: Mon Oct 05, 2015 11:15 am
Re: Why btHeightfieldTerrainShape is so slow?
Bhv mesh solve my problem. Thank you!LHLaurini wrote:I'm assuming you are trying to use btHeightfieldTerrainShape as a shape for the "scenario".
Are you sure you created the btRigidBody as a static object (mass=0)? If you are, could you try to change btHeightfieldTerrainShape to btBvhTriangleMeshShape?
-
- Posts: 9
- Joined: Tue Sep 08, 2015 6:40 pm
Re: Why btHeightfieldTerrainShape is so slow?
You're welcome. I'm glad to hear you've got it to work.andrey5000 wrote:Bhv mesh solve my problem. Thank you!LHLaurini wrote:I'm assuming you are trying to use btHeightfieldTerrainShape as a shape for the "scenario".
Are you sure you created the btRigidBody as a static object (mass=0)? If you are, could you try to change btHeightfieldTerrainShape to btBvhTriangleMeshShape?