Game Animation Basics: Creating Idle to Walk Cycle Transitions

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] all right so I just wanted to make a quick video on explaining another type of transition animations so if you saw my other video I highly recommend checking it out it goes to the process of creating a transition animation so a walk cycle going into the idol animation transition animations are something that you'll be creating pretty often when you're working in games it's not the most flashy type of Animation but it is really important to have this whole set of like start and stops and going from an idol to a walk or a walk to a run or maybe like an idle to Turning 45° and walking so there's all these transition animations that you need to make and um there's a couple ways you can go about it and I just want to go through the process of one of the ways that I usually create these transition types of animations it's a great way to get something in there really quickly and then you can further refine it as needed so if you watch my other video this is going to be a very similar process utilizing Maya's animation layers so in this scene we've got our characters basic just idle stance so we can imagine this is sort of its resting idle stance if you were to see this in game sort of if you stop playing your character will stand like this and in another scene I have the walk cycle so I've got the character walking and this is what we're going to transition to we're going to transition from the standing into the walking and this is actually the walk cycle that we create in the walk cycle animation master class it's a free tutorial so I highly recommend checking that out on the YouTube channel as well we go through the process of creating this uh walk animation you see here uh so what we need to do is we just need to take all this animation that's in the scene so I've got anot here I have a quick select set to select all of my control curves and we just want to select everything in in the scene or all of the animation actually and one thing to note is if I select my main control let we open up the graph editor um we have the movement that we need so we have the the curve on this Forward Motion Set correctly so you can see we're not getting any foot sliding so this is the speed that we need for the walk so we want to make sure that we take the main control animation as well and we can go ahead and select the copy animation button inside of animbot to copy this animation and the great thing about animbot is that you can copy and move poses and move animations between Blend or excuse me between Maya scenes I've been using blender too much uh but that way we can have two Maya scenes open and then we can just copy the animation then open up this idle scene and then paste our walk cycle in so before we actually paste this animation in let's go to our animation layers I'm going to go to layers and I'm going to choose choose create override layer from selected all right so we've got this brand new layer in here and then this is where I want to paste the walk cycle in so I'm going to go ahead and do paste insert and let that load up and then I can expand my timeline you can see this goes to frame 128 now one thing to keep in mind is that we're not actually going to use all of these frames to create this um idle to walk animation we'll probably want to end it right around frame 48 and honestly that might be too much time for a idol animation into walk it really just depends on the style of game you're creating how responsive you want the controls to feel so this might feel a little bit sluggish and but we'll go ahead and just basically set this to start from frame zero and we want to enter the full walk cycle by frame 48 so we want to make sure we enter the correct speed at frame 48 and this extra animation that I have tagged on at the end this is just going to to allow me to make sure that I'm blending properly from a standstill into the walk animation and then this extra cycle is just going to allow me to make sure that the speed is correct so it's not ending my animation and then suddenly there's like a speed up because I got the wrong speed for my enter or maybe it's really fast on my enter and then it actually slows down getting into the walk because then that would create like a lurching motion so I just have this extra walk tagged on at the end just to make sure I have a nice transition but really we only want this to go to frame 48 so now that we have this override layer in there we can name it if we want I honestly typically don't name my layers but I'll just call this walk and I want to go go to this weight button I'm going to hit the select or insert a key right there and then I'm going to go to frame 48 I'm going to hit that key button and then so I've added a key frame at frame zero and added a key frame at frame 48 for this this weight value I'm going to go to frame zero and I'm going to zero this out so now it's using all of the information on the layer below this base layer which contains just my idle pose so now what we're going to get is that you can see that through this weight blending it's blending into the walk animation through 48 frames so it's taking 48 frames to get from my stop into the walk now another thing that I want to make sure that I do on this main control is I want to make sure that I go over here to animation editors graph editor I want to make sure I just continue this curve with an offset basically an infinite amount this Forward Motion so I'm going to go ahead and go to Curves post Infinity Cycle with offset we can do pre- Infinity Cycle with offset as well so it's just going to continue that forward motion the next thing that we want to do is I'm going to open up My Graph editor again and I'll go ahead and just drop this in the actual UI here and snap the graph editor there and I want to take a look at this weight value so typically when we're creating this blending of the override layer and we're blending from the idle pose into the walk cycle we have just this basic uh S type of curve this slow in and then slow out and then this straight curve in the middle which basically means we're slowly starting the transition the curve straightens out which means the transition gets quicker and then it slows into the last key frame which means that gets slower so it's basically we're getting a as far as our space in goes we're getting spacing really close together at the start so it's slowly starting this animation with that straight curve it speeds up the animation the spacing gets further apart and then it slows down again at the end so we're getting this sort of like jerky motion into the walk and then you can see the extra animation I have tagged at the end will give me a good idea to feel how this transition actually feels going into the speed of the Walk cycle that we have so you can see it doesn't really feel right it feels like this walk walk cycle really speeds up and then actually like lurches and slows down right as it gets into the actual proper walk cycle past frame 48 so one thing that we can do to fix this is kind of just mess around with this curve type and see if we can get a better transition so usually I'll try something like this and I'll bring this curve up like that and create this sort of long sort of arcing curve and we can play this and something like that already is starting to feel a bit better you can see as it goes into the rest of the Walk cycle which is what we want so frame 48 is where this animation we want this animation to end we don't want this to be a really long idle to walk cycle blend transition animation which honestly 48 frames might be too long we probably could maybe try to shrink this down into like one step going into the walk cycle but we'll go ahead and just keep it like this for now but already that's feeling better we don't have as much as that strange like lurching motion going into the rest of the Walk cycle it feels like it's stopping the animation is ending at frame 48 at a proper speed to where it feels like it kind of just naturally transitions into the rest of the Walk cycle so already that's looking quite a bit better now the next thing that I want to do which might seem a little bit strange but it does give some free animation I guess you could say is if we take the translate Z value the forward motion on the main control and we actually bring this down a little bit so we're actually moving this translate Z value back just a little bit and it's hard to see and we actually can't see what's going on because we're on frame zero and the weight value is set to zero so we're taking all the idle pose so I'm like moving this a crazy amount and then I just realized there's I can't see what I'm actually what I'm actually doing doing until I jump to the next frame so let me actually jump to frame one where it's starting to blend into the actual walk cycle so I'm going to bring this way up here and I'm going to go into a negative value not by a whole lot like this and we can see how this feels so because I've grabbed the entire translate D curve and I've actually moved it to a negative value at frame zero once it actually starts to blend into the walk cycle it's going to give us this slight motion backwards and this is honestly probably too much movement backwards so I'm going to grab this curve and bring it down again just a little bit still definitely feels too much it might actually bring it down a little bit more so what that's giving me now is that as it starts to blend it's giving me this slight kind of like movement anticipation backwards before it actually starts moving forward so it might be a little bit too much and I might bring this back up just a little bit so we get this like little bit of movement backwards on that the start of the animation almost like this little bit of kind of anticipation moment for it all right so the next thing that we need to do is make sure our foot plants are working properly and we can do this really easily with an and if you don't have animbot um you can check out my other video on how to get a tools which is basically an older version of animbot that has a lot of the the functionality of animbot um but it's completely free um so if you don't have animbot I would check out that video and get that downloaded because it does have something similar to the tool I'm about to use and we need to fix basically just the sliding that's happening so what we can do is grab the X form copy this world space copy basically and let me actually go to I think frame 32 and I'm going to extend the leg back and I want to see basically how much extension I can get with this back leg and that it still looks correct because we need to take the value that the foot is at right here I'm going to copy it I'm going to go to frame 31 paste it 28 paste it 24 paste it 20 paste it and this is where it'll start to get a little bit tricky because we've got a pretty big jump between here and then where it actually plants so I'm going to move the foot out a bit and we can have like a little bit of sliding into that pose should be fine but I really really want to fix this transition here and we can turn on the arc tracker here to make sure we're getting kind of the animation that we want on the foot so I'll probably bring this foot up here a little bit a little bit higher keep it up through this portion maybe bring it out probably keep it up right here and then I might actually probably need to bring it up a little bit earlier too to make sure I'm getting a nice decent path through there so something like that should work so we basically had to just adjust this footstep just a little bit to make sure it works properly going into the actual walk cycle through here so that's looking okay and we'll need to fix this here too because you can see it's shifting back and forth even though these two all these key frames are matched up in between is not so one way one thing we can do to fix this like a quick way is I'll just go and apply this pose through the rest of the frames there to keep it locked so once it plants it'll lock there and then I'll probably need to tweak this pose a little bit to keep it further back something like that so what I want to do now is take a look at this foot at the beginning I want to make sure it's locked so I'm going to copy this and I'm going to paste it so using that X form copy here to copy and then paste through all of this to make sure that this foot is staying planted probably through all of this as well and looks like there's a little bit of foot roll happening so I want to zero that out through all of this it's got a little bit of sliding right in here so I probably want to copy this this looks like it's happening just in between here so I'm going to make sure I paste that value between those key frames to lock it and then it quickly pops forward so I'm going to take the key frame on 24 and probably favor that back just a little bit might swing forward just a little bit too fast too so something like that and we're just trying to tweak the foot steps at the very begin of the animation to make sure they're working decent and I think I want to tweak this one right here so we're going to probably need to do something similar to that so basically we're ending this transition at frame 48 so this is where it's actually blended into the the walk cycle animation and then we've got all this rest rest of the animation there just to kind of see how it Blends so I'm going to take this value here because I know the foot needs to be right here as far as how much forward it is in the translate Z space so I'm going to copy this with anobot I'm going to jump here and paste that value at frame 44 paste that value at frame 40 paste that value at frame 36 and then this is where we're going to have something similar where we might need to tweak some of these poses in here to get what we want and there might be a little bit of sliding going in into it but like this can probably be lifted up and let's see I might be able to move this forward just a little bit I'll probably actually add a key frame right here just to clean up this path and that Arc something like that and then we're going to need to so these key frames there's no movement but the inet we're getting the shifting around because the actual main control is moving so I'm just going to frame by frame that and make sure it's locked right there same for these inet and there's like a little bit of Shifting but I think that's probably fine that's not too bad and again this is just a a way to get a really quick kind of start for this type of transition animation there's obviously a lot of time we can spend really tweaking this transition like through here I would probably start like adjusting the hips just a little bit for this step to make sure we're not getting some weird hyper extension I'll I would probably go in here and adjust this foot roll and tweak that a bit same for this one right here this foot roll coming in this probably should be up a little bit more something like that but this is just a good way to get the the sort of basic start for this transition animation these override layers allow you to get some of that movement for free so we have that little bit of anti anticipation backwards kind of for free the foot plant we kind of got most of that movement for free just by blending and then we had to kind of adjust the the actual foot plants and make sure they were staying kind of stationary through there uh there's one thing I want to tweak here this swings forward too fast just try to clean up that Arc a little bit all right so now that we've got the feet kind of moving how they need to we now need to make a few just basic adjustments to the actual up and down motion of this so what I can actually do is just go to this walk layer and I might start kind of tweaking some of the up and down motion so here I feel like it's going down too early so I'm going to maybe continue that movement up a little bit and then it'll drop down maybe reduce the amount it drops down just on that beginning key frame might go to the translate Z the forward motion on this and I might adjust this through some of this right in here and just tweak this value just on this layer and maybe get like a little bit of forward movement because right now the hips might be moving back a little bit too far so we might have taken that main control back a little bit too far to get that little bit of anticipation for free but we can adjust that and bring the actual hip control forward just a tiny bit just CU I want to make sure it doesn't feel like off balance because it was like a little bit too far back so something like that and then I'll probably delete this key frame just to ease in to this movement there something like that and we're getting a little bit of a hitch right in here so what I'll probably do is grab this key frame and just ease it for a little bit longer it's looking okay there's still definitely some things we would need to tweak this is definitely not kind of like a polished transition but it is you know a quick way to get some basic movement in there so what I want to do now is grabb the root control add a new layer and then I'm going to tweak real quickly kind of just some side to side movement so here I need to get the hips over that supporting leg more so it kind of starts this transition like that and then around frame 23 I'll probably zero it out and that feels like that's actually too far over so I'll probably lessen that shift to the side a bit and then maybe through here I'll zero it out to where it is by default because I again I want to make sure that at frame 48 I'm just keeping that exact same walk cycle pose I can't really tweak this pose at all because this is the pose that actually transitions into the walk I'm going to make sure this is set to Auto tangent there we go so there's just a little bit of like tweaking to the side that we need to do that might be too much and too fast so I might add add a few more frames to that transition and I'm going to just go ahead and throw another layer on this route and do another little bit of tweaking so maybe at frame 12 I'll just I want to kind of lean character forward a little bit more maybe add like a little bit more rotation to the side through the start of this animation so he kind of like leans just a little bit more forward and kind of brings because his left arm is the one swinging forward kind of brings that shoulder down and kind of leans toward that direction just a little bit at the start so kind of just basically getting his body involved in the movement then I'll go to frame 29 hit this button right here to reset this value back to its default so we've got like a little bit of just leaning forward and then it kind of straightens back out and kind of just pointing his left shoulder first into the walk to kind of get the momentum to start and again looking at it from this view I'm gon to take a look at the path and probably clean this up a bit something like that and actually have a kind of a mock game camera imagining If This Were oops I don't know what happened to it let me jump to perspective uh what is going on with this thing oh there's key frames on it shouldn't be key frames there we go um I just have it constrained to the main control so imagining as this if this were kind of like the third person camera and typically if you are working on like a third person game you'd have the actual you could have the actual like camera in Maya the third person camera so that you can actually look at your animation to see what it's going to look like from the perspective of the player so Imagining the player you know slightly pushing forward on it on their controller to initiate the transition from a stop into a walk and then this sort of blend that we have here so it actually stops at frame 48 is where it actually enters that walk Cy full walk cycle pose um and again it might be something where stuff like this might me might need to be an even faster transition so maybe it just really needs to get into that cycle within like a second or less so in that case we'd probably um have the stop here and then it would need to basically enter its walk cycle pose Within this first step almost so it's basically just taking from its idle pose from this step from this stance and then it would just be like in the walk cycle pose right here if you wanted to create like a really quick transition this is something that's like a little bit more natural but this is how I approach this kind of stuff again there's still a lot to tweak there's still like a little bit of like lurching I feel so I definitely need to go in here and like find tune that that blend just to make sure it feels like a as much of a natural transition as it possibly can because the great thing about this when you are creating those transition animations is that you as an animator have like complete control on how this transition feels and making it feel natural or making it fit uh the gameplay needs uh versus just using a straight you know animation blend that a game engine might give you you actually have the ability to go in here and find two in it so it's always great to spend that time to make sure you're getting it exactly how you want but this is usually how I approach it just a override layer and just tweaking the weight value adding some layers in there tweaking the the foot position and we've got this on that main control so if I just mute this wouldn't have that forward motion and we can kind of see you know the basic blend that we're getting kind of as it's doing it sort of like treadmill type of walk into the the transition so yeah hopefully you found this uh helpful um if you did please leave a like And subscribe and comment if you have any questions or suggestions uh for any other videos in the future so thanks for [Music] watching
Info
Channel: Mark Masters
Views: 5,845
Rating: undefined out of 5
Keywords: game animation basics, creating idle to walk cycle transitions, transition animation, walk cycle animation, maya animation layers, game animation techniques, game animation workflow, game animation process, game animation tutorial, idle to walk animation, game animation tips, animating game characters, creating transitions in game animation, animation blending, blending animations, unreal engine, blending in unreal, maya tutorial, animation tutorial, maya basics
Id: 4QO1IWKNIfc
Channel Id: undefined
Length: 24min 13sec (1453 seconds)
Published: Mon Jan 22 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.