# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Simulation determinism, Parallel processing.Posted: Sun Mar 18, 2007 1:26 pm

Joined: Sat Sep 24, 2005 10:01 pm
Posts: 16
Hello,

I am experimenting now with Bullet and have some question about it.

For my purpose the real-time is not as important as visual quality.
How to improve quality of the bullet's simulation?

I am also not quite sure how to increase Sub Steps with stepSimulation...
Code:
stepSimulation(stepTime, 1, 1.0f/60.0f)

Another question is how to arrive deterministic simulation with Bullet?
So the two runs of the same simulation on the same system will get the same results.

Probably the first problem is the btRand2() from equentialImpulseConstraintSolver and static seed...

And the last question, how to use Bullet on Multi Core CPU's?
As I know there was some work for Parallel processing for Bullet, is this correct?

I am also working on Window 32-bit, 64-bit and Intel,PPC MacOSX, fortunately Bullet is pretty portable.

Thank you in advance for any help and also for this Library!

Top

 Post subject: Re: Simulation determinism, Parallel processing.Posted: Sun Mar 18, 2007 8:17 pm

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3744
Location: California, USA
Remotion wrote:
Hello,

I am experimenting now with Bullet and have some question about it.

For my purpose the real-time is not as important as visual quality.
How to improve quality of the bullet's simulation?

I am also not quite sure how to increase Sub Steps with stepSimulation...

You can decrease the inner timestep to improve accuracy in collision handling. If you pass the real timestep, then make sure maxNumSubSteps is large enough so that stepTime < maxNumSubSteps * internalTimeStep. Otherwise the simulation will drop frames. So you can increase maxNumSubSteps to a very large value. Alternatively just pass '0' to maxNumSubSteps and pass a very small stepTime.

Following 2 examples show a higher accuracy:

Code:
btScalar internalTimeStep = 1.0f/240.0f;
stepSimulation(internalTimeStep, 0);

or alternatively:
Code:
int maxNumSubSteps = 1000;
btScalar internalTimeStep = 1.0f/240.0f;
stepSimulation(stepTime, maxNumSubSteps, internalTimeStep)

Quote:
Another question is how to arrive deterministic simulation with Bullet?
So the two runs of the same simulation on the same system will get the same results.

Probably the first problem is the btRand2() from equentialImpulseConstraintSolver and static seed...

Yes, first step would be to re-initialize this seed when the simulation starts. I will add this to the todo.

Quote:
And the last question, how to use Bullet on Multi Core CPU's?
As I know there was some work for Parallel processing for Bullet, is this correct?

Yes, there is an PS3 SPU optimized version that runs collision detection (and solver tasks) in parallel. Some of the changes roll back into the open source verison of Bullet which facilitates SIMD and multi-core optimizations. Some parts in this process are already visible: for example in Bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h, check the new overlapping pair array:
Code:

This btAlignedObjectArray replaces the stl::set, and can be easier processed in parallel by multi-core cpu's. You can expect to see some progress towards multi-core optimizations for Bullet.

Thanks,
Erwin

Top

 Post subject: Posted: Sun Mar 18, 2007 8:48 pm

Joined: Sat Sep 24, 2005 10:01 pm
Posts: 16
Thanks Erwin!

So now I have disabled SOLVER_RANDMIZE_ORDER so the btRand2 should newer used but unfortunately the result are all ways different.
What else can be disabled, reseted?

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities