Scrolling Game Development Kit Forum

General => Game Development Artistry => Topic started by: v6v on 2012-02-29, 04:37:01 PM

Title: Walking Sequences
Post by: v6v on 2012-02-29, 04:37:01 PM
Hello. I have no clue what I'm doing. I'm unskilled with walking sequences.

http://www.youtube.com/watch?v=Y6Qe5Awgn8c&feature=plcp&context=C3c7a499UDOEgsToPDskJH6QFknB5IjSE5BSE17Aea

Can someone suggest some methods for recreating a smooth walking animation?

So far I've been told that the sprite appears to be limping- as if it is going to fall over each step.

I ask because this won't be the only walking sequence my game will have.
Title: Re: Walking Sequences
Post by: bluemonkmn on 2012-02-29, 06:08:20 PM
I think the right leg should remain a little more bent at the knee as it swings forward.  And the torso and head should not move so much if at all.  True that they may tilt forward to get your forward balance/momentum started when you begin walking, but as you're walking you don't actually lean forward (or rather change your leaning) much at all.  Finally the right arm seems to be all over.  The elbow is bending too much and too frequently.  If you monitor yourself when you walk, you should notice that your arms move very little, especially at the elbow, and they move at about the same frequency as your feet.  Both arms in your animation, actually, seem to be moving twice as fast as they should.  Try some of those changes and let's take another look if there's still room for improvement then.

Oh one more thing -- don't you think the knees are a bit high up the leg?  Shouldn't the thighs be longer and the calves be shorter?
Title: Re: Walking Sequences
Post by: Vincent on 2012-03-01, 07:18:03 AM
I made some walking animations (in 3D) and it's unfortunate that walking is the most frequently used animation because it is also one of the most complicated to do.  You can find a lot of tutorials on how to make walking animations.  Basically there are 4 key moments in a walking animation.  If you define those 4 key moments and let your application do the in between frames, you should have a decent walking animation.
The 4 key moments are:
1- Contact (the front foot touches the ground and the back foot is halfway lifted, this is the most extended position for the legs)
2- Recoil (the weight of the body passes on to the front foot and the back foot is lifted)
3- Passing (the front foot and the back foot meet in the middle of the sequence and "exchange" their status: front becomes back and vice versa)
4- Hovering (the front foot is almost over the landing point and the back foot starts to lift)

This is enough for a 2D side walking animation.  Of course, if you do a 3D sequence, you also have to manage torso and hip twist.

Here is a link toward a basic explanation (and snapshots) of those key moments.  Try to mimic them for the 4 and see if it helps:
http://www.rubberbug.com/walking.htm

If you want a more organic like walk, try to find a video reference and draw your frames over it.  This is a process called rotoscopy and it usually gives a high quality result. :)
Title: Re: Walking Sequences
Post by: v6v on 2012-05-23, 05:44:24 PM
Okay Gentlemen, with the exception of the halved FPS, how does this look? I tried to change the cycle to prevent a bit of "dipping" on stepping on the left foot.

http://youtu.be/tLHWFT9r29k

What should I change? Things are looking sloppy.

I can just interchange the sequences with the system I've made.

Edit: I modified the knees and calves a bit, but is the legs/calves proportion still off?
Title: Re: Walking Sequences
Post by: bluemonkmn on 2012-05-24, 04:59:30 AM
1) I think when the right leg is coming forward, it straightens out too early. I think the thigh should get to its forward angle quickly and then "swing" the calf forward until the leg is straight. Look at how the left leg's thigh is almost in position even before lifting the foot off the ground. The legs should act symmetrically. The left leg and right leg should be practically indistinguishable in how they animate.

2) The thighs seem too short, and the calves too long. The knee should be in the middle of the leg, not the top. Unless you're animating a mutant.

3) The arms (and legs) should animate along smooth curves. The right arm bobs its hand twice just in bringing it forward. For one full walking cycle, the hand should swing back once and forward once, and that's it. No bobbing hands. And the elbows should bend very little in walking.

