Jump to content
  • Advertisement
Sign in to follow this  
Juksosah

Simulating human body movements [for dummies]

This topic is 3942 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

As the title suggest, i'm trying to simulate human body movements using physics and yes I'm a dummy. Right now I've done a small 2D skeleton and can move each part separately. I tried to make it walk using a constant speed and the result didnt look natural. It looked robotic I had to incorporate acceleration using this formulae, p = p0 + v0t + (1/2)at^2 a =accel v =velocity p =position Now when my skeleton starts walking it looks better (the leg starts slowly and takes speed gradually) but it goes faster and faster and faster because I use a constant accelration. I think I should control acceleration or velocity to slow things down. I just dont know the mechanics of a human body when walking.. what acceleration to give and when to give an acceleration or velocity boost/decrease. (ex : when the left leg is a its peak, a = 0 ) I hope you understand !!

Share this post


Link to post
Share on other sites
Advertisement
Here's a reply, not an answer. Just some information, but not enough information. You've applied an acceleration. That's fine, but acceleration doesn't come from thin air, and for the human body it most certainly is not constant. Acceleration comes from force (Newton's second law of motion), and the force that pushes a human body forward is the difference beween internal muscular forces and the friction force between the foot and the ground. The net muscular forces exceed the frictional force, so that the net force applied is nonzero, allowing the center-of-mass to accelerate forward. The body deforms in such a way that the foot remains fixed on the ground for a period of time while the pelvis moves foward. Then, the next foot gets placed on the ground, as the muscles pull the pelvis foward again. The way the body interacts with the floor is pretty complex, and the deformation involves translational and rotational dynamics within the skeleton...caused by muscular impulses. The human body cannot walk without bone rotation...without bone rotation, the body would be rigid, and in that case an external energy source...expelling some kind of gas (laugh!) or an object pushing from behind...would be the only way to achieve locomotion, there simply would be no way for muscle actions to even do anything if the skeleton was rigid. So, in real life, a lot of very complex dynamics are going on.

The equation you posted, as written really is a form that is built around acceleration being constant for all time, never changing. That is simply not the case with human motion, and you have to vary acceleration to do what you want to do. See This Thread for a discussion of how to extend that formula to deal with non-constant acceleration.

I don't have any immediate advice as to how you can model acceleration for very simple physics-based walking. I'm absolutely certain there's a way to do it, though it probably won't be any better than applying some simple sinusoidal speed function rather than using numerical physics. But, I can say that physics-based walking simulations have been done by other people many many many times in the past, for things like insect simulation, simple robot simulation, and even extremely complex human-like motion. See Natural Motion's Morpheme product for example, which is partially physics-based. Do a google search on physically-based walking...lots of stuff...some super complex, some easier to understand. Just today, I saw a nice web app demonstrating physics-based walking of a 2D biped robot....let me see if I can find that link....well, I can't find it quickly and I have to go to sleep. I'll see if I can find the link at the office tomorrow..I was looking at that demo on my office computer.

Share this post


Link to post
Share on other sites
Wow great post, you summarize what I couldn't explain clearly and without posting complicated math equations.

My model can rotate it's limbs but it's the speed of the rotation when walking that puzzled me.

I think you're dead on with a sinusoidal speed function. I'll give it a try.

I saw the thread and... well I have tons of things to learn in physics. And not much time to spend on it.

But again, thanks a lot and I'll try to find the links.

Share this post


Link to post
Share on other sites
If you're approaching this as a serious endeavor you should really spend some time studying anatomy. The number of muscles and bones involved in human locomotion is pretty large.

That's why no one really does this for games. Typically you just have an animator create animations that look correct and that apply a simple translation to the moving person.

The "best" completely physics based realtime solution i've seen looks hilarious at best. As far as I know this is the "state-of-the-art" in physics based animation:

http://www.fun-motion.com/physics-games/sumotori-dreams/

This would qualify as something between a "Hard" and "Very Hard" problem:
http://fishbowl.pastiche.org/2007/07/17/understanding_engineers_feasibility

-me

Share this post


Link to post
Share on other sites
There was a nice article in the Journal of Game Development (JOGD), first issue, that presented an elegant way to do realistic procedural walks, on flat terrain at least. It does involved sinusoidal animation of limbs, and may be manageable for games...it might not be much more expensive than interpolated quaternion keyframes. Here's a link to the journal:

Journal of Game Development

The journal is pricey, but if you aren't inclined to subscribe, look in the abstracts link for the article "Versatile Walk Engine". Then google the authors. You may very well find some freely available publications from there.

Share this post


Link to post
Share on other sites
I must agree with you Palidine : physics based animation just looks silly.

Since I don't have an animator I wanted to do it all by myself. But I would be happy if I could just make my model walk using physics. Kind of a small demo, i'm not trying to turn this into a game.

I'm currently reading the "Versatile Walk Engine" article and at first glance it seems very well done and clealy explained.
Just google Versatile Walk Engine and it's the very first link.

Share this post


Link to post
Share on other sites
Physics based animation, when done right, looks awesome. Actually, it can look so good, that only the very best animators could ever hope to reproduce it:

http://www.naturalmotion.com/euphoria.htm

Download the 4 MB AVI and prepare to be amazed.

Share this post


Link to post
Share on other sites
HAHA that sumotori link you posted is hella funny...

How many drinks did these robots consume before stepping into the ring?

Share this post


Link to post
Share on other sites
A lot of drinks I must say.


The euphoria video is cool but the price is not cool at all. 1200$ a year for that product LOL. And the CPU usage must be huge.

Traditionnal, "canned" animation is here to stay.

Share this post


Link to post
Share on other sites
I have a feeling the Natural Motion stuff isn't purely physics-based. They do have a real-time SDK, Morpheme... I believe what they are doing is using mo-cap or hand key-framed animation that is then re-targeted---tweaked---using physics and/or IK. That is, physics-based response superimposed on a more traditional animation technique. Er....that "traditional" animation technique may be sophisticated and not directly artist or actor-created, e.g., they may have some collection of representative animation data or keyframes or gesture information, then mimic that to eliminate the need to actually do mo-cap or artistic key-framing.

The idea of example-based or sketch-based animation that can generate reasonable-looking motion from prescribed samples or simplistic gesture data.....

Motion Doodles


A Sketching Interface for Articulated Figure Animation

Skeleton-free Example-aased Animation

Combining some of those ideas with physics or IK can be quite powerful.

But, I'm not sure. I don't think its impossible to produce good-looking physics-based animation of characters, and especially if you focus on certain very specific motions---not trying to look right for every kind of situation.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!