Question about comparing Bullet and ODE

witmud
Posts: 5
Joined: Fri Jul 13, 2007 4:26 am

Question about comparing Bullet and ODE

Post by witmud »

Hi,

I am a newbie and glad to find this great forum.
I plan to make a fight game like VR Fighters, maybe OGRE is a good choice, but i still know little about physics lib. hope someone help me,

compare Bullet and ODE, which one is better for,
1) thoundsands of box collision, like a ball breaking a house made in thousands of boxs.

2) a complex rigid body, about 30-50 joints, Bullet and ODE which one is stable and fast, will not explode often.

3) which one can set rotate degree limit for ball-socket joint or univeral joint? I mean set the rotate limit for rigid body's shoulder or waist.

4) which one has a python lib or easy convert to py lib, for python is easier for me, i plan to use pyogre

where can i find a rigid body physics tutorial or demo resource?
Thanks
Eternl Knight
Posts: 44
Joined: Sun Jan 22, 2006 4:31 am

Post by Eternl Knight »

I'll answer what I can, but a quick browse through the websites of bu\oth Bullet & ODE will give you more information.

{ 1) thousands of box collision, like a ball breaking a house made in thousands of boxes. }
I have found that ODE is "slightly" faster than Bullet in this area, but only because you mentioned "boxes & a ball" (i.e. simple box vs sphere intersections tests which ODE has a special case for). On the other hand, were you to go for more complex collision shapes (say something needing convex decomposition), Bullet wins hands down.

{ 2) a complex rigid body, about 30-50 joints, Bullet and ODE which one is stable and fast, will not explode often. }

Depends on the joints & the situation they are in, but I think on this one Bullet & ODE break about even. Perhaps ODE would have a slight advantage here too, but I wouldn't swear to it. Having that many joints is overkill for gaming though (unless you're building something like "Amazing Machines" which you mention you are not).

{ 3) which one can set rotate degree limit for ball-socket joint or universal joint? I mean set the rotate limit for rigid body's shoulder or waist. }

OK, my information may be out of date on this (as there is now a cone constraint for rag-doll support in Bullet), but I know that Bullet's D6 (universal) joint had stability issues which I don't think have been addressed yet.

{ 4) which one has a python lib or easy convert to py lib, for python is easier for me, i plan to use pyogre }

This one is easy. ODE currently has a detailed Python wrapper. Bullet does not (though I know that at least one person is working to change this).

For me, the best combination would be Bullet for collision detection & contact point mgt with ODE for solving the physics system (it has been around longer and so has more constraints & features such as torque bound motors). But this is still something that a variety of people (including myself) are working on...

--EK
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Post by Dirk Gregorius »

Complex ragdolls composed out of 30 - 50 joints are hard for every iterative solver. I know that Bullet will release a Featherstone solver very soon, so as long as your joints don't have any loops (ragdolls usually don't have loops) this will be your best option I guess. Maybe Erwin can give more detailed information about this.

Also note that ODE is somewhat a dead project in my opinion. Basically there was no addition of any relevant feature after the last release of Russ Smith. On the other hand Bullet is under very active development.

What speaks for the ODE is the presence of the stiff Dantzig solver, but this is more of akademic relevance than for games. Is might be that the ODE is a little faster, but I doubt that this will be an issue in a real game. Bullet's collision detection is far more advanced than ODE and usually you use the same collision system as the physic engine, because otherwise you need to double this functionality and here Bullet gives you more than you need. Bullet is also used in a lot big projects to my knowledge and a lot (if not all) experiences from there are integrated into upcoming releases. This is different to the ODE where only very few comes back to the original project...
witmud
Posts: 5
Joined: Fri Jul 13, 2007 4:26 am

Post by witmud »

Thank EK and Dirk.

I am trying to build a rigid body with ODE, is there some ragdoll reference? 30-50 joints include 6-9 hair joints, is that crazy?

anybody have good idea to share?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

You could try Bullet's new btConeTwistConstraint, which is specially designed for ragdolls. Also the btHingeConstraint has limits (for knees), and collisions between bodies that share a constraint can be automatically disabled. The upcoming Featherstone constraints would be good for higher quality ragdolls, but I think the btConeTwistConstraint should be fine for most cases.

Performance of ODE and Bullet is similar (you can register a special sphere-box and box-box in Bullet too), but the parallel version for Playstation 3 is much faster. This is currently being ported back to multi-core processors (Intel Core 2 Duo etc).

Some joint limits/motors are missing in Bullet, this should be improved soon.

Thanks,
Erwin
witmud
Posts: 5
Joined: Fri Jul 13, 2007 4:26 am

Post by witmud »

@Erwin, Thanks for your help, I like this active forum that will help Bullet grow fast just like OGRE.
Eternl Knight
Posts: 44
Joined: Sun Jan 22, 2006 4:31 am

Post by Eternl Knight »

Just to be clear, I would really only use ODE if (a) you need motors or (b) only need simple shape collisions.

ODE (while having pretty much stagnated in recent times), has been pretty thoroughly hacked and tested (though the last commercial game I *know* used it is getting on a bit, BloodRayne 2).

Bullet is much newer (and so has a couple of kinks and limitations to work out). However, the community & developers are MUCH more active (just look at the forums and the number of features released of the past few months). The only reason I am still using ODE is motors & ragdoll stuff. I have yet to try out the cone/twist constraint (which sounds promising) and am looking forward to the Featherstone solver implementation (as this would be perfect for my uses).

Simply put, if you are releasing "tomorrow", I'd stick with ODE (simply due to personal feelings of "tried and tested"). If you have a couple of months up your sleeve - Bullet would definitely be the way to go.

BTW: Do you really need 50-60 joints? For a fighter game that seems like MASSIVE overkill... Or do you mean 50-60 "constraints", in which case special case constraints might narrow this number down significantly.

--EK
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

If you release your game for Playstation 3, XBox 360 C++ or XNA, you should use Bullet. It has already been parallelized and optimised for SPUs and multi core. So it performs better then ODE. It is non-trivial to port ODE's OPCODE to SPUs, you need to rewrite the (quantized) trimesh and you'll likely end up with something similar to Bullet btOptimizedBvh.

For PC, the performance is very similar, but the multi-core Win32 Threads version of Bullet outperforms ODE. Also, removing the few dynamic memory allocations in the scalar (non-parallel) version of Bullet should give it the edge.

Several big game companies and commercial games use Bullet now. So it is tried and tested in real scenarios. Hopefully some of those AAA titles using Bullet can be mentioned at some stage.

Thanks,
Erwin

ps: there is a ragdoll demo that shows how to use the btConeTwistConstraint.