Lol thats a hilarious but very good demo.
I couldnt stop laughing when one of them charged me with a floating device around its waist...
The way they get up when they are laying on their faces is pretty good, except that they use their hands only for balance and not to push the ground. However when they are laying on their back, they look just like the zombies in FF8 ;)
Golem AI
Yeah, they kindof break all the rules of physics & anatomy to
get up, and I guess it shows...
If I ever get round to it I plan to redo the arm states so that they at least pretend to push off surrounding terrain. Ideally I wanted them to pull themselves up with the help of a nearby table or wall.
By moving the hand/foot nodes non-physically they nearly always end up performing suspicious or vaguely homo-receptive contortions, when the state machines mis-read the limb configuration and dumbly press ahead with an inappropriate state: E.g. the "Face-Up-To-Squat" state can kick in when the character happens to have one leg forward and one leg backward, making him do a strange reverse-splits ( there should probably be a "Kneel-to-stand" state); or worse leaving him stuck in a "bend over" position.
Its been educational ( i.e. infuriating ) trying to come up with definitions for the stages of getting up which work in all circumstances ( e.g. torso twisted, lying on sloping terrain, one leg under a table etc... ) and I eventually went on to other things out of frustration.
Also, the task is made harder by the fact the verlet ragdoll skeleton doesn't have the proper degrees of freedom: you might notice that their legs cannot spread sideways, and that their elbows bend both ways! I've still not managed to find an impementation of proper hip, knee & elbow joints using the original Jacobson skeleton - if anyone knows of one please please let me know.
It is fun though constraining their hands to stuff they carry. They can drag other rag-dolls like this too - sometime I want to have a medic character who comes on and carries off injured bodies... oh yeah, and a bar-room brawl simulator where they break chairs over each others heads...
I imagine that taking a proper biodynamics approach to this would be even harder, as you presumably have to worry about real stabilising forces rather than displacements, and apply them through biologically-feasible 'muscle' locations. Plus you proably need a rock solid physics simulation for that too - especially if you use evolution or learning to generate the motion controller: otherwise it will probably evolve to exploit some quirk of the system like Karl Sims famous creatures where one evolved to propel itself by slapping its own ass, because energy was not conserved in self-collisions.
I need to read up on the biodynamics stuff sometime anyway , just to see;
is there any good literature at all amongst the bad?
get up, and I guess it shows...
If I ever get round to it I plan to redo the arm states so that they at least pretend to push off surrounding terrain. Ideally I wanted them to pull themselves up with the help of a nearby table or wall.
By moving the hand/foot nodes non-physically they nearly always end up performing suspicious or vaguely homo-receptive contortions, when the state machines mis-read the limb configuration and dumbly press ahead with an inappropriate state: E.g. the "Face-Up-To-Squat" state can kick in when the character happens to have one leg forward and one leg backward, making him do a strange reverse-splits ( there should probably be a "Kneel-to-stand" state); or worse leaving him stuck in a "bend over" position.
Its been educational ( i.e. infuriating ) trying to come up with definitions for the stages of getting up which work in all circumstances ( e.g. torso twisted, lying on sloping terrain, one leg under a table etc... ) and I eventually went on to other things out of frustration.
Also, the task is made harder by the fact the verlet ragdoll skeleton doesn't have the proper degrees of freedom: you might notice that their legs cannot spread sideways, and that their elbows bend both ways! I've still not managed to find an impementation of proper hip, knee & elbow joints using the original Jacobson skeleton - if anyone knows of one please please let me know.
It is fun though constraining their hands to stuff they carry. They can drag other rag-dolls like this too - sometime I want to have a medic character who comes on and carries off injured bodies... oh yeah, and a bar-room brawl simulator where they break chairs over each others heads...
I imagine that taking a proper biodynamics approach to this would be even harder, as you presumably have to worry about real stabilising forces rather than displacements, and apply them through biologically-feasible 'muscle' locations. Plus you proably need a rock solid physics simulation for that too - especially if you use evolution or learning to generate the motion controller: otherwise it will probably evolve to exploit some quirk of the system like Karl Sims famous creatures where one evolved to propel itself by slapping its own ass, because energy was not conserved in self-collisions.
I need to read up on the biodynamics stuff sometime anyway , just to see;
is there any good literature at all amongst the bad?
I guess I could contact my old employers to find where they got all of their biometric data, we had a very good model for each "limb" average mass/size, and, more important, for articulations degrees of freedom AND stress capacity. The best is, I think a lot of it was public data from various statistic institutes. If not, I have my little idea on how to build this data from scratch.
The big difficulty to achieve something realistic is to mix real kynetics, external forces (gravity, pushes, carried stuff) and body balance in minimizing the articulations stress. For example, the reason while most of use our hands to get up from laying face down is that our abdominals are not strong enough to lift all of our torso in that position. Even if it is strong enough, its easier using the arms.
Ive only ever found one book on biomechanics simulation, and it was horrible. Sorry, I can't remember the name. The problem is, most of the litterature is written by medical doctors who have a very feeble grasp of mathematics and physics. The section explaining what vectors are was hilarious by itself, and the guy clearly didnt understand the cross product.
Your best bet is to google "kinetic chains" or some similar terms.
The big difficulty to achieve something realistic is to mix real kynetics, external forces (gravity, pushes, carried stuff) and body balance in minimizing the articulations stress. For example, the reason while most of use our hands to get up from laying face down is that our abdominals are not strong enough to lift all of our torso in that position. Even if it is strong enough, its easier using the arms.
Ive only ever found one book on biomechanics simulation, and it was horrible. Sorry, I can't remember the name. The problem is, most of the litterature is written by medical doctors who have a very feeble grasp of mathematics and physics. The section explaining what vectors are was hilarious by itself, and the guy clearly didnt understand the cross product.
Your best bet is to google "kinetic chains" or some similar terms.
Quote:
Original post by schmodz
The second attempt, which actually works, was to split up the ragdolls' AI into individual state-machines for each limb.
It's very interesting that you took this approach... and I'm not surprised that it worked for you. This is exactly how cockroaches move (and afaik, insects too)... they have a brain in each leg... well, actually, they have ganglion in each leg (collections of nerve cells) which act as mini brains. There has been some good success with replicating cockroach motion with robotic cockroaches.
Extending this to ragdolls though is a big leap. The nonlinearity of the control problem is extreme. Think of an inverted double pendulum. That's a difficult nonlinear control problem. Now extend that to an inverted triple pendulum with nonlinear purturbations of the upper segment (due to arm movement and torso twist/deflection) and you've got the right complexity for this problem.
Schmodz, one question for you... how much damping did you put into your joints?
Cheers,
Timkin
I LOVED that demo you posted. I was cracking up at the way they ran at me -- especially when they were carrying chairs and shopping carts. lol!
I saw these guys at GDC a few years ago. I was really impressed with the technology. I have to echo the dissappointment of it not being a plug-in to a game engine. That would be sweet!
Quote:
Original post by Lemonaid
LOL! I was way off its called Endorphin. NaturalMotion
I saw these guys at GDC a few years ago. I was really impressed with the technology. I have to echo the dissappointment of it not being a plug-in to a game engine. That would be sweet!
Hey,
Thanks everyone for trying the silly demo; I'm glad people enjoyed it!
Steadtler: Thanks for the research suggestions: It looks like there's stuff out there that might at least help me nail down the characteristics of the sub-behaviours of getting up, if not the maths/physics behind them.
StratBoy61: Having a predefined list of animations merged with the verlet physics might work if you used the animation frames as a desired body configuration ( presumably specified in some 'body-space' derived from e.g. the current torso orientation ), and pushed the limbs towards it.
Being too lazy to write an animation system, its not something I tried... I think you'd probably still need to query the state of limbs individually though, to see when its appropriate to do try the 'next' animation in your sequence: The main issue I've found that permeates everything when you have ragdoll-all-the-time collision between your character and the world is that you can never assume he's in some nice (animation-friendly) start pose for an action, unless you exhaustively handle the combinations of starting limb positions.
I tried to minimise the effect of this by having fairly loose criteria for when a limb is considered to satisfy the state-completion. Here's an example function the brain uses to determine if the "Crawl pose" state is achieved ( the first part of getting up from a face-down configuration):
// Testing BrainTask::ACHIEVE_CRAWL_POSE:
if ( !m_pOwner->IsSupported() ) return (false);
// Some part of upper body should be supported
// At least one thigh should be approximately vertical
// Torso should be leaning forwards.
if ( !rLeftArm.AnyNodeIsSupported() &&
!rRightArm.AnyNodeIsSupported() ) return ( false );
// Thighs: topline is the direction vector along the thighbone
if ( rLeftLeg.GetTopLineVert() < 0.7f &&
rRightLeg.GetTopLineVert() < 0.7f ) return (false);
// Query bodyspace tilt amount: comes from lower torso
if ( m_pOwner->GetWorldTilt() > -0.2f ) return (false);
return ( true );
Of course, these conditions mean that sometimes they get stuck, kneeling on a table with both arms hanging out in space. And conversely, because of the necessary loosesness of the criteria, the character can move on to the next state when its limbs might not look to us like they're really ready for it. Both cases indicate that some extra sub-state is probably needed.
Timkin: Yup, I came across some of the insect research & simulation back at university and was probably partly inspired by it. (Coincedentally, the guy who founded NaturalMotion was on the same MSc course at that time).
The mixed blessing and curse of the verlet system is that you can completely ignore complexity and non-linear purturbations if you are prepared to rudely shove the skeleton around first and ask questions about physical plausibility later. And as we both mentioned, the main problem with that is damping.
In the demo build, while the character is getting up the verlet nodes have dumb worldspace damping of up to 20% a frame (in the verlet update the new implicit velocity of the node is 80% of the difference between the old and new positions). This was needed to stop horrible spasms and self-collision-induced spinning occuring.
When the characters run, the damping is only 2% a frame, because I generate speed/incline-adaptive forward motion from a hack that pushes the hip node towards the mean of the two feet positions, raised by a leg height. With too much damping this method becomes very disjointed. As a result of the low damping, you'll notice that when they run their torsos undergo quite alot of random twist as their shoulder and hip joints are pulled around by the forced oscillations in the arms and legs.
By the way, the reason the heads loll about disturbingly is they have no controller input at all for their necks in this old build - it kind of adds to the unintentional zombie feel of the motion I think!
Cheers,
schmodz
Thanks everyone for trying the silly demo; I'm glad people enjoyed it!
Steadtler: Thanks for the research suggestions: It looks like there's stuff out there that might at least help me nail down the characteristics of the sub-behaviours of getting up, if not the maths/physics behind them.
StratBoy61: Having a predefined list of animations merged with the verlet physics might work if you used the animation frames as a desired body configuration ( presumably specified in some 'body-space' derived from e.g. the current torso orientation ), and pushed the limbs towards it.
Being too lazy to write an animation system, its not something I tried... I think you'd probably still need to query the state of limbs individually though, to see when its appropriate to do try the 'next' animation in your sequence: The main issue I've found that permeates everything when you have ragdoll-all-the-time collision between your character and the world is that you can never assume he's in some nice (animation-friendly) start pose for an action, unless you exhaustively handle the combinations of starting limb positions.
I tried to minimise the effect of this by having fairly loose criteria for when a limb is considered to satisfy the state-completion. Here's an example function the brain uses to determine if the "Crawl pose" state is achieved ( the first part of getting up from a face-down configuration):
// Testing BrainTask::ACHIEVE_CRAWL_POSE:
if ( !m_pOwner->IsSupported() ) return (false);
// Some part of upper body should be supported
// At least one thigh should be approximately vertical
// Torso should be leaning forwards.
if ( !rLeftArm.AnyNodeIsSupported() &&
!rRightArm.AnyNodeIsSupported() ) return ( false );
// Thighs: topline is the direction vector along the thighbone
if ( rLeftLeg.GetTopLineVert() < 0.7f &&
rRightLeg.GetTopLineVert() < 0.7f ) return (false);
// Query bodyspace tilt amount: comes from lower torso
if ( m_pOwner->GetWorldTilt() > -0.2f ) return (false);
return ( true );
Of course, these conditions mean that sometimes they get stuck, kneeling on a table with both arms hanging out in space. And conversely, because of the necessary loosesness of the criteria, the character can move on to the next state when its limbs might not look to us like they're really ready for it. Both cases indicate that some extra sub-state is probably needed.
Timkin: Yup, I came across some of the insect research & simulation back at university and was probably partly inspired by it. (Coincedentally, the guy who founded NaturalMotion was on the same MSc course at that time).
The mixed blessing and curse of the verlet system is that you can completely ignore complexity and non-linear purturbations if you are prepared to rudely shove the skeleton around first and ask questions about physical plausibility later. And as we both mentioned, the main problem with that is damping.
In the demo build, while the character is getting up the verlet nodes have dumb worldspace damping of up to 20% a frame (in the verlet update the new implicit velocity of the node is 80% of the difference between the old and new positions). This was needed to stop horrible spasms and self-collision-induced spinning occuring.
When the characters run, the damping is only 2% a frame, because I generate speed/incline-adaptive forward motion from a hack that pushes the hip node towards the mean of the two feet positions, raised by a leg height. With too much damping this method becomes very disjointed. As a result of the low damping, you'll notice that when they run their torsos undergo quite alot of random twist as their shoulder and hip joints are pulled around by the forced oscillations in the arms and legs.
By the way, the reason the heads loll about disturbingly is they have no controller input at all for their necks in this old build - it kind of adds to the unintentional zombie feel of the motion I think!
Cheers,
schmodz
Back from ski, time to work now...
chmodz, your demo is *awesome*. It is exactly the kind of things I would like to do.
I am glad that you already have experience in this domain, and I hope that you will be able to give me advices/directions if I want to implement something similar. Please, also let me know if you would consider teaming up for a bigger project.
If you want to, you can directly get in touch with me via the information in my profile.
Thanks again.
StratBoy61
chmodz, your demo is *awesome*. It is exactly the kind of things I would like to do.
I am glad that you already have experience in this domain, and I hope that you will be able to give me advices/directions if I want to implement something similar. Please, also let me know if you would consider teaming up for a bigger project.
If you want to, you can directly get in touch with me via the information in my profile.
Thanks again.
StratBoy61
Hi StratBoy,
Sadly I won't be able to collaborate on a bigger project as my gamedev day job sucks up nearly all my time and programming willpower - I get to work on my hobby projects like the skinny engine for at most a few hours a week.
But I'll gladly give you any advice & help I can if you decide to do a verlet based system. Post questions here or use the email adress in my profile.
If you really want I can give you my brain update source code as a reference - not much use on its own, and not the cleanest c++, but it might help decide which bits of skeleton to push in which direction!
Schmodz
Sadly I won't be able to collaborate on a bigger project as my gamedev day job sucks up nearly all my time and programming willpower - I get to work on my hobby projects like the skinny engine for at most a few hours a week.
But I'll gladly give you any advice & help I can if you decide to do a verlet based system. Post questions here or use the email adress in my profile.
If you really want I can give you my brain update source code as a reference - not much use on its own, and not the cleanest c++, but it might help decide which bits of skeleton to push in which direction!
Schmodz
Quote:
Original post by schmodz
But I'll gladly give you any advice & help I can if you decide to do a verlet based system. Post questions here or use the email adress in my profile.
If you really want I can give you my brain update source code as a reference - not much use on its own, and not the cleanest c++, but it might help decide which bits of skeleton to push in which direction!
Schmodz
Thank you Schmodz. Just sent you a PM.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement