Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel convexSweepTests #2004

akortunov opened this issue Nov 26, 2018 · 3 comments


Copy link

commented Nov 26, 2018

Currently in OpenMW we use the Bullet for collision detection.
Basically, we have a btCollisionWorld with a lot of static compound shapes (based on triangles) and with a couple of dozens of dynamic moving actors (which use capsules or box shapes).
To detect collisions, we iterate over actors and use the convexSweepTest for every actor in the single thread.
With many actors in area or with not fast CPU performance can be pretty low.

Is there a correct way to batch convexSweepTests?
I found this thread on Reddit, where user built Bullet with the -DBULLET2_USE_THREAD_LOCKS=ON and just executed convexSweepTests in different threads, but I do not know if it is a proper solution.


This comment has been minimized.

Copy link

commented Nov 26, 2018


This comment has been minimized.

Copy link

commented Nov 26, 2018

@BluePrintRandom You mind explaining things a bit more, many of the terms you are using are flying over my head and like that of others?

Also, the question that was asked hasn't yet be answered. :)


This comment has been minimized.

Copy link

commented Dec 30, 2018

In the bullet examples, the BenchmarkDemo has an example of doing raycasts in parallel (look for "USE_PARALLEL_RAYCASTS"). The same method should work for doing parallel convex sweeps as well.

This example uses the thread management system included with Bullet, however it isn't required -- the convex sweep should be threadsafe (so long as bullet was compiled with the "BT_THREADSAFE=1" option) -- so any method for managing the threads should work just as well.

Note that "BULLET2_USE_THREAD_LOCKS" is only used in Cmake (not in the code). It is a Cmake configuration option that simply sets the definition of "BT_THREADSAFE". Bullet code only checks for "BT_THREADSAFE".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.