[ODE] Ragdoll characters with ODE

Henri Hakl henri at cs.sun.ac.za
Thu Aug 7 08:02:02 2003


Sure, if you're willing to accept that things aren't well-commented and
written in Delphi.

I've got some of the code up on the web for you, have a look:

http://www.cs.sun.ac.za/~henri/articulated.zip (1.1MB)

The code isn't complete, but all the articulated system code is present.

* BodyLoading: this loads a text file ("body3.dat") that specifies an
articulated system, read the comments in "body3.dat"
* BodyPhysics: performs initialization and simulation of the articulated
system
* BodyRendering: renders the results... ;)

I included two AVIs (view with Windows MediaPlayer, the DivX player seems to
play it slow - not sure why) - the one is without AI - a simple "collapse"
of the body. The other includes an AI that tries to maintain balance (fails,
but still good).

Note that in the code in "BodyPhysics" in the "RecursiveInitJoint" procedure
the default angular motor parameter of maximum force (dParamFMax) and
dParamVel get set. This is necessary for the AI, but if you only want the
"collapse" version then you should not include them in your code.

Note that in Delphi:

// this is a comment
{ this is also a comment }

hope this helps you somewhat :)
  Henri


----- Original Message -----
From: "Ivan Bolcina" <ivan.bolcina@volja.net>
To: <ode@q12.org>
Sent: Thursday, August 07, 2003 12:31 PM
Subject: Re: [ODE] Ragdoll characters with ODE


> Hi. Can we get a source. I am interested in doing an sample of mecha, and
am
> looking for starting point!
>
> bye,
> ivan
>
> ----- Original Message -----
> From: "Henri Hakl" <henri@cs.sun.ac.za>
> To: <ode@q12.org>
> Sent: Monday, August 04, 2003 11:11 PM
> Subject: Re: [ODE] Ragdoll characters with ODE
>
>
> > How you described it is exactly how I did it (more or less)
> >
> > I used rectangular prisms for all body parts, and hinge-joints for
> > elbow/knees and ball-socket joints for everything else.
> >
> > One addition, though, is that all joints ALSO get an amotor (angular
> motor)
> > joint. This is allows all joints to be controlled, and have constraints
> > placed on them in a uniform manner. Works fine. :) My articulated system
> has
> > around 44 or so degrees of freedom, and the animations look remarkable
> > life-like. Pretty good all-in-all.
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Thomas Grimes" <striiideerr@hotmail.com>
> > To: <ode@q12.org>
> > Sent: Monday, August 04, 2003 9:19 PM
> > Subject: [ODE] Ragdoll characters with ODE
> >
> >
> > > I was wondering if anyone could either tell me or show me a link that
> > talks
> > > about how to setup a model, say a model using bones and all that like
> doom
> > 3
> > > does for example, using ODE to make this model have ragdoll like
> physics,
> > as
> > > seen in doom 3 and HL 2. I was thinking that maybe what you have to do
> is
> > > for each limb and torso of the model (assuming it's a person or
> something
> > > similar) assign a cyllinder which ODE knows about and assign a sphere
> > where
> > > the head is and connect all of these together with joints. Is this how
> > this
> > > is done or is there a better way? Thanks.
> > >
> > > _________________________________________________________________
> > > STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> > > http://join.msn.com/?page=features/junkmail
> > >
> > > _______________________________________________
> > > ODE mailing list
> > > ODE@q12.org
> > > http://q12.org/mailman/listinfo/ode
> >
> > _______________________________________________
> > ODE mailing list
> > ODE@q12.org
> > http://q12.org/mailman/listinfo/ode
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode