Some objects stop before ground

lcrivell
Posts: 11
Joined: Sun Jan 10, 2016 5:08 pm

Some objects stop before ground

Post by lcrivell »

I have plenty of similar objects piled up (convex hulls), and the bullet simulation make them fall.
For some reasons, some of these objects never reach the ground. If you look at below picture, the above object stops where it is now.
Screen Shot 2016-01-11 at 11.18.41 PM.png
Are there some settings I can adjust to have more precise simulation ?
Thanks.
You do not have the required permissions to view the files attached to this post.
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Some objects stop before ground

Post by drleviathan »

More info is required before we could speculate on what the problem is.

What are the dimensions of these objects? If your objects are very small I wonder if what you're seeing is the "collision margin" effect. For more info about margins watch this video:

Bullet Physics Collision Margins and Shapes: https://www.youtube.com/watch?v=BGAwRKPlpCw

What is the acceleration of gravity in your simulation? The default configuration is for objects that have low velocities for more than two seconds to be deactivated by the dynamics simulation -- if your simulation is too slow then it may be that your objects are suffering from premature deactivation. The thresholds and duration of the deactivation logic can be modified.
lcrivell
Posts: 11
Joined: Sun Jan 10, 2016 5:08 pm

Re: Some objects stop before ground

Post by lcrivell »

Thanks. I use bullet as c-api development.
Is 1 unit a too small size for an object ?

I did another test with an object wide of 50 units, but result is the same. My little scene is a wall of planks that I make simply falling. Gravity is standard 9.8, other setting are by default.
My step simulation parameters are:

Code: Select all

dynamicsWorld->stepSimulation(1.0f/30.f,10);
Not only some planks stay above ground, but some others are crossing each-others.
Issues does not seem to be the collision margin.
Thanks for your help.
You do not have the required permissions to view the files attached to this post.
gdlk
Posts: 62
Joined: Fri Oct 24, 2014 7:01 pm

Re: Some objects stop before ground

Post by gdlk »

First try with a smaller example (instead of the big wall, first try with 2 blocks (one falling above the another), then try with a pile ). There is too much things could be, for example scale problem, mesh creation, graphic/physic mesh sync, etc, so better try with a smaller case to get more info.

About the wall to be stable, just if you need, check by shock propagation algorithm

About the size, 1 unit is ok I think (my smallest object size is like 0.3, and my margins are 0.04)

Regards!
Xammond
Posts: 15
Joined: Sun Jan 03, 2016 4:22 pm

Re: Some objects stop before ground

Post by Xammond »

I will speculate (to get my account started here!), the floaters are sleeping rigids (which have prematurely detected non movements). Either lower the angular/linear amounts for them to sleep, or set the flag to always keep them awake.
lcrivell
Posts: 11
Joined: Sun Jan 10, 2016 5:08 pm

Re: Some objects stop before ground

Post by lcrivell »

Finally the issue was linked to my code, where I had challenges to align world and local transformation.
This is now fixed, and result is simply awesome.
BulletPhysics rocks !