Basically just look at every joint. The angle formed at every joint should be changing in a smooth curve wherever the joint allows, and should form a smooth cycle for one full walking cycle. Every abrupt change requires energy to change the limb's inertia, but walking has evolved over millions of years to require a minimal amount of energy. The hip should be basically a sine wave: back and then forward, with the change in angle being slower around the time it changes direction. Knee should be kind of a cut sine wave because it doesn't bend forward, only back. So straight, then back, slow, then forward until straight again. Maybe the angle slows slightly before becoming straight, but the knee joint's 1-way nature makes it require less energy to stop its swing forward and become straight, so it doesn't need to slow too much before becoming straight. And because the knee is coming off the hip, the foot moves faster going forward than it does going back because the hip's change in angle adds to the knee's change in angle when moving forward. Right now the changing of right leg's knee angle doesn't have much "curve" to it. It seems almost like a switch: bent at 20 degrees or bent at 5 degrees. It should move gradually from straight to ~30 degrees and back to straight.

That is my guess. I'm not terribly experienced in walking anatomy, but generally things should look smooth at every joint, I figure. The whole goal is to make things look smooth right? Once you do that, hopefully it automatically looks natural if you get the timing right.
Title: Re: Walking Sequences
Post by: v6v on 2012-05-25, 11:49:29 PM
After starting reform on the legs, (The thigh leg ratio was ridiculous) can you review the legs and then tell me if I made a step in the right direction? I made the thigh longer and the (foot) leg shorter.

If everything is alright I'll move towards the upper body.

http://youtu.be/i9cDvpLBo4Q

Thank you.

I was wondering if there was a way to dynamically make the area between the joints smoothed, but I'm not entirely sure that that's in my ability, so I tried to get rid of the harsh outlines and allow the body to move as one single white non outlined blob..
Title: Re: Walking Sequences
Post by: bluemonkmn on 2012-05-26, 05:21:08 AM
The animation looks better, but I can tell there's something wrong with the drawing and overlapping of the knee. It looks like the thigh is longer, but the calf is not shorter, which results in the calf not meeting the thigh at the knee sometimes? Did you have difficulty making the pieces meet at the knee when the leg was bent?
Title: Re: Walking Sequences
Post by: v6v on 2012-05-26, 09:55:45 AM
I'm going to have to directly edit the sequence to account for that, although the graphics are changed, the overall motion seems to be disjointed due to a new gap that I have to bridge.
Title: Re: Walking Sequences
Post by: v6v on 2012-05-26, 10:46:30 AM
Ok, it's redone according to your specifications bluemonkmn

http://youtu.be/qllwzVA4bAI

Tell me what you think please :)
Title: Re: Walking Sequences
Post by: bluemonkmn on 2012-05-28, 02:54:09 PM
When the right thigh swings forward, it appears to go forward, then back a bit, then forward again. Am I imagining things?
Title: Re: Walking Sequences
Post by: v6v on 2013-03-25, 06:43:02 PM
http://www.youtube.com/watch?v=NCHlPN_saFo

Quite proud of this, the first animation that I've made since I remade my animation system to rotate limbs around the center,, took around 15 minutes, animating between key points, any opinions?

It's a stance- I can't decide on a good "default" stance for the characters (The one you would start with)
Title: Re: Walking Sequences
Post by: bluemonkmn on 2013-03-25, 07:22:40 PM
What's the audio in that clip from?
Title: Re: Walking Sequences
Post by: v6v on 2013-03-25, 08:46:56 PM
I was listening to a lecture about Neural Networks, the microphone was recording. :)

http://www.youtube.com/watch?v=AyzOUbkUf3M

Found the link:

