[ODE] keyframe character animation link to a ragdoll

Samuel Girardin samuel.girardin at wanadoo.fr
Mon Feb 16 18:27:21 MST 2004


Hi  Jon ,

I don't use dClearForcesAndTorque(). I only  use dSetPosition & dSetRotation
to make ode box match up
the keyframe animation, I don't use any addforce or add torque in the
simulation. The only force I use is gravity.. I have made some test, and I
really have the feeling that ode keep something of the last ragdoll state,
when I switch again to a ragdoll state. I think I have to re initialize ode
, but I don't want to destroy all object and rebuild them at each new
state(ragdoll or keyframe). Is there a method to initialize ode ?

Thanks

----- Original Message ----- 
From: "Jon Watte" <hplus-ode at mindcontrol.org>
To: "Samuel Girardin" <samuel.girardin at wanadoo.fr>; <ode at q12.org>
Sent: Monday, February 16, 2004 5:29 PM
Subject: RE: [ODE] keyframe character animation link to a ragdoll



Did you call dClearForcesAndTorque() on each object when you switched
between modes? Do you call dSetQuaternion() and dSetPosition() on each
object to make it match up the keyframe animation, when you switch from
keyframe to ragdoll? (sounds like you did the second, but I'm not sure)

Cheers,

/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Samuel Girardin
Sent: Sunday, February 15, 2004 6:53 PM
To: ode at q12.org
Subject: [ODE] keyframe character animation link to a ragdoll


Hello ,

I've a problem... I'm working on characters animations & behaviors.

On one side I have a skinned mesh link to a bones skeleton animated
by keyframe (3dsmax export).

On the other side I have an ODE skeleton generated with the bones'mesh
parameters(lenght, position ,rotation, etc.).

For the moment, I'm able to play the loop keyframe animation (simple walk),
and when I hit a key  I  switch to the ragdoll mode. My character fall down
correctly. The transition between  the first  state  to the second is ok...

Here is the pseudo code I use to deal with the two state

if (a key is hit)
 (
 enable ode simulation
 update bones mesh matrix with the ode skeleton matrix
) else
 (
enable loop keyframe animation
update odeskeleton matrix with the mesh bones matrix
)

That works only well only one time:
Character walk, I press the key, the character fall, I release the key to
switch
to keyframe animation, character walk again, but if I press the key again it
seems
ode keep somewhere the last ragdoll state (position etc...). It's not
exactly the
last ragdoll state,  it depends...

So I think  my update for ode skeleton   with the bones mesh works only  the
first time. If I let my character walk during 1km and I hit a key to switch
to
ragdoll mode, that's work, but  not the second time.

To update ode skeleton I use  :
body[].setPosition  &  body[].setRotation. I think those changes are not
update
by ode. So is there a way to update body pos & rot without compute
simulation ?
Like said to ode  : keep for each new frame those changes somewhere in
memory ,
you need those value  when you 'll have to do your job ?

Here it is. So if someone understand my problem. I appreciate any help !

samuel

www.aaxyz.com

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list