source code > core > Research (closed)

decide what physics engine to use / #43

Summary

Evolution 3
closed
Nov 20, 2007
2 weeks ... 3 days
100%
Nov 20, 2007 / stenyak
Nov 4, 2008 / terrible
stenyak
 

Attached files

No files uploaded
We have to decide what physics engine to use. Developing our own is not even considered, we can't reinvent the wheel if we barely have the resources to build the chassis.
After carefully reviewing all the existing physic engines, it's been decided that Bullet will be used. The results of said review can be found right below here:


Necessary points:
  • Be cross-platform. At least Unix/Linux and Windows.
  • Be open source.
  • Be actively developed or maintained.
  • Have good documentation or have a good community, so that we can get help easily.
  • Be very accurate at high speeds (no explosions, no significant tunnelling).
  • Support, at least, hinge/revolute (door axis), fixed (glue two objects) and prismatic (piston) constraint.
  • Allow to use our own friction equations.
Additional points:
  • Deformable bodies.
  • Breakable bodies.
  • Basic simulation of fluids (for aerodynamics).
  • MacOS/PSX/XBox support.

Discarded (not suitable)

  • Springhead
    • -Last updated 4 years ago.
  • Solid Collision Detection Library
    • -Not a complete physics lib, just a collision detector. E.g it's used by Impulse Based.
  • Fast
    • -Not a complete physics lib, just a collision detector.
  • Tokamak:
    • -No support at all (forums inactive).
    • -Rarely updated.
    • +Breakable bodies.
  • Dynamechs:
    • -No longer being developed (last change was 6 years ago).
    • +Basic hydrodynamic simulation.
    • +Runge-kutta 4 integrator available.
  • Oxford Dynamics FastCar:
    • +Very fast.
    • -Only two suspension types.
    • -Not open source.
    • -No unix support.
  • CHRONO::ENGINE:
    • -Not open source.
    • +Gears simulation.
  • DynaMo:
    • +Many types of joints
    • +Several integrators, including runge-kutta 4 (accuracy).
    • -No community
    • -No longer being developed.
  • Aero
    • -No mesh support.
    • -Not enough joint types supported.
    • -No longer being developed.
  • Physsim (ask physsim people a few questions):
    • -No windows port available, and no plans. We did try to port physsim to windows, but it was deemed impossible in our time frames.
    • +Runge-kutta 4 integrator available.
    • +Native XML serialization.
    • -Small community, few docs.
    • -No generic trimesh support (only for closed shape meshes).
  • OpenFDM
    • +Table driven aerodynamics (reads JSBSim files), good aero physics.
    • -Barely any manuals or documentation (just the code itself).
  • JibLib
    • Sample fluid simulation (water+buoyancy, not built in).
    • -Little documentation.
    • +Actively developed.

In review

(none)