It's very exciting, isn't it!
Title: Re: Walking Sequences
Post by: bluemonkmn on 2013-03-26, 05:09:32 AM
I don't have time to watch the whole thing now, but it is very exciting. I was wondering when Google would get back to developing Skynet (they're in the perfect position to do so, and IBM hasn't seemed to do anything interesting since Watson)! :)
Title: Re: Walking Sequences
Post by: v6v on 2013-03-26, 05:25:45 PM
I don't have time to watch the whole thing now, but it is very exciting. I was wondering when Google would get back to developing Skynet (they're in the perfect position to do so, and IBM hasn't seemed to do anything interesting since Watson)! :)


This is something that you'll like if you ever get a weekend alone with Visual Studio!

http://www.youtube.com/watch?v=966b0IgA3DA

It's his take on neural networks in "everyone's favorite language", but it teaches the audience the concepts pretty well.

EDIT: The stance animation wasn't bad, was it?
Title: Re: Walking Sequences
Post by: bluemonkmn on 2013-03-27, 04:51:34 AM
I'm no judge of stance animations, and I don't know what makes one good, or if they can be great, but it looked alright to me :).
Title: Re: Walking Sequences
Post by: Vincent on 2013-03-27, 06:12:03 AM
About the stance animation, I think it could be improved a little by following the head movement.  I'll try to explain what I mean.  If you look at the head movement it is quite even and goes back and forth slowly during the whole animation.  I think the whole body should follow the same rhythm.  I think that a normal stance animation is determined mostly by the attitude of the character (aggressive, passive, panicked, etc) and the breathing.  The attitude determines where the limbs are positioned and the breathing determines the rhythm and the range of some limb movements.  In your case, I think you should follow the head movement, because the stance of your character is pretty neutral.  He doesn't seem stressed or about to attack or flee.  The head movement is pretty relaxed and fits well with what I see.  I think you could improve your animation by making all limbs follow the head movement, which means, pretty slow, even and without a great range.

And about the C# video on neural networks: the guy reminds me of Sheldon in Fun with Flags!!! Haha!  ;D
Title: Re: Walking Sequences
Post by: durnurd on 2013-03-27, 08:06:23 AM
And about the C# video on neutral networks: the guy reminds me of Sheldon in Fun with Flags!!! Haha!  ;D

This.
Title: Re: Walking Sequences
Post by: v6v on 2013-03-27, 10:48:15 AM
About the stance animation, I think it could be improved a little by following the head movement.  I'll try to explain what I mean.  If you look at the head movement it is quite even and goes back and forth slowly during the whole animation.  I think the whole body should follow the same rhythm.  I think that a normal stance animation is determined mostly by the attitude of the character (aggressive, passive, panicked, etc) and the breathing.  The attitude determines where the limbs are positioned and the breathing determines the rhythm and the range of some limb movements.  In your case, I think you should follow the head movement, because the stance of your character is pretty neutral.  He doesn't seem stressed or about to attack or flee.  The head movement is pretty relaxed and fits well with what I see.  I think you could improve your animation by making all limbs follow the head movement, which means, pretty slow, even and without a great range.

And about the C# video on neural networks: the guy reminds me of Sheldon in Fun with Flags!!! Haha!  ;D

If you have the time, can you draw a basic picture?
Title: Re: Walking Sequences
Post by: Vincent on 2013-03-27, 04:29:01 PM
Okay, I'm very bad at drawing.  I won't even try, it's that awful.

So I took a screenshot of your video, cut out the character in segments (I guess it's pretty much how you did it) and reassembled them quickly to make gif animations.  They're not perfect and you can smooth them out (only 3 images per animated gif here), but I think you can get the idea even if they are a little jumpy.  The movement is pretty even all along the animation.  It is subtle and slow in the base stance (relaxed), more obvious and faster in the fight stance (breathing heavily).  See the attachments. :)
Title: Re: Walking Sequences
Post by: v6v on 2013-03-27, 07:30:02 PM
Okay, I'm very bad at drawing.  I won't even try, it's that awful.

So I took a screenshot of your video, cut out the character in segments (I guess it's pretty much how you did it) and reassembled them quickly to make gif animations.  They're not perfect and you can smooth them out (only 3 images per animated gif here), but I think you can get the idea even if they are a little jumpy.  The movement is pretty even all along the animation.  It is subtle and slow in the base stance (relaxed), more obvious and faster in the fight stance (breathing heavily).  See the attachments. :)


My only gripe with the fighting stance is that the hero is looking downwards Vincent, but the rest of the body is in a perfect position, the standing an fighting stances look good otherwise, I'm going to model my next two stances after those.

The first one is around the area of what I need, nothing specific while nothing showing any specific emotion. I'll use the second as a fighting stance, seeing as players like variety!

I really hope I can get people to use my animation program to help me with these once it's out, I'll get a new one out as soon as I finish tuning this wwalig animation I'm working on.
Title: Re: Walking Sequences
Post by: Vincent on 2013-03-28, 06:08:38 AM
I'm glad you liked it.

About the looking downward in the fighting stance: it depends on the style of combat you want your character to use.  If you go for something like boxing, kickboxing or mixed martial arts, the default fighting stance is to lower the head so your chin gets about at the level of your shoulders.  This way round attacks like hooks and roundhouse kicks will probably hit your shoulders or have so little space that they have a hard time reaching your chin.  I could explain why protecting the chin is so important but I think this is not the point here.   ;)  Also, when you fight, you usually don't look your opponent in the eye, unless you want to play some mental game.  You usually look at the chest area and don't focus on anything in particular.  This way your peripheral vision allows you to see leg attacks and arm attacks coming at you.  If you look your opponent in the eye, you are exposed to lower attacks because they are a little out of your vision range.  If you focus on something in particular, your eye will follow this target and forget about the rest.  Ok ok, I'm going too far again.   :P  But anyway, you can trust me on this, I've got 24 years of several martial arts behind me to back it up.   ;)

So, it's just to say that I made the character look down on purpose because I gave him a boxing like fighting stance. :)
Title: Re: Walking Sequences
Post by: v6v on 2013-03-28, 10:15:17 AM
Ok ok, I'm going too far again.   :P  But anyway, you can trust me on this, I've got 24 years of several martial arts behind me to back it up.   ;)

So, it's just to say that I made the character look down on purpose because I gave him a boxing like fighting stance. :)

I wouldn't question any man with 24 years of martial arts experience, well, not without expecting a broken arm or leg afterwards ;)

It makes sense when it's explained! I understand now.
Title: Re: Walking Sequences
Post by: Vincent on 2013-03-28, 11:17:12 AM
Great!  But that doesn't mean you absolutely have to keep your character looking down.  If you think it looks weird, straighten it up.  It's just a game after all.  :p
Title: Re: Walking Sequences
Post by: bluemonkmn on 2013-03-28, 06:34:44 PM
Consider another question - is your character going to be fighting in hand-to-hand combat or not? If not, maybe this isn't the right stance anyway.
Title: Re: Walking Sequences
Post by: v6v on 2013-03-29, 10:42:47 AM
Great!  But that doesn't mean you absolutely have to keep your character looking down.  If you think it looks weird, straighten it up.  It's just a game after all.  :p

How did you put the animated GIF together? I can't find decent software to do this, I would love to share what your poses look like officially in the animation program

Consider another question - is your character going to be fighting in hand-to-hand combat or not? If not, maybe this isn't the right stance anyway.

You have a choice, whether to run or fight, that's what makes the game so fun.
Title: Re: Walking Sequences
Post by: bluemonkmn on 2013-03-30, 06:23:56 AM
You have a choice, whether to run or fight, that's what makes the game so fun.

What I mean is, will it usually be hand-to-hand combat or some other kind, like with a weapon or vehicle or mind control :)?
Title: Re: Walking Sequences
Post by: v6v on 2013-03-30, 02:24:44 PM
You have a choice, whether to run or fight, that's what makes the game so fun.

