Open source physics engines

Frank Krueger picture Frank Krueger · Apr 30, 2009 · Viewed 13.6k times · Source

I have been using the Open Dynamics Engine (ODE) for the last few weeks with great success. It has a very simple API and its simulations at least look realistic. (I sometimes wonder about my collision joint parameters, but whatever.)

My only complaint is that it is sometimes a dog. If I naively simulate 1000s of interacting bodies, then my performance starts to dive.

I know I can spend time with their spatial grids to reduce the load of the collision system, but before I go through the effort of tuning my code to work with ODE, I wonder if there are any other Open Source/Free physics engines worth looking at. This will be for a commercial app, so I am looking for something more solid and more battle tested than some college student's weekend project.

Answer

Promit picture Promit · Apr 30, 2009

Building a fast, accurate, and stable solver is extremely tricky, and people like Havok are understandably protective of the technology. That said, the free systems I'm aware of are:

  • Newton Game Dynamics -- This one made its reputation on having a very accurate and stable solver, at the cost of performance. It's spent the last few years trying to gain performance without sacrificing the other two. It is a well designed engine and it works well, but it's still one of the slower ones out there. Not open source.
  • Tokamak -- Exactly the opposite. This one is awful; even their demos don't run stably. Just pull up their box stacking and you can see massive jitter. I've never been impressed. It is open source and wildly fast, though.
  • Bullet -- This one's lead by a former Havok employee, who is now employed by Sony (although I can't remember if that's SOE or SCEA). This is the newbie of the scene, and it is actually open source. It's got heavy Sony backing, it's nicely cross platform, and it's developed by people who know what they're doing.
  • TrueAxis -- A recent appearance on the scene. I don't know much about it, and it hasn't really gained a substantial community. I tend to be a bit skeptical here; it may be well written, but with a small community help can be hard to come by, and it's probably not a well tested and stable engine, compared to the others.

I'm a huge fan of Bullet myself, but I've heard some misc complaints about it. Most of them seem to center around poor documentation, or occasional problems on some of the secondary platforms like Mac. It'd still be my pick after the "Big 2", Havok and PhysX.