How to use Root Motion Animations in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody how's it going welcome back to the channel in this video we are going to take a look at another way so I already did a video about this to do root motion animations now if you don't know what rib motion animation is got a video right here that you can go watch is actually the previous video that I did on this same subject but done in another way it was a little bit more complex however I did explain um the basics so just go to that video so this one it's not as long now what I'm going to show you here is this now this is an animation from an animation pack called um clay C and impact and one of the things this pack has in many packs that you can find on the marketplace is they have root motion animations and promotion animation is not only important for video games but it can be important for when you're doing uh animation short films or whatever here and Unreal Engine the reason for that is because otherwise you will be the one who has to move the character forward or backwards or whatever Direction the character is going and it can be a little bit painful and can take you a long time to kind of nail the timing for it and sometimes you end up with a slighty foot is it has happened to me before so Sometimes using root motion animation well it says sometimes all the time using root motion animation is the better case if you have them with you now the issue is because they have translation you can see that my animation is going forward and then when I jump into another clip of that same animation it just goes back and it stays in the same place all the time however if you look at this guy right here you can see that he goes forward all the time and these clips are exactly the same as these clips however there's one slight difference that we're going to talk about in this video so we're going to turn this room animation to this one right here and that way all the pain and suffering that I used to get from having to translate the character in the direction of movement goes away and animating my cam my character using animation pack is much easier alright let's start from scratch now all I have here is uh this is actually from the Lira project if you want to use that that's fine um sure you'll be wondering why if I'm in five I'm using the default mannequin from ue4 and the reason for that is because this particular animation pack was from the uni4 mannequin and if I do this method with the UE with the ue5 retargeted it crashes like it crashes every single time that I do it but I'll show you a way around that later in this video for now I just want to show you a method it's super easy so all you have to do is you grab your mannequin here and you add it to sequencer as you would uh we already know about sequencer if not there's a playlist on the channel where I talk about sequencer and how to use it next thing we're going to look for the animation that we need so let's say run forward so this one right here okay this is the one that we were using before so let me uh hold the key of alt and duplicate it around three times now what we're gonna see is that my character runs forward and then goes back to the origin point to avoid this instead of doing what I used to do which is uh move it forward then translate the origin then move forward again that used to be they just take a long time so we can do now is and thanks for epic for pointing that out on a stream is you just position yourself in the second clip and then just match a bone to wherever the previous one was so in this case I'm going to choose the football the left foot bone this one right here and all I have to do is right click you see there's an option here that says match with bone in previous clip so what this is going to do is it's going to take this position and add it as an origin for the common clip that way we don't have to do any translation it will just keep moving forward so we right click make sure this is taken because if you have this one checked and you do this right click sometimes it doesn't work I don't know I always have to have this one uh clicked and right click match with this bone in previous clip then let's just look for the left foot and there you go so now when it goes into the second clip it keeps on going it doesn't return back and you can see it does return back in the third clip so if I select this one and right click and I match the left foot so foot l you can see that now he goes through the whole thing all right and we can do this thing with several animations so let's try another type of Animation here let me go to my atom pack and let's do a jump animation I think it's a jump roll let's do jump rope front root let me see if this one's the one that I want to do okay this one looks fun now let's use this one I'm just going to control C so I can locate my animation a lot faster I'm gonna position my scrubber here Ctrl V here's our animation and now as you can see it goes forward if it goes forward all the time and then here he goes back we don't want that now what do we need to do we need to match one of the bones and what we're going to do is we are going to match the left foot okay that's the same so if we go here make sure this one's selected match previous clip does it always have to be the left foot absolutely not you can match other bones and just experiment with this so I'm just going to select the left foot and let's see what happens now let's see what happens if we play the whole animation he goes forward and he jumps now it's not super smooth because there should be some blending here and then he does that but hey we didn't have to move him at all this time and let's just for test sake let's just blend this a little bit and see what happens if we go all the way here we can actually blend this it's maybe too much but I don't know just for testing sake uh that may be too much let's just do very tiny blending like so there you go he rolls and he keeps going and because he keeps going we can actually grab is or this root animation from the beginning I'm going to place it here right where this ends and let's give this a try and let's go with left foot and let's see this whole sequence play so he goes he does that and he goes to the other side oh that was really fun okay so that was that was funny let's just add a that movie Forward animation run over root okay so if we add it here he keeps going let's see so in here okay we cannot match the left foot because and here's here he has his right foot forward so we may have to start from here and we go back here uh without any blending there you go so let's say he's here okay let's in this cage let in this case let's just match the right foot I'm just going to move this match with previous clip let's go all the way down foot R let's see what happens there he goes and now now he does move slightly so this isn't a perfect solution but he keeps going forward which is great and this way we can actually add another animation but it can play from the whole clip FWD root there you go let's add this one here and let's match the left foot and then it does this there you go and of course it's not going through this slope because why we did remove this but let's just see the whole sequence I put my scrubber here we're at one 117. there you go position ourselves as zero let's play this animation and he does that and keeps going so again there is no movement forward like we used to do and we're mixing various animations and you saw me using various different bones this is a cool way of doing this now like I told you in the beginning this tends to crash if I were to retarget the animation first and then use the mannequin from ue5 now if I want to use the mannequin from uf5 because that's what I would use if I was using meta human what I need to do is uh once I'm happy with the kind of Animation that I want I would bake this whole thing and then I would retarget it so let's just do that so just right click onto your mannequin we're going to bake animation sequence and we're going to save it to I don't know I thought I had uh let's save it here and let's call it UE mannequin and in RTG for retarget underscore full okay make sure it's in the folder uh on all of this I usually leave everything on I've never turned off anything it's for an animation let's open where's my character there you go there is the character just doing the things that we assigned the character to do and it goes from the center of the universe so it goes from the origin has nothing to do with the coordinates that you had on the viewport so you don't have to worry about that as you can see whenever the animation starts he starts from the origin all right so the animation is good now we need to do is we need to retarget that animation so it works with um our mannequin from ue5 so I'm going to do is go into characters this is the Lira project this comes with the retargeter um if you're not using the lyric project what you will do is go to add feature content pact and just add the third person pack that should do it that should give you what I'm going to show you right now so I'm going to go into mannequins rigs and as you can see we have a bunch of things here I'm just going to double click this one and I already had the mannequin from The Classy animation package just to show you what you should do is once you are here usually you're not going to have this view you're not going to have the two mannequins like I do um what you should do is go to content in this case I'm going to go to classy and impact which is where this was located I'm going to go and grab the character from there and I'm going to drop the character from here ask the source because the source is where the animations are generating from and the target is where you want your animations to go to so why my animations to go to Manny from ue5 now I dropped this one here and from this you have to switch from ik mannequin to ue4 ik mannequin now if you see me in this case it's because I have the liar project and Lira project came with one and I just added the one from the third person just to see what happens it's exactly the same so just choose whichever if you are in Lira project already you don't have to do the third person thing and apparently I had the mannequin from before so just to show you the difference right now I just cleared the mannequin that I had right here if I throw in the mannequin from the atom pack uh classy and impact just throw it right here you can see it populates with all the animations from the pack so I'm just going to control C control V the animation that I just generated I just copy and pasted the name of it and if I double click here you can see that our friends are doing the animation together now because it's retargeting that looks fun when they do it together anyways uh what I what you have to do after that is select your animation click on export I'm actually going to put it in the same folder and we're going to add a prefix I'm gonna do ue5 underscore oops that's UE there you go ue5 underscore and we're going to export it out and there it is our animation now if we go back to sequencer and we add the other mannequin and just browse through it real quick skeleton browse for what it is there you go mannequin now we're going to just position him here add him to sequencer [Music] now the ue5 mannequin it's a little bit different especially if you grab the one from the Lira project it's probably gonna pop up in the animation mode and the one from The Lure project does have a control ring so what I'm going to do is I'm going to delete that control rig because if you've seen my previous videos if you have a control rig the animations will not work because the control Rick is the driver in this case so I'm just going to delete that and I'm going to add an animation and I'm going to type the name of the animation right here and as you can see it lasts exactly the same as this guy so they will go together to do the animation you can see um they do go and they run in the same direction however I think the ue5 mannequin is faster so he's probably trained a little bit more he's a little bit more fit than the ue4 mannequin that's probably why you see how he goes a little bit faster in here but uh yeah you got your animation in there just like you do and this is how I would be doing my animations now let me show you a third part of using this and how I would actually use it with a motion capture suit all right now what we have here is my trusty pilot from the short film that I'm making and uh hey thanks for sticking around and I'm gonna show you how I am going to use this for motion captured animations uh animations that I've done with my motion capture suit that are not particularly loopable the benefit of the marketplace assets or any asset pack that you buy or at least the ones that I recommend from the marketplace animations even though they have forward translation there they are loopable and predictable so you can actually select the bone and your animation will always be correct like you saw in the beginning however there's a little bit of a glitch an issue with animations like this because I wasn't going for a loopable animation however I did want to use this animation for kind of like a longer walk instead of just ending it right here so what I did is from the animation that I captured I kind of trimmed it down to where he puts his right foot here actually let's just do it here so he puts his uh right foot in front and we're going to trim it and just have to move the clip a little bit forward right there so left the front and plant it I'm going to leave it there I'm going to trim that animation all the way here and the reason for that is because that animation ends with his foot planted here so it is sort of loopable but it's not a perfect Loop because again I wasn't going for that and my arms and feet are not exactly in the same position usually loopable animations have had some sort of treatment in Maya or Max or blender or whatever to make it loopable so I'm just going to put it here all the way as you can see you can use this box forward all right a little bit slower because you know it's just exploring but I want to use this as a further walk forward so what I'm going to do is I'm going to grab this animation hold alt I'm going to duplicate it and again when I put it back to back when he ends here he goes back to where he was in the beginning just like the other animation now what I'm going to do is I'm going to get my scrubber right here I'm going to save in case this thing crashes he hasn't crashed with me so far but now that I say it's going to crash it probably will but let's see now let's expand our red flag all the way down to here and what we're going to do is put the scrubber here right click match this bone where we need the right foot in this case so here it is foot r and let's see how this does so let's start right here because the animation is a little bit slow and he keeps going but I don't know if you saw it there's a little bit of a hitch here because again this isn't loopable animation so I'm showing you the little issue right here you can see there's a slight change in position that being said because I'm doing this for a short film there is such a thing as movie Magic so all I have to do is apply some movie Magic in this very particular frame and he'll just keep going and this way instead of me creating an animation for the whole length that I want him to lock then all I can do is duplicate this animation do this method and he'll just keep walking forever and ever alright everybody that is it for this video thank you so much for sticking all the way through thank you to my patrons as always a shout out to level two patreons here on screen um you can subscribe to my patrons down in description below if now you can join the channel if you prefer that there's also the thank you button and if not then just living a live and leaving account for the YouTube algorithm goes a long way follow me on Twitter Instagram there's a Discord if you have questions and I'll see you in the next video
Info
Channel: MR3D-Dev
Views: 16,704
Rating: undefined out of 5
Keywords: unreal engine 5, unreal engine, root motion, animation tutorial, root motion loop, marketplace animation, unreal engine 5.1, motion capture animations, 3d animation
Id: -bBsv0km768
Channel Id: undefined
Length: 20min 48sec (1248 seconds)
Published: Tue Dec 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.