What I mean is, will it usually be hand-to-hand combat or some other kind, like with a weapon or vehicle or mind control :)?

Arg, I almost forgot, I'll need to remake my animations to deal with weapons, sorry for the misunderstanding
Title: Re: Walking Sequences
Post by: Vincent on 2013-04-01, 03:42:49 AM
Hey, sorry for the late reply. :)

I use photoshop 7 to make gif animations.
Title: Re: Walking Sequences
Post by: bluemonkmn on 2013-04-01, 04:21:39 AM
It's also possible to make animated GIFs with GIMP.
Title: Re: Walking Sequences
Post by: v6v on 2013-04-07, 07:36:27 PM
Okay, so I tried to make a Gif of the entire game, but it was about 27MB. Too large for upload to any major filesharing sites.

http://www.youtube.com/watch?v=y4yNJM7iJp4

Walking, Running, Standing, Jumping (I'm using the old standing animation, I'm going to switch to either of the two Vincent posted)

The running animation doesn't seem to be natural.
Title: Re: Walking Sequences
Post by: Vincent on 2013-04-08, 06:58:49 AM
Very nice!  It looks good!

Since you say the running animation doesn't seem natural, I looked at it and found 2 problems:
1- The "front" leg doesn't extend all the way, when it touches the ground, the knee is still bent a lot at that moment.
2- The motion of the leg going back and the motion of the leg going forward are essentially the same in reverse, but they shouldn't be.  When you run, to bring leg forward (in the back to front motion), you keep you knee bent and your foot high.  The foot only touches the ground when pushing (so in the front to back motion).
Title: Re: Walking Sequences
Post by: v6v on 2013-04-08, 02:14:37 PM
Very nice!  It looks good!

Since you say the running animation doesn't seem natural, I looked at it and found 2 problems:
1- The "front" leg doesn't extend all the way, when it touches the ground, the knee is still bent a lot at that moment.
2- The motion of the leg going back and the motion of the leg going forward are essentially the same in reverse, but they shouldn't be.  When you run, to bring leg forward (in the back to front motion), you keep you knee bent and your foot high.  The foot only touches the ground when pushing (so in the front to back motion).


Vincent:

Followed your advice:

I kept the knee up

Extended the leg out

http://www.youtube.com/watch?v=y8Pgp48fslg

Incredible improvement, anything wrong with the jumping animation?
Title: Re: Walking Sequences
Post by: Vincent on 2013-04-09, 06:26:37 AM
Hey Galaxy!

Oh yes, well done, the run sequence looks much more natural like this! :)

It's hard to tell for a jumping animation.  Usually, running sequence are quite similar because the point of running is usually to reach a high speed and there are not a lot of equivalent and really effective ways to achieve this for a human.  But when you jump, there are many possible goals.  Examples: Are you trying to vault over something while not losing speed?  Are you trying to reach high?  Are you trying to reach a maximum distance?  Do you jump from a running or walking or standing start?  All of these things will affect a jump animation.

For LoK:R I tried to make a jump sequence that would more or less fit with all of this but focus on what would happen most often: which is try to reach high from a running start.  Which is, by pure coincidence, something I do in taekwondo (for jump kicks).  So I had a good idea of the body mechanic behind this jump.  In such a jump, to reach high, you must launch one of your knees very high while the other leg is extended to push from the ground as long a possible...  Hum, it's unfortunate, I can't find a good picture of this.  Anyway, when you go near the apex of the jump, the legs begin switching position: the high knee is lowered and the extended leg is retracted back near the body.  When getting near the ground, the extended leg is not the first leg to make contact with the ground since it is now higher than the leg taht was initially launched in the air.

