Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Mar 18, 2007 1:26 pm 
Offline

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
 Profile  
 
PostPosted: Sun Mar 18, 2007 8:17 pm 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3746
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:
btAlignedObjectArray<btBroadphasePair>  m_overlappingPairArray;

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
 Profile  
 
 Post subject:
PostPosted: Sun Mar 18, 2007 8:48 pm 
Offline

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
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group