Performance tips? (OpenCL/multi-threading/etc)
Posted: Sat Jun 10, 2017 9:54 pm
I'm migrating my physics code for an application I'm working on from PhysX to Bullet, to do some performance testing. My application uses rigidbodies, constraints and cloth.
Initially I was under the impression that Bullet supports OpenCL computations, which greatly improve simulation performance...but digging a little more on the forum I found some posts that implied OpenCL in bullet hasn't been developed in years and is very much experimental. Has anyone implemented it recently? Is it stable? Does it work with cloth and constraints or only rigidbodies?
Also, I enabled bullet multithreading in my app and get moderate performance gains (about 10-15% better performance when using 12 threads instead of 1, on my 16 core machine)....but the simulations are still pretty slow.
As a comparison, when simulating 10k spheres dropping onto a ground plane, my PhysX sim runs more than twice as fast as Bullet.
Are there any other obvious ways to speed up rigidbody simulations? Any hidden precompiler flags I can enable, etc? I'm pretty new to bullet and so I don't have a good grasp of all possible tips and tricks yet, and would appreciate any advice!
Initially I was under the impression that Bullet supports OpenCL computations, which greatly improve simulation performance...but digging a little more on the forum I found some posts that implied OpenCL in bullet hasn't been developed in years and is very much experimental. Has anyone implemented it recently? Is it stable? Does it work with cloth and constraints or only rigidbodies?
Also, I enabled bullet multithreading in my app and get moderate performance gains (about 10-15% better performance when using 12 threads instead of 1, on my 16 core machine)....but the simulations are still pretty slow.
As a comparison, when simulating 10k spheres dropping onto a ground plane, my PhysX sim runs more than twice as fast as Bullet.
Are there any other obvious ways to speed up rigidbody simulations? Any hidden precompiler flags I can enable, etc? I'm pretty new to bullet and so I don't have a good grasp of all possible tips and tricks yet, and would appreciate any advice!