[ODE] Collision with Quake or Skeletal type models...

Anselm Hook anselm at hook.org
Sat Oct 5 13:03:01 2002


Hi Dominique,

One way to add collision information to a character is to do it by hand;
to write actual code that manufactures hulls, joints and bodies.  The
position of the body will drive the position of the bones in your
character and that in turn will presumably drive the rendering of the
skin.

(Your challenge is mostly just describing a good data model.  Once you
have that ODE should easily be able to do the rest.)

It can however be very time consuming and error prone to attempt to
describe any system of even reasonable complexity using source code
because the iteration time is so slow and there is no visual feedback to
help correct errors in objects placement.  Consider that you will have at
least 13 joints and 13 bodies and 13 collision hulls - each of these
objects has several parameters.  These parameters all interact and the sum
of the system can be extraordinarily complex.  Finding islands of
stability with all of these knobs and dials that you can turn at random
can be pretty tiring... change any cosmological constant and your entire
system explodes in an instant.  Dynamics libraries are mostly unusable for
scenes of any complexity without some kind of help here.

A better way is to use a modelling package.  If you have a complex
geometry that you are editing in a modelling package - you may want to add
specially tagged cylinders, boxes or spheres to your skeleton in that
environment.  At export time extract those details and pipe them to your
collision handler.  This is probably less code than the above and is
better.

Alternatively you could perhaps synthesize reasonable collision hulls from
your skeletal data such as assuming a cylinder of certain radius given
bone length - or by doing a coarse bounding check on each group of bone
associated vertices and creating a collision hull dynamically.

BTW You mean Milkshape 3d right?

You'll need to specify bodies and joint constraints as well.

If you were using a commercial physics library such as Havok then they
have special extensions to 3DSMAX and other tools to allow you to visually
specify all of these kinds of details.  Unfortunately nothing like that
exists yet in the public domain (although likely Blender will have such
features soon).  Right now you have to invent your own scheme or actually
describe all of the joints, bodies and collision surfaces completely by
hand - which can be extraordinarily tedious and error prone.  Depending on
your budget I'd recommend spending some time devising a data driven model
that modellers could use to design not only the visual form but also the
underlying function.

You may even be able to use something like havok and 3dsmax to generate
your data model but then actually drive the system with ODE.  This would
be an amusing hack since your runtime could remain open source.

This guy did pretty good - probably doing it by hand - so for a single
known quantity it may not be that bad:

  http://taat.fi/taat/porrasturvat/

 - a

On Sat, 5 Oct 2002, Dominique Louis wrote:

> Hi All,
>    Where would be a good place to start when investigating how to
> implement collision between a car and a skeletally animated model,
> probably in MilkShake 3D format.
>
> Thanks,
>
>
> Dominique.
> --
> http://www.DelphiGamer.com := for all your Object Pascal game
> development needs;
> http://www.delphi-jedi.org/Jedi:TEAM_SDL_HOME := Home of JEDI-SDL;
> Cross-platform game development with Pascal, has never been easier.
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>