In your jumping animation, I see 2 images.  One image when going up and one when going down.  The first issue I think is that these images do not really suggest movement.  The image of "going up" should show a position suggesting a push on the ground, the image of "coming down" should be an image of bracing for impact on the ground.  If you could insert an image for the apex of the jump, wou could make a smooth transition between your two jumping images and make more "extreme" stances for pushing the ground and landing on the ground.  In LoK:R, during a jump, I check the vertical velocity of the character.  Whe it is near 0 and the "jump" flag is on, I switch to the jump apex image.  When the "jump" flag is on and vertical velocity is going up but not near zero, I use the push the ground image, and of course, if the jump flag is on but all the rest is false, I use the landing image.

Hey!  I found a video showing a jump side kick.  Of course the landing and the apex of the jump aren't what you want since there is a side kick in it, but there is a slow mo in the video which will allow you to see the initial image (knee launched high and leg extended to push the ground).  From a running start and trying to reach high, I think it's pretty good.

https://www.youtube.com/watch?v=Kai2SSYQ9lg

I hope this helps. :)

Keep up the good work! :D
Title: Re: Walking Sequences
Post by: v6v on 2013-04-09, 06:25:30 PM
Vincent, thank you for the feedback and the motivation.

I will work on tuning my jumping animation sequence.

That will be the next major hurdle that I'll have to jump through (No pun intended)

The videos are useful because eventually, I'll have to animate attacks. Especially something like a flying kick would make a nice attack!

(Off topic)

I was replaying Legacy of Kain: R- I had to ask

In one of the locations, I believe it was a sewer under a part of a castle, you seemed to have done a wavy water effect in that level for the water, how exactly, did you achieve it?

I wanted to do something similar, I see it in a lot of older games.
Title: Re: Walking Sequences
Post by: Vincent on 2013-04-10, 06:13:23 AM
I'm glad to help you!  I can't wait to see your game. :)

There is no rocket science behind the wavy water effect, it's an animation with a lot of frames.  I ripped a lot of content from a SNES game called Demon's Crest to use it in LoK:R.  You can see what I ripped on the spriters resource web site (see link below).  You will certainly recognize some of the stuff in LoK:R.  (Ripping all of this was a project in itself, it took a couple of months to complete.)
http://spriters-resource.com/snes/demonscrest/index.html

You can see the water animation disassembled frame by frame in the "Forest Lake Background"
This web site is very useful to get base material for 2D games, I used it extensively for LoK:R.  But since most of the stuff is ripped from games, you have to be careful how you use it because of copyright issues.
Title: Re: Walking Sequences
Post by: v6v on 2013-04-10, 07:17:18 AM
I'm glad to help you!  I can't wait to see your game. :)

There is no rocket science behind the wavy water effect, it's an animation with a lot of frames.  I ripped a lot of content from a SNES game called Demon's Crest to use it in LoK:R.  You can see what I ripped on the spriters resource web site (see link below).  You will certainly recognize some of the stuff in LoK:R.  (Ripping all of this was a project in itself, it took a couple of months to complete.)
http://spriters-resource.com/snes/demonscrest/index.html

You can see the water animation disassembled frame by frame in the "Forest Lake Background"
This web site is very useful to get base material for 2D games, I used it extensively for LoK:R.  But since most of the stuff is ripped from games, you have to be careful how you use it because of copyright issues.

You're a spriter? That's awesome, I had no idea. (I saw your name on the sheet and stopped: (Wait is that the same Vincent??))

That's the exact effect that I'm referring to, do you mind if I use it for a bit? Until I can try and take a shot at it myself (It might be hard, it looks like 50 frames)

I never really understood if it was hardware that made the water do that cool effect in the older games
Title: Re: Walking Sequences
Post by: Vincent on 2013-04-10, 07:27:58 AM
Do you mean that you saw the demon's crest rips and wondered if it was the same Vincent before today?  :o

Well, I made the Demon's Crest stage rips, but that's all I did.  I did it because I had to do it for LoK:R, so why not offer it to the spriters community at the same time?  So yeah, same Vincent. ;)  But I don't think I will rip anything else just for the kick. :)

Of course you can use the water effect!  It's there for that reason.  I'm very happy to see that my work is useful to someone else! :)