   Computing Impulses to make an skeleton follows a keyframe animation
  I have an skeleton that is updated using a keyframe animation. I like to make another skeleton that have a rigid body on each bone and move as a ragdoll by using tokamak. How can I compute appropiated impulses to make the ragdoll move exactly as the keyframed skeleton?What I want to accomplish by using that is to compute the keyframe animation, Make the ragdoll try to follow that animation but also collide with the environment and other players so no penetration will happen. I will use the physic skeleton for rendering instead of the keyframed, that way the model will move as if it were playing an animation but if it collides then it will stop moving the arm (for example) but will still try to move as the keyframe.Any thought on how to compute those impulses?   
  It really isn't that simple. A simple impulse based method will fall apart at the soonest sign of trouble, and then end up spinning around on the grounds. Anyways, you likely want eiter a motor approach, to turn the joints. Or setup springs to where you want the bone to be. Indy   ;Quote:How can I compute appropiated impulses to make the ragdoll move exactly as the keyframed skeleton?Since you know the exact positions of the next frame you can compute the velocity of each rigid body to reach the position and orientation of the next frame. Set this velocity for each rigid body and pass it to the solver.Just an idea, never tried it...-Dirk;  I would cheat and use the keyframes as targets for each limb. Instead of doing any 'real physics' you just attempt to move each limb to its ideal position, but stop if there's a collision.   ;Quote:Original post by AreliusIt really isn't that simple. A simple impulse based method will fall apart at the soonest sign of trouble, and then end up spinning around on the grounds. Anyways, you likely want eiter a motor approach, to turn the joints. Or setup springs to where you want the bone to be. Motors was my first thought, but they seems to work by using forces. The bad thing about forces is that I'm not warrantied that the bones will reach the desired position in the next frame. they could even not reach the position at all, even if there is not collision, just some wind and gravity.Is there any way to make motors more reliable? or at least to suit my requirements?Springs I guess has the same problem that above plus they will produce a lot of inestability in the system. I don't really imaging how to make them work with out exploting at first collision.Quote:DonDickieDSince you know the exact positions of the next frame you can compute the velocity of each rigid body to reach the position and orientation of the next frame. Set this velocity for each rigid body and pass it to the solver.Yes, I guess that could work, And even better if instead of linear velocity I use rotational velocities and try to reach the ideal bone rotation. What I wonder is how much does the bones attached to the rotated bone will slow the rotation movement? I could happen that maybe the hands reach the rotation, but the forarm only get 2/3, and the torso doesn't even move a bit!Have any of you make any test of seting rotational velocity in an inherarchical system?Quote:AreliusI would cheat and use the keyframes as targets for each limb. Instead of doing any 'real physics' you just attempt to move each limb to its ideal position, but stop if there's a collision.If I can't make the animation work with physics in a few day, that solution is the one I will use. It doesn't allow me to react to hits, but at least handles collision very well. Besides, I could switch some body parts to fully physically controlled at some points and then blend into the keyframed animation as the time pass to simulate recovering.Thx, for your answers. Any other tip I could use will be welcome. To make me more explicit, I just want to make two characters fighing with out interpenetration and reacting as nice as possible. Is there any way I can do that with out having to create tons of animations to support diferrent reactions?[Edited by - CaossTec on June 6, 2006 2:05:25 PM]