Accepted (fits our needs)

  • PAL
    • +Allows to use ODE, Bullet, Tokamak, JigLib, IBDS, etc.
    • +Implements additional features not present in those engines by default.
    • -Lags a bit behind the latest features available in the underlying physics engines.
  • ODE
    • +Support for many shapes.
    • +Very stable and mature.
    • +Big and active community.
    • +Good documentation.
    • -Fast but not very accurate integrators.
    • +Works in many platforms, including several videoconsoles.
  • Bullet
    • +Experimental continous collision detection (small tunnelling effect).
    • +Parallelizable
    • +Works in many platforms, including several videoconsoles.
    • +Support for moving generic trimeshes, can be simulated with this: find out if we can use generic trimeshes in IBDS.
    • +Support for softbody simulation.
    • +Support for loading collada files.
  • Impulse-based dynamic simulation (ask impulse based people a few questions)
    • +Runge-kutta/Taylor integrators available.
    • +Bullet/Solid collision detectors available.
    • +Support for particles and cloth.
    • -No box/cylinder/cone geoms.
    • +Concave trimesh support possible (find out if we can use generic trimeshes in IBDS), and planned for the near future.
    • +Heaps of joint types.
    • +Automatic computation of masses from geoms.
    • -Small community.
    • -Incomplete manual (but it'll be completed soon).
    • +Possible future implementation of deformable and breakable bodies.
    • +Planned support for computations distributed to several threads.
  • (helper lib) OpenTissue (ask OpenTissue people a few things)
    • +Deformable bodies support.
    • +Good aero/particles simulation.
    • -Documentation a bit spread.
    • -Inactive community.

11 Comments

stenyak

Nov 24, 2007
version 2
View comment
Dynamechs is rarely updated, physsim looks good, but has no windows support.

Tokamak: i'm studying it..
  • it was recently added support for windows.
  • If i understand correctly, it doesn't support arbitrary meshes, only convex ones (with up to 255 vertices/etc. total). However it's possible to use callbacks in order to do coll detection on our own.
  • Breakable bodies support, nice.
  • No macos support I think, but i guess it's easy to port.
  • Not many joint types, and not very configurable, though that's not necessarily be a drawback.
  • They mention good stacking support at their site.
  • Not much support at their forums, looks like a one-man project, doesn't seem to be very well known. It was released as open source not long ago, not very famous (yet?).

Pending to review: bullet, ode, pal.

stenyak

Nov 24, 2007
version 2
View comment
ODE:
  • One of the most active ones, very mature, good support, good docs.
  • Many joint types (not necessarily an advantage).
  • Will feature stable (though a bit slowlier) bullet coll detection soon.
  • Can't think of cons to this lib, really.
PAL:
  • Supports the 3 major open source libs (ode, bullet, tokamak).
  • It has the same feature set for all libs. This is good and maybe bad:
    • Additional lib-specific features are not usable via pal.
    • Non existing features are coded into PAL so they are usable.
  • The friction functions are too simple for our purposes, dunno if we can specify our own somehow.

stenyak

Nov 24, 2007
View comment
There's this chrono-engine lib. Not opensource, but free for non-commercial purposes.
www.deltaknowledge.com/chronoengine/features.php
Looks pretty good, but not OSS... :-(

stenyak

Nov 25, 2007

stenyak

Dec 5, 2007

stenyak

Dec 26, 2007
View comment
The discussion should now focus on whether to use ODE, Bullet, IBDS or PAL.
  • ODE has the most features, but evolves slow.
  • Bullet has a bit less features, but evolves a bit faster.
  • IBDS has the least features, but is the most promising.
So maybe we should just use PAL for now, and switch to an specific engine later if necessary.

stenyak

Dec 27, 2007
View comment
PAL recently added support (even if only basic in some cases) for IBDS and JigLib. Looks like the way to go. It also offers a library-agnostic set of classes/types for passing data into the core: formats, which is nice.

stenyak

May 29, 2008
version 2
View comment
No review was done, since it was known from the start that it was not open source.

terrible

Aug 13, 2008
Analysis of numerical integrators
wiki.vdrift.net/Numerical_Integration

"Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm."
It compared Euler, Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer, Runge Kutta 4 and Velocity Verlet.

stenyak

Aug 27, 2008
Switch to bullet
Recently, bullet added some new features that put it in clear advantage over the rest of physics engines: soft bodies, collada loaders.
Therefore, we'll be using bullet instead of PAL.

terrible

Nov 4, 2008
version 2
Another one: SOFA
www.sofa-framework.org/
  • parallelizable (based on data dependencies)
  • can use GPUs through CUDA.
  • Deformable models: mass-springs, linear and co-rotationnal FEM
  • Rigid models: articulated bodies based on penalities or reduced coordinates
  • Fluid models: SPH, Eulerian (preliminary)
  • Collision models: spheres, triangular meshes, distance fields (preliminary); with AABB-tree or octree bounding volume hierarchies
  • Collision detection methods: proximity, continuous (preliminary)
  • Collision response methods: (implicit) penalities, LCP-based constraints
  • Mechanical integration schemes: Euler explicit, RK2, RK4, static, implicit euler using PCG (Projected Conjugate Gradient)
  • xml descriptions of scenes.
  • there is an initiative to validate the different simulation methods to the real world.
  • accuracy, correctness: it is being used for medical simulations.
  • active full time developers and community.
P.s.: I am posting this information just because I think the information on this website is a great and very valuable resource, I know that it has been already decided to use Bullet.
 

Comment / Update