How To Create a Walk Cycle in MotionBuilder

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome to another video this video I'm gonna show you how to turn this 1300 frame mocap clip into a perfectly aligned and looping walk cycle ready to use in a game engine or crowd simulation so the first thing we need to do is look at this walk down a section where the characters moving at a constant speed so if we control shift and just jump forward in the animation till she starts walking so we look here what you don't want to use is this first part the animation where she's actually building up the speed or the last section of the animation where she's actually slowing down to stop so why actually happens as you character be slightly leaning forwards when she sets off walking or should be leaning backwards which means when you loop you'll get this sort of wobble interaction so we want to be using it's a section of animation in this middle bit where she's moving at a constant pace the actors sort of hit their stride they're in their natural rhythm for walking so for this clip I'm actually going to use this second pass so if you look at her arms in the second pass you can see there's a much more even swing and a left and right arm as if you go back to the first pass and just watch a walk can actually see that hit better in there ctrl F in to the front view if you watch her right arm she doesn't really swing it very much so most of swings in her left arm should be looking this right you can see the left arms really swinging but the right arm doesn't swing very much so as I said before we don't want this first part where she's first starting to walk as you can see should be leaning forward to build up speed so we want is when she's hit a natural stride so maybe somewhere from around here so if we say 900 and then at the other end we don't want to be getting this where she's starting to slow down or thinking of slowing down just start to slightly lean back in the walk and change the stride length so let's call that a thousand we put that on loop playback so now what we want to do with fan our section of animation that we're going to use so we need to do now is found two points in this walk where the characters in the same pose so I like to use is left leg planted right leg passing so if you look at the signs you can see what I mean so in a typical walk you have a contact pose this passing pose where one legs going past the other and then another contact pose see eventually using this passing pose is when you come to blend this animation you can use all these frames while the foots off the floor and only blend around one point if you've got two feet in contact with the floor when you try to blend you're gonna get this funny unnatural looking skating the feet will be a lot more foot slide whereas if it's just one foot you're aligning with it's much easier to blend and rotate the character on there the other advantage of using this passing pose is if I control a to show the skeleton it's easy to find a point where the cats in the same position or we can do is we can use the alignment of these two ankles to find the same pose later on so you say this is 9 3 9 then we can scroll forward to our next step and look for the same position here so I got 9 6 9 so that's going to be too far forward it's gonna be too far back so I'm going to take 9 6 9 use that as our end pose then we can control F ctrl F again into a back view you can see our character walking towards us so we look at this now this gives us a good idea how much work it's gonna take to get this animation to loop so you can see here there's a nice even swing on both arms the only slight problem is this pop between the first and the last frames if we use control a home and control end we can see poses very similar apart from that slight shift screen left and if we control space you can play through you can see the timing on the feet and the arms pretty even so there's no major pops or changes in speed so she'd be pretty straightforward to loop so doing this check now gives you a good idea of how much work it's going to take to turn this into a walk cycle so if at this point you're looking at the animation and there's there's a lot of difference between the first and the last frame you might want to go back and look through the animation and find another point that you can choose to loop so going back through the animation now and looking for a section of loops nicely can save you a lot of editing time later so I'm happy with this section so now we're going to come down here to story and use this to create a clip of animation so we're gonna insert a character animation track and select our Jess character in a right-click and select insert current take so that's going to give us the full frame range so you can it a to select all we want to clip this take in a story tool so that matches a frame range in the transport controls so to do that you've got a couple of choices we can either select and drag this and snap it to where we are at the moment or because we know the last frame is 969 we can double click this top number you change that to 969 that's our frame range it so rather than leaving this start value at 9:39 we can double click it and set that to zero that's going to shift our take back down to start at frame 0 now if we right click in here we can do frame start end that's going to frame our start and end frame in the transport controls so you can see now our animation starts at 0 and ends at 30 the start frame is dependent on the project you're working with so if you wanted it to start at warm you could just change this value to 1 and reframe the take and it'll shift everything along but for this tutorial we're going to leave it at 0 so looping our cycling animations like this are usually used in game engines or fork ran simulations so to make the animation more friendly for those kind of systems what we usually do is Center them in the scene and then I line them to an axis so for this tutorial we're going to Center the scene and then we're going to line a down positive set so if we turn on ghosts what they shows you the characters start position and end position during by this line now this line doesn't show you the actual path of the animation although it looks like it because we've got a straight walk if I character step to one side halfway through this animation then step back across this line is still show straight because it's actually showing you the position from the start in the end and then just joining that with a line but he does give us as a way of seeing where our characters actually aligned so you can see here she's not aligned on an axis and she's pointing down the wrong one so to fix that we gonna double-click our story clip which brings up the asset settings so the first thing we need to do is reset this loop offset translation value this gets generated when you first create a clip but when you trim it like we've done here and change the start value to 939 this doesn't get updated so what happens is when you try and rotate this it's actually rotating from the original start position of the animation which is what we don't want I just don't do that so what we actually want is for it to rotate around this point in the animation so to get it to update if you turn off Auto calculate loop and turn it back on you'll see all these values change now calculating this offset from the start of the clip so if we turn this clip now you can see it's actually rotating from the characters start position so what this means is we can actually put in values in here and align it exactly down an axis the motion builder set to zero as positive x so what we want is positive Zed if we change this to minus 90 you can see a Clips actually aligned down positive said sort of Center it in the scene we can change these two clip offset translation values to zero that centers that character in the center of the scene now we can see I kept two now starts from zero walks forward down the Zen axis so you can close this so once you've got the animation trimmed and aligned using story the next thing we're going to do is copy this to a new tape editing the reason we doing this in a new take is to make sure that we preserve our original animation so that we can always go back to their source mock-up if we need to so we're set to new take we don't want to copy the data because we're actually going to use the data that's in story so you're gonna know this is going to give us a 150 frames in that timeline so we need to do is right click on our story clip and doing frames start end so it frames our animation so you can just make sure that's still playing back correctly and then we can come up into character controls and use bake plot to control rig just tick that to bring up the options box the thing we're going to need to do is create a FK i k control rig then we're going to plot um frames at 30 frames a second we're gonna use the unroll rotation filter to make sure constant ki reduces turned off and hit plot that's going to plot all our animation onto our control rig most important thing to do now is make sure you remember to turn off story otherwise you'll be editing your character control rig and you want actually see the changes happen in the viewer cuz it'll still be using the animation on the story now we got story turned off you can go to animation layer one first thing I'm gonna do is come to this first frame we're gonna correct the pose on this first frame so I usually do is go through the different views and just look at the character in each view and see I can improve the pose the first thing we're gonna do is post these fingers you can just select all the FK fingers and hit R then we're gonna use f5 to switch to local going to perspective view and just zoom in on those fingers so you can just rotate these instead just to relax a little bit and then do select one of the fingers just wrote take the others and the next thing and the next finger then we can look at rotating this thumb a little bit more of a bend it and if you want to we can come in here and just slip these individual joints just to give us more control over the fingers you can just bend the other one we can all up to step back up the hierarchy just bend that out slightly and use a whole up again just to drop this finger down is to give us a slightly better relaxed hand pose so take this around and control a just a highly August that we can see the mesh just rotate this in slightly just to get a nice relaxed sort of hand shape so now I'll switch over to the other hand just pose that and exactly the same way you select all the fingers and rotate them instead zoom in on that and then deselect each finger in turn just curl these fingers in slightly and we can rotate that thumb around into position then same as before we'll just step just select the other joint just to give it a little bit more control over which jointly rotating in the thumb he was a relaxed hand pose on that side so next I'm gonna check is what the character looks like from there right so we can see here this legs slightly bent so mind is just slightly translate these hips up in Y in global so I'll just hit f6 to go into global mode and just straighten the hips up slightly so it legs a bit straight on this passing pose if we look at this head it's slightly tilted forwards so I'm gonna do is use e to lock the rotation in the head but this allows me to do now is I can push this back but the actual alignment to the head stays the same just to straighten that neck up a little bit so me think we're happy with the pose you're gonna control e we're just gonna frame our character up and I'm gonna create a pose and reason I'm friendly up in the viewport is when you create a pose down here you will actually take a snapshot of it so you might as well take advantage so that we know what this looks like if you select any of the effectors and just hit create that's going to give you a post so you can see it create a little thumbnail so we know what it looks like and we can rename this to walk loop pose and then we're going to switch to full body mode and we're going to set a key on animation layer 1 so now we can go to the last frame and we're going to apply our pose when it comes to patient of pose in MotionBuilder you can align a pose with any jointly you have selected so for the walk cycle we're gonna use the hips so that means is if we look in that F curves window and the base layer for the hips what we're going to do is keep this momentum for the hips so that the characters traveling at a constant speed and then we can fix any slight adjustments in the feet so the reason we don't use the fetus if she's taking a slightly longer or shorter stride it might affect the speed of the character what you really want is that constant motion that you were looking at when we first chose this section of the animation Sophie we can fix because they're only going to be slight differences but what we want is that nice constant speed that we're going to get from the hips so we're going to select our hips and the control rig I'm going to switch to animation layer one down here we're going to use the pose matching options so I'm going to make sure we match in translation 9x just in Zed we don't want to match the rotation of the character we want the rotation the character to come from the pose and then we going to use gravity kiss to put still on the floor so you can either then click paste or double-click pose you can see the character pops into position I'm going to set a key so now if we control F into the front view if we play the animation back you can see now our animations looping nicely so looking at this now one thing I might changes this arm it's quite far out so to bring that in rather than applying poses one of the things you can do is come back down here to the base layer and select our FK skeleton they are to go into rotation then f5 to go into local rotation we can see Y is going to bring this arm in so if we select the Y Channel frame all we can right click select all and we can click between these two white marks and just slide this up that's going to bring this arm closer to the body and nice thing about MotionBuilder is you can leave that plane while you're actually adjust in this so you can see now even while that's playing it's still updating so you can just bring that arm in just so it matches a little bit close to the body so it's similar to the other side so rather than creating layers and offsets you can actually just edit the original base layer animation by what I only use that for small adjustments like this I wouldn't make any big adjustments and start deleting keyframes off yet keep the original keyframes this is just for minor adjustments like this where you literally just sliding keys around we switch to the right view look at the translation on the feet on the first layer you'll see there's an offset so what's actually happening is the feet are going to slide along this point so we need to do its make sure this adjustment happens when the foot isn't on the floor so starting with a foot we've got selector which is the passing foot we want to hide this adjustment while the foots off the floor then make sure this section here where the foots on the floor who stays planted and then any adjustments happen again when she lifts a foot up you can see here this is foot sliding along the floor so we're gonna do is switch back to body part mode we're going to take this frame where the foot just contacts the floor I mean a zero that position and then we're going to move through the animation to where a foot leaves the floor which is here and then we can zero that back so now we have this section where a foots on the floor and it stays nice and fixed then you can see the adjustments actually happen and if we look in the F curve you now you can see the adjustment is actually being made here while I foots off the floor so we can hide that positional change while our foots moving so now we can do the same with the other foot so this one actually starts planted so what we need to do is keep this offset position until she lifts the foot off the floor and then we need to apply the offset from the end when the foot hits the floor so we're gonna do is we're gonna right-click this keyframe and copy and then we're gonna move down to where a foot leaves the floor yeah and we can paste that so now if we look in the translation we can see that position stays constant so now that's where our foots moving so now we want to take this last frame copy that and then paste that where a foot hits the floor here so now you can see this for it's going to stay constant here and the transition is actually happening over these few frames here while I thoughts moving so that actual motion in the animation will hide the transition or the adjustments that we've made so now you can see she got a nice planted flop here what comes up off the floor the adjustment was made and then the foots nice and planned to the while she's on the floor so if we look at that in the front view you can see these footsteps are nice and solid there's no sliding around if we look in the side view if you pressed Janna keyboard and then just left click and move your mouse slightly to the left you can jog the animation we can just see that foot stays nice and locked to the floor another way to check this is if we come into the navigator and go to our character you can come down here into modifiers then there's an in-place mode and we can lock the sub translation because we know our characters moving down Zed so you can hit that and now when we play gives us our character walking on the spot then again we can hit J just cycle through that just to see that the animation is playing and then it's looping correctly so now you can rotate around it and check it from all the different angles so when she done with that unless you want your character to be animated on the spot remember to untick that so that you character starts translating again so if you just come into this right view its prey my character control hates to go to the first frame we can control left arrow key on the keyboard just to step through our animation and just see how that's working what we want to check now is the adjustment we made earlier to lift her hips up hasn't causes any hyperextension not pulling in the legs so if we slowly go through this see there you get that nasty sort of click and this leg just looks slightly pulled back this is because our hips are too high so one way to fix this is to go back into our F curves and look at their adjustment we made on the Y translation where you right-click and select all then we zoom in press F to zoom in on this now you can make some minor adjustments on this just to bring the hips back down slightly so if we find one of those frames where the legs starting to lock out here you can just come in here and just drop that back slightly just so this leg doesn't pop quite as much as it is doing so the next thing to check now we've made sure there's no pulling as the foots lifting off because as the foot comes in contact with the floor so here we have a nice straight leg and as the weight transfers forward it bends so it gives us a nice sense of weight on that leg but if we look at the left leg that comes through here we don't get a straight leg it stays bent and then on this contact it's still bent so we lose some of that weight so I might do is remove this contact point to here so if we delete this key if you leave the time slider where it is you can select a keyframe and use control-c control-v on the keyboard to copy this key onto this frame and then I'll just come back - so here the leg should be straight so if I zero that now you see we get a slightly straighter leg if you want it any straighter what we can do is in local translation we can just right-click in there and just change this value slightly just to get a slightly straighter leg keyframe that make sure that pass imposes to the okay just zero that out so now we've got a nice straight leg here and then the weight comes down and matches our pose that we've already got if we just take that off now play that back at half speed you can see you get our nice straight leg it carries that weight through we can control he back into the perspective view you come back down an hour into a character and go back down and lock that was that translation and we can just look at that walk and check it from different angles just make sure it's okay there's no more hyperextension or funny pops this is important if you're gonna be using this in a game for example you want to be checking it from the camera that you're gonna be looking at it from and again we can just come into that right view we just want to make sure that the feet are still nicely planted on the floor there's no foot sliding when you happy with the walk animation you can come back up into our character controls window where to bake plot this time we're going to bake to skeleton same settings as before we're gonna plot on frame 30 frames a second unroll filtered turned on and plot so it's going to plot our animation to our skeleton joints ready for export and it's going to turn our control rig off so now we can just play that back and then we just want to check that from every angle just to make sure that it's playing correctly you want to be really good we can change this to half speed and just play that back and right view and control our again to look at it in their left view most importantly we can control F into the front view look at that in the front view just make sure it's looping there's no noticeable pops it goes from the first frame the last frame you can also control spacebar to stop the animation and use control home and control end to jump between the first and frames just to make sure they are exactly the same if you happy with the animation the last thing we need to do is come down into takes so we can rename this Jess walk single step loop none and then we can copy this file name and then use that as our file name up here save save as we can call this Jess walk single step loop version one and save that now we want to make sure we save all elements save all animation save all settings and we're gonna say both takes as well just in case we ever need to go back to that saw smoke app to edit our take later and we can hit save am I done thanks so much for watching of this is giving you a few ideas tab to your own workflow if you have let me know in the comments below don't forget to hit that like button and subscribe if you aren't already and I'll see in the next video
Info
Channel: mocappys
Views: 4,155
Rating: undefined out of 5
Keywords: MotionBuilder, motionbuilder, motionbuilder tutorial, motionbuilder tutorials, motionbuilder 2019, motionbuilder 2019 tutorial, mobu, MoBu, motion capture, mocap, autodesk motionBuilder, animation, mocappys, motionbuilder story, motionbuilder story tool, walk cycle, walk cycle tutorial, motionbuilder pose tool, motionbuilder pose controls, motionbuilder story mode, motion capture tutorial, mocap tutorial, motion editing
Id: pVr5Al8Qiu8
Channel Id: undefined
Length: 26min 44sec (1604 seconds)
Published: Thu Aug 01 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.