Unreal Engine 4 Tutorial - Retargeting

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone and welcome to this episode of ue4 tutorials this episode is a bit special because it was voted for by my patreons and on my youtube members so thank you everyone for supporting me and voting for this video in this video we're talking about retargeting uh what it is and how it works and most popular use for retargeting is using a website called miximo if you don't know what miximo is it is adobe's uh animation piece of software online where you can upload your own models or use their own ones to get animations for free now these animations you can download for free and import them into unreal however there some work needs to be done in order to be useful so what we're going to do today is go through the process of retargeting those models onto animations provided by epic so here i have already imported in my maria model here so if i open this up and this is from mixamo and now all i've done is just imported it not done nothing else to it okay and we want this one to be replaced with these mannequin okay so using the same animations this mannequin's using but with maria instead so let's go through how retargeting works and accomplishing this so the first thing we need to do is take a look at our skeleton so this is the maria skeleton now the way these targeting works is it takes a look at the bones of one skeleton looks at bones of another skeleton and maps the bones together now this is important that it is additive not a simple replacement so we have to do various things towards our skeleton first of all in order for it to work with retargeting and not look weird so the first thing you need to do is open up your skeleton for one of your meshes here i'm starting off actually let's start with the mannequin uh so let's go in here so i start off with the mannequins uh animation skeleton and you can see it's all here okay and we need to do is go to your retarget manager now this could be a tab here it could also be this button up here and if that button's not there you can also go to window and select it from the list all in all once you get to it you need this retarget window to accomplish what you want to do so on here we're going to change the setup rig for our skeleton here so at the moment it's got no rig and the rig is sort of an in-between it's how we communicate between one skeleton another because skeletons are named differently they're structured differently and these are important factors so we're going to go select rig and here you'll see the top select humanoid rig now this is good because it sets us up with a template that we can easily follow once do that hit the auto map button and unreal will automatically map the bones of this skeleton to the sources of our rig now because we're dealing with an epic rig and an epic skeleton these are going to match no problem okay they should all be the same once you've done that hit uh close that and then save the skeleton there and that's the easy part done next we're gonna go into our mix mode character go into their skeleton on this one we're going to go to the target manager but this one's a very different one because if we look at our bones here they're named very very differently from our mannequin of the uh skeleton mannequin mountain mannequin skeleton there you go get where's that one so here we have uh say root pelvic spine one spine two spine three you've got hips spine one and two okay so we need to do some work here to retarget this to the same rig so again we go to select rig and choose select humanoid rig and although the sources are the same their targets won't be now what you're going to do here is simply to change it to auto map and then we have to go around and manually change every single one of these to match now if you're working on miximo one common thing that we see in mixomo skeletons is the changing between the hips and the root so typically on a ue4 animation you want the root to be in between the feet however mixed mode puts the root at the hips which is not ideal but we can work around that so what i'm going to do in the target manager is change the route here to hips and then on pelvis also change it to hips i'm then going to go around to all my spine one two three and go around all of these and make them all the same so bear with me and i'll edit this bit out so you can have to sit here watching me do this okay so i've done the first page you then want to click on show advanced and you'll see all the ones for the various fingers so in here we're going to go around and do the exact same so i'm going to cut this bit out so you don't get to see this boring part we just go around do the same thing and link up the index uh first joint for the left hand and we'll carry on as such see in a moment okay now that's all done we've got here all the fingers lined up uh the twists are set to none and if i scroll down you'll see everything else is set to none for the twists and iks anything i've done here is for the left ball of the foot the left toe base and the right border foot i've done right toe base but you go through and if it's not there you choose none especially for iks and things like that you don't need to worry about okay when you've done that we'll close the target manager and hit save on the mesh now as i said this is all additive and it has to match as best as possible with the pose between each mannequin so here we've got maria here in a classic t-pose however the ue4 mannequin itself is in a pose so what we need to do is change the poses here to match as close as possible so what i'm going to do is go to my ue4 mannequin go to the re-target manager and i'm just put tab this just here so we'll be looking at the manage retarget base post section down the bottom here and what we need to do is select and change the skeleton's pose here to match as close as possible to our maria here so let's go to this and on the upper arms i'm just going to raise this up to a t pose like so and do upper arm left raising it up like so um let's check out everything else out so the hands they look okay everything else looks okay there okay so we can see how this works so once you've got it posed correctly you go to re-target manager and go to the bottom manage retarget base pose then you go to modify pose and use current pose when you've done that this is now the current default pose so hit save and then close up okay so the next step is to duplicate the assets by retargeting so let's go to our mannequins animations which are here and we're going to just do the idle first of all i'm going to right click on this and do retarget anim assets and you'll see the option for duplicate anim assets and retarget click on this and you should get a new window come up in this let's get in window select the maria skeleton and on the options here for new asset name and all sorts here you can rename it and we change where it's going to be sorry going to be placed so in the folder here i'm going to click change and put in my mixer asset click ok and we're going to leave it as is and leave it as the old name so click retarget and now we've got the third person idle animation set to a mixer mode character here so when looking at this we can see the issue that is sunk in the floor now the reason why it's sunk in the floor is because miximo assets do not come with their root in the correct place unreal expects the route to be between the feet so it's treating the hips here as between the feet so to fix that we go to the skeleton and we look at the re-target manager again and we will make the route equal to none not hips so once you've done that we hit save and close that close that i'm just going to delete this um because we redo it go to the mannequin animations and do the idle again so retargeting assets duplicate choose your maria skeleton and there it appears choose a location where you want it to go and then click retarget and now we've got a much better retargeted animation excellent okay so that's just one animation what about the whole lot well if you go to the content for the mannequin you'll see that you'll find the third person and mbp this is the animation blueprint we can also re-target and duplicate this so right-click re-target admin blueprints duplicate and retarget choosing maria change the location where you want to go and hit retarget and now we've got the nmvp the idle run blend pose the jump i've got a second idle we don't need that we'll give it that now sorry done the idle and we've got all the others here going on as well so let's now attach that to our player character here so i'm gonna go to edit third person character and then we go to the mesh and we're going to choose our mario sk and in we're going to use our mbp i renamed mine in the cut there just so i know which one it was hit compile and now play test that game so we've got a t-pose but if you walk around you can see the animations now move just fine um the thing we want to fix those the t-posing so why is that happening let's take a look at what's handling the t-pose and that is this third-person idol one so if we go in here and take a look what's going wrong so here we've got the idol blend pose here has got the issue where some of the animations have not ported over so here you can see the idle run now it's deleted because i deleted the duplicate so i'm just gonna replace that with the original and now we've got the fix there play and now we've got the full character from xmo running and jumping with the epic unreal skeleton and that's it so for example if you make your own animation or your own skeleton okay but you want to use the animations from epic you can just use the same process we just used right now if you are doing the other way around so say you want to have the manikin use someone else's curtain it's exactly the same process except you're retargeting the animations of the um retargeting the mesh of the mannequin to match the other target skeleton but the process is generally the same the main thing you take need to take into account is that you fill out those uh the rig association correctly and secondly make sure the pose is correct if you're finding some weird issues and bugs with the way it looks check out your pose check out your links to the rig and make sure they're all accurate that's usually where you find the issues if you have any other questions or you want to see more about retargeting leave a comment below be fascinated to see what you guys come up with and what you'd like to see next again thank you to all my patrons and youtube members for their support in especially voting for this video thank you again once again once and all if you want to see more content before anyone else head over the patreon.com forward slash brian laylee where donation just one dollar will get access to more videos before anyone else thank you again everyone for supporting me and if you haven't yet subscribe to the channel make sure hit that subscribe button and as i said if you have any questions or comments or want any uh future content um suggestions leave a comment below and be always interested to see what you guys want to see next thank you all for watching and i'll see you all next time bye
Info
Channel: Ryan Laley
Views: 75,490
Rating: undefined out of 5
Keywords:
Id: Io76DagpS-8
Channel Id: undefined
Length: 12min 45sec (765 seconds)
Published: Wed Oct 28 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.