Physics (was Re: [Bf-committers] Manic MSVC blender compile session)

bf-committers@blender.org bf-committers@blender.org
Thu, 7 Nov 2002 15:06:51 +0000


On Thu, Nov 07, 2002 at 02:10:07PM +0100, Ton Roosendaal wrote:
> Yep, no new functionality now, but I want to allow one exception: ODE. 
> Commits in this part of Blender should be aimed at getting Blender not 
> crashing, and preferably running (some) of the old demos again. This 
> work should not in any way frustrate the other processes that go on 
> here. If in doubt, then just wait with committing a while. From Norman 
> I've learnt that ODE is so much incompatible with the current physics 
> system that we've got a huge problem anyway.

The issue for me is that I simply don't know how compatible ODE is with
the Sumo (current physics system), because I have very little experience
using, much less coding with, Sumo. It is possible that ODE can be made
compatible with the old physics; I simply do not know. Ex-NaN engineers
who worked on the physics code would be able to give more insight on this
than I. However, fundamentally different is the fact that Sumo is
impulse-based; ODE is constraint-based; these are two fundamentally
different simulation paradigms, so making one behave "exactly" like the
other is likely to be challenging (but I won't say impossible).

As I have mentioned, the other possibility for backwards-compatibility with
physics is essentially to use Sumo physics plus an updated SOLID 2.0. The SOLID
version used in Blender is an internal and further developed version of
SOLID which was never publically released. I'll call this BlenderSOLID.
As I have said, I was able to compile Blender with the Sumo physics; the
only thing that (apparently) failed was the link phase with BlenderSOLID.
BlenderSOLID differs from SOLID 2.0 in at least the following ways:

* BlenderSOLID is proprietary; SOLID 2.0 is GPL
* BlenderSOLID supports mesh-mesh intersection with penetration depth.
  This can be approximated with ODE's triangle-collider collision code,
  which uses Opcode as a base. The ODE triangle collider cannot do
  mesh-mesh, but it can do sphere-mesh and box-mesh collision with
  penetration depth. So we can approximate the mesh-mesh case by
  defining the smaller mesh to be a box or a sphere, then doing the
  box/sphere-to-mesh collision.
* BlenderSOLID supports raytesting. ODE and Opcode support raytesting,
  perhaps not in the same way, but it probably could be made to work.
* BlenderSOLID has a different function naming convention than
  SOLID 2.0; the SOLID 2.0 function names would need to be changed to
  comply with BlenderSOLID.
* BlenderSOLID has declared some different datatypes; these need to be
  reimplmenented in SOLID 2.0.

There may be other issues as well.

To summarize: (1) using ODE collision and ODE physics results in better
rigid body dynamics but possibly incompatibility with earlier Blender
files. (2) Using SOLID 2.0 collision enhanced with ODE collision, and Sumo
physics will probably result in phyics which is mostly-compatible with
the previous implementation.

It would be interesting if any ex-NaN engineers could comment on each of
these two alternatives.

-Norman