Something which I'm having troubles with since I started using Bullet and this is what I call the dancing box syndrom. I have for example a small box around 0.2 units in size. Now this box rests on a larger box let's say 1.0 units in size. The larger box has a larger mass than the smaller just to avoid the mass ratio problem but still kept close to each other for testing. Now the box starts out in the simulation right above the larger box touching it. What can be observed is the box jittering on the larger box. Now what troubles me is to figure out how to best prevent the box from dancing. After all it's a simple situation: a smaller box shape on a larger box shape. From a mathematical point of view there's a fully stable position for this problem but Bullet keeps the box dancing around not even triggering deactivation.
What can be best done in such a situation? How in general can shapes be prevented from dancing around too much? Is this a penetration recovery issues or solver issues in general?
How to fight "dancing" box syndrom?
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
-
- Posts: 117
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: Newyork, USA
Re: How to fight "dancing" box syndrom?
For smaller box resting on larger box, it's important to have 4 contacts points generated each frame. Have you tried to see how many contacts are there between them?
There are many factors that affect stable box stacking. You may have to be more precise.
Anyway, methods like Bullet may be able to simulate about 20+ boxes stacking (I remembered someone did that). If you want more, you may have to use different method. Refer to my post here: http://www.bulletphysics.com/Bullet/php ... f=4&t=4101
There are many factors that affect stable box stacking. You may have to be more precise.
Anyway, methods like Bullet may be able to simulate about 20+ boxes stacking (I remembered someone did that). If you want more, you may have to use different method. Refer to my post here: http://www.bulletphysics.com/Bullet/php ... f=4&t=4101
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
Re: How to fight "dancing" box syndrom?
It's only two box stacking in this example and as mentioned a simple 0.2 unit box on a 1.0 unit box, nothing fancy. I don't know how to be more specific in that case so you might want to give me a pointer there.
-
- Posts: 34
- Joined: Fri Sep 18, 2009 5:41 am
Re: How to fight "dancing" box syndrom?
I noticed something similar when one of the boxes (or both) is a triangular mesh instead of a "pure" box (i.e. btBoxShape). If both are of type btBoxShape, it is very stable in my experience. Otherwise have you tried to scale both boxes up (e.g. by a factor 10) and see what happens then?
-
- Posts: 117
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: Newyork, USA
Re: How to fight "dancing" box syndrom?
Have you checked the number of contacts? That'd be the first thing I do in your case.Dragonlord wrote:It's only two box stacking in this example and as mentioned a simple 0.2 unit box on a 1.0 unit box, nothing fancy. I don't know how to be more specific in that case so you might want to give me a pointer there.
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
Re: How to fight "dancing" box syndrom?
Could it be due to margins? I don't know right now what margins are set by default but with a 0.2 unit object could the margins cause the contact points to vary in number causing the dancing? I don't know exactly where to intercept those control points to figure out the problem.
-
- Posts: 12
- Joined: Thu Oct 22, 2009 12:50 am
Re: How to fight "dancing" box syndrom?
I think it could be margins, just try with a 1.0 and 5.0 unit box combo instead.
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
Re: How to fight "dancing" box syndrom?
A larger margin? I expected to use a smaller margin. Why has it to be larger?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: How to fight "dancing" box syndrom?
Please reproduce the problem in the Bullet BasicDemo, so we can have a look at it.
(attach the zipped BasicDemo.cpp in this forum, or in the google issue tracker)
Thanks,
Erwin
(attach the zipped BasicDemo.cpp in this forum, or in the google issue tracker)
Thanks,
Erwin
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
Re: How to fight "dancing" box syndrom?
Sorry, I'm rather time constraint right now. I'll try to reproduce it in the BasicDemo once I get some free time. Currently it's me running after time so I can't do it in the next couple of days.