views:

610

answers:

7

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.

+5  A: 

Bullet is awesome, and had been used commercially (eg: in the production of Bolt, and several PS3/Wii games) has support for many platforma and even nVidia's CUDA.

cyborg_ar
+4  A: 

Bullet is free for commercial use and sources are available.

The documentation could be much better but there's a forum and a number of examples that can help when getting started.

diciu
+2  A: 

Farseer is very nice.

http://www.codeplex.com/FarseerPhysics

Chuck
Given that this is a 2D engine entirely in C#, it's both less capable and slower than ODE and probably not what the OP wants. Don't get me wrong, Farseer is fabulous for XNA projects. I just don't think it's helpful here.
Promit
Agreed, but it might worth a look :)
Chuck
+12  A: 

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.

Promit
I'm glad I asked this question. Bullet does indeed sound exactly like what I was looking for.
Frank Krueger
+1  A: 

Try Tokamak Engine documentaion here

TStamper
+3  A: 

With today's hardware, if you naively simulate 1000 interacting rigid bodies on a x86 CPU, the performance starts to dive without exception. If you want more performance right now then it'd be better to seek for physics engines that shift their workload to GPU.

CPUs have great interger math and logic processing capabilities, but GPUs have far much greater raw floating point computing capabilities.

If you still want more performance by just using CPUs then you will need to change your requirements.

Cheery
+1  A: 

Nvidias PhysX is not open source, but freely available for Windows, Linux and PS3.

Quote from http://en.wikipedia.org/wiki/PhysX:

Nvidia provides both the engine and SDK for free to Windows and Linux users and developers[6]. The PlayStation 3 SDK is also freely available due to Sony's blanket purchase agreement.

lothar
Thanks for the link. In my case, I need to be able to control the compilation so this won't work for me. It's good to know though!
Frank Krueger