UE5 Blending Animation Sequences in Sequencer for Cinematics or Game Use. #UE5 #unrealengine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video you're going to learn how to take multiple animation clips and blend them together smoothly and also if you want output them into a single animation such as this this is made up of multiple clips Blended together and output and reapplied as a single source so let's jump in so we're going to start off with a standard third person game template and let's go ahead and go over to miximo one of my favorite sources as you know the techniques you learned today though can be used for any kind of character with any kind of Animation metahuman mannequins anything you import it'll all work the same we're going to grab this guy the racer so go to your characters tab type racer and select this character and we need to download in the t-pose so t-pose fbx download now let's go get three animations that we want to blend for this particular character so go over to the animations tab let's start with a run and we'll do the fast run now in previous videos I may have mentioned to check the box in place however I want to show you something else kind of related and I probably need a dedicated video talking about root motion which I will do one of these days soon but for now don't check this box and download and we do not need skin because we just downloaded the skin with the t-pose character and you can leave all these at defaults and we're gonna have our character go from a run into let's go with some sort of uh hmm jump is there a jump where he rolls let's see how about a uh let's do it with a roll there we go from a run to a roll so we'll blend into this guy right here all right and then download that without skin and then let's have them after his role it's going to go into a spin kick do we have some sort of spinning kick let's go out of flip spin kick here but he already kind of does a flip so let's have him do after that land let's have them do maybe this high kick here whatever whatever you want to have them do oh you know what no it kind of does a little weird moving around thing I want to be kind of not step sideways because he's comes out of kind of a running tumble so let's do uh what's this one look like all right we can trim off the front part of that which I'll show you how to do and then we can have him land and do his spinning kick I think he's spinning the other way so let's hit the mirror button here and that way he lands in the same direction he lands when he finishes his other second motion so we'll go with this if you change your mind in the future it's totally easy to do and you paid nothing so nothing lost all right we have our assets here let's bring them into our unreal session so what I'm going to do is I'm just going to make another folder here called miximo and you can you can just bring in your characters like this so I'm going to drag from the browser Tab and you get to pop up here I don't have a skeleton that I'm assigning this character to I want him to bring in his own character so I grabbed this is actually important I grabbed the static t-pose asset first and I'm bringing it in you'll see it says it's a skeletal mesh and I'm going to leave everything with the defaults I'm going to leave import animations check because I'm not really importing animation I'm just importing his tipo's character and import I'm not worried about these errors it just has to do with the tip of the fingertips and his head where the joints and weighting is so don't worry about it just clear that and close that so here is our t-post character inside here I'm going to make another folder just call it MS this is where I'm going to bring in the animations I could have brought it in the same folder but it gets a little messy so let's grab these here you could do these all at one time but it's also handy for me to just drag it from here so I'm going to do them one at a time and this time because it's an animation and remember we chose without skin so it needs a body and a skeleton to Target so we're going to aim it to the poorly named ch20 non-pvr skeleton that's our eraser and import all or import there's our kick here's a run to roll pick your character if you did import all we're only importing one thing so import or import all does exactly the same thing at this point I'll hit import all just to prove that and then finally the other one is the fast run also bringing that in so now we have our three animations and our typos character so let's get our character into our scene so I'm going to grab the pink which is the skeletal mesh frame on this character and let's start assembling our Blended animation first we're going to need a level sequence just out of habit I like to make level sequences in a folder called cinematics and this is five one now so previously in earlier videos the level sequence was under the animation menu but now it's been moved to the cinematics menu so you want to go to add a level sequence technically you can also come up here and add a level sequence but then you have to tell it what folder you want it to go to I'm already in the folder where I want it to be so I'm just used to doing this way I'm going to hit F2 to rename this and I'm going to just call this my Anon blend level sequence you can call it whatever you want double click to open up the sequencer and let's get our character in here add a track actor to sequence our character and let's start putting in our animation so the first animation was the run so fast run now here's one of the important points to pay attention to so if I hit play and my character runs right and then stops that is because this is a single animation a cycle let's pull out this cycle and let's talk about what happens so if I go back to the beginning here and I hit play many of you have brought this up in comments during the zero to 60 Minutes short tutorial and what's Happening Here is it gets to the end and goes back and gets to the end and goes back and that's related to in in that video I'd mentioned check the box to have the character running in place notice how the animation is actually on the character not the top level of the hierarchy of the character if you look here the location of the character is technically not moving this point right here all the joints underneath that skeleton are moving but not the top level joint so that's kind of the difference between what in place and not in place has to do with it so let's talk about one way what if what if let's put this back to the first Loop if between here and here we had enough animation that we were fine with just this amount and we were going to go into another move that'd be fine but what if we want them to run farther and then go into his jump so we need more than just a couple steps well you do see what happens if we pull this out and just keep stretching it it keeps popping back to the origin so this is the first trick we want to look at this is how to blend the same cycle to make it continuous we want to play out the full cycle stop at that position add that same clip again and don't stretch this one but add another one so hit add animation another fast run and this is different than just pulling out the other one now as you work through here you'll see the effect is the same but we technically have two separated clips now what we can do is go to the second one select it right click and we want to go to this option here match with this bone in previous clip now you can pick any bone you want actually so let's take a look at where the character is landing now in theory any of these bones you would think would work so maybe the hips you want the hips to continue or the this foot to continue what it's saying is when you get to this Frame here match that bone on top of the next bone let me show you what I mean so select this second one right click match with previous and let's try that let's try the hips so I turn on the hips and now it it took where the end of the hips were in this first one and continued that same position and offset notice how far he is from his original place because we're told them to pick up where the first one left off so let me just use the rocker buttons here so now I'm clicking through here so now what's happening is I'm taking these two identical clips and there's really not any blending per se going on at this point because they're just butted up into n but it's kind of like a relay race where the character is taking that position of the hips and copying that information and giving that offset to the next clip to continue from again notice the difference here it's nice and smooth versus what we had before and what happens is when you get to the end of this one he's going to pop all the way back here if I was to extend the second one we're back to the issue we had before he's going to jump back to where he started from now this this whole clip is continuing to have the same offset that we set from the bone matching so he's going to have that same offset however if we need even more of a run when you do the same thing again we would add another run offset it there drag it there and we'd have to do the same thing right click match with previous the hips worked fine so we're going to go with the hips and now the third one is working fine so what I'm able to do is take all three of those clips and continue and offset by matching the bones to the previous clip this is working better now than I've seen in previous versions of unreal so I'm kind of liking this method a bit especially for what we're trying to do make a single extended animation out of all this so I'm going to delete that second one there and this is where I'm going to attach my next animation of the tumble I haven't set my middle Mouse yet let's do that because it'll drive me crazy otherwise editor preferences and type middle and check that box all right ah much better okay so let's go to the end here now here we are going to do some actual blending plus bone matching let's first see what happens with no blending we're going to add the run to roll and you'll see what happens is he jumps back to start at where his original position was from this second run let's let's understand exactly what's going on here so this clip here this run to Rolling clip is starting at the end of where this second one looped back to its starting position remember the second one's starting position is actually here because we did the bone match from the first to the second so this right here is the position of the second Clips starting point so when we get to the end of it and we say let's start another clip it also starts at this place so what we need to do is do another bone match on this third clip to the previous clip so we're going to right click let's try hips again it's going to kind of depend on where those animations line up so let's just give it a go we'll try hips and let's back up a few frames and forward a few frames now you see he's planting his right foot but the animation of the next clip has him pushing off of his left foot one thing I could have done is gone back to miximo and did the mirror output so that this is his right foot instead of his left foot but let's see if we can fix this anyway if we how much of a blend do we have to go through there so he's finishing running he's got a bit of a stretch to go but we'll give it a go let's see what happens that's what the whole purpose of blending is uh might be a stretch of this but uh let's give it a go anyway I'm going to take this third clip and shove it into the first let's give myself a little more so let's see how much we can get away with so by taking that third clip and ramming it into the second clip now we're starting to blend the animations so let's see what happens he's running his right foot is coming forward and let's pull back a little bit here and see if this is going to look terrible or decent she's got a little bit of a slide there on the right foot it's actually not that bad I mean if it's moving fast two notices it's you know it's just for fun you can fine tune these kind of things as much as you want that's why I'm not an animator I don't have the patience to fine-tune stuff I can just show you how things should be done and then you can spend your time doing all the detail that you want so he's got a little bit of a rush there going but that's because he's moving and then doing the blend so you'd have to finesse that a little bit but it's not that bad it's not that great but it's not that bad showing you the technically so we are running forward and then you see emotionally smooth drop into the roll there right so then does the roll let's get some more space here continues his role see how else you do after that gets up plants his left foot and continues to start running now let's try and drop in that third type of Animation that's technically our fourth clip but we want it's the third final installment of our combo here so let's do animation what was the last thing oh yeah the kicking so he's going to come out of that roll and then do a kick and you'll see he goes back to all the way back to the starting point of this one so let's do another bone match on that character right click match so we're kind of again handing the Baton to the next character the next clip and let's again try with hips see how well that blends if at all all right so as a straight cut he's got quite a shift from one frame to the next so that is expected because they're not gonna be in the exact same position so we have to do some blending again so I'm going to pull this up to the same level and push it in a few frames and let's see he is looking the opposite way of where I would have expected so it comes up and does a little wacky spin there so let's try this might be where sometimes the bone matching goes a little wacky let's see if we pull this back out let's look at the feet and see if we can do the feet so the left foot is facing that way and he's stepping off of it and the left foot of this one oh that's what I was going to do too was show you how so he's kind of let's look at it here so he's got his left foot planted and his right foot is about to swing around now if we look at the end of this one his left foot is planted and his right foot is swung around so let's do a little trimming of the clips and see if that helps us a little bit here let's so let's let's try and do a handoff right here where the right foot is about to pass through the left foot and where is that we'll say about here and so what you do is you right click on the second one you go to edit and trim section left so see it says trim section at current time to the left keeps the right so if I now drag this back over here it goes here all right so ignoring the bone matching is not helping us here but let's at least look at the motion here so the right foot of this this earlier clip it's already passing through from the left I'm going to actually back up and put them right so their ankles are close let's double check though oh it's already stepped over here a little bit so let's all right maybe we're fine about there you can do the same thing here let's just for practice I'm going to go to this other one right click edit this one I'm going to trim to the right just takes off that one little extra frame there just to show you how to do that all right so now they are not handing off the Baton very smoothly here so let's try something else let's go this clip here sometimes this is just a little bit of experimentation so I'm going to right click go to match bone and turn off matching and then he goes way the heck back over there which is fine and we still need to do matching let's try with a different uh different clip let's right click or a different bone let's go to this one we'll try the left foot because his left foot is planted in both cases and hopefully this will pull the foot around in the other direction and let's see where we're going to find left foot left foot all right so that snapped this character hopefully to match that one let's roll back and forth see what we get well the foot is in the right position which is good because we've still got to do some blending so right now we're just snapping between the two what what I like about this is as I roll forward watch his left foot it's more or less in the same place and when we do the blending that's going to smooth the rest of that out so let's take this clip blend it back into the previous one a little bit and now roll through there oh that's looking pretty good I mean you know good enough right so let's go full speed all right let's play the whole thing and see what we have let's get a little more camera space here where's he start starts all the way over there all right back to the beginning and play oh he's he's got some smoothing to do in that transition doesn't he um wow yeah he does for sure he gets a little quick through there so let's see if I can fix that briefly he just does a two a little more of a slide here then I'd like I know I said I don't like Aesthetics but I can't quite Let It Go with that so let's see if I can pull out some of this blend space here I'm going to take these two let me try and get a little bit out of that let's try it again I still got a slide going there how's this one looking oh it's not looking bad hmm might have to if I wanted to really fix this I might go back and download that second clip the running to the roll and put on mirror so that the feet are matching a little bit better that's what made this one kind of easy is you know he was coming down on his left foot and then in the next one he was starting on his left foot so it was kind of easy to blend through there because his feet were already lining up in this in this second transition here I'm really switching from a character landing on their left foot to their from the right foot straight to the left foot so there's going to be a weird little glitchy thing there I'll leave you to go do that if you'd like I've I've showed you the tools to use now it's just a matter of putting them together just right so again if if you're doing the exact same thing you want to try it just run back and grab this clip but check the box that says mirror we did that for that third clip I should have done it for the second one too I wasn't paying attention to the foot Landing so mirror watches see he starts on his left foot but if I switch and turn on Mir he starts on his right foot so it just mirrors the animation from one side to the other so it looks like I should have done that for the second one but you know that's the way things go when you kind of freestyle a demo but that's right it gives you a chance to learn something I may not have talked about the mirror button that much otherwise so now you know that one really well if you're doing animation or if you're even using this for games maybe you want to hit a particular button on your keyboard in your game and have your character do all these things as a run tumble and kick as one big action or maybe this is an action that you want to use on other characters and you don't want to have to rebuild this every time that you work with this character so what you can do is you can take all of this here and create a new animation based on what you've done here another thing that's nice about that is say like in my case right now I think it's okay but I want to do some more exploring but I don't want to mess up what I've done so I want to it's a kind of a way to save what you've worked on and be able to reuse it later without destroying all the things you've put together so what you can do is right click on your character go to bake animation sequence and choose where you want it to go let's put it in my atoms folder and I'm going to call it my combo Blended anim and I'm going to export it I'm not going to mess with any of the frames or all this kind of stuff it's fine so export and now I have a fourth animation for my character so back in the content browser I'm going to make another level sequence so that I can test out this new animation so coming in here I have my character and he's here in the level and let's add him to my new level sequence oops I missed him here that's okay I can grab him here and let's go to animation and let's add our combo Blended anim and here you have it if you have Press Play You'll see it's one complete animation cycle and he's doing his funny slide there and then a roll and then a kick so that is now a new animation if you go to content browser and look in your animation Cycles you can double click and open this to inspect it so this is the full animation of all three of those Blended together and again you can go back and tweak the original if you need and output another Blended and you can keep playing with that and finessing it as much as you need but that in general is how you can combine animations now I'm using miximo but you can use this concept with any animation cycles that you have I just like mixing mode because it's quick and easy to grab characters with animation to show you these things so the key takeaways are that we did the back in the um this other level sequence so back in the original one the two main points to bring up again are using the bone matching again right click match bone with previous clip find one that works for you and then also animation blending by shoving the two into each other to get that overlap and we also went over how to take a animation clip and trim it if you recall right click go to edit and then you can trim to the left or trim to the right based on where your current playhead is right so if I come in here and put it right there right click edit trim to the right cuts off everything to the right so that's really handy when you're trying to take motion that you've gotten from a library and you just want to use a part of it so you can just trim it and use what you need like I mentioned eventually I'm going to get a video talking about root motion how mix mode doesn't have root per se how you can run it through blender to get a root although there are some a little bit of some Hang-Ups on that process I'll try to show all that and how to address it when I get a chance but until then hopefully you can get some good Blends going here before you go watch some more videos on learning unreal once you take a break and catch this classic stop motion from my son Dexter and then come back and learn some more unreal hopefully you found this useful throw note in the comments if you have other things you want me to go over I'll try and get to those when I can as well cheers everybody
Info
Channel: 3D Education with JC
Views: 41,364
Rating: undefined out of 5
Keywords:
Id: DN6B7rJ5Mps
Channel Id: undefined
Length: 27min 10sec (1630 seconds)
Published: Sat Mar 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.