Retargeting Animations in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everybody and welcome in this lecture we're going to learn how we can retarget animations in unreal engine 5. now in my multiplayer shooter course i show you how to do things the old way but now unreal engine has a new way of retargeting animations and it actually is quite a bit better so we're going to cover how to do that in this lecture now what we're looking at here is an unreal engine 4 project this is the unreal learning kit games starter pack that you can get for free on the marketplace i show you how to get that in my course and you'll see that i'm open here to a folder called anim's starter pack this is another pack free on the marketplace that contains shooter animations and these are rigged to the epic mannequin this is the old epic mannequin as most of you well know there's a new mannequin in unreal engine 5 but this asset pack has all of the animations rigged to the old mannequin but that's no big deal we're going to work with that so we want these animations retargeted to the unreal learning kit games skeleton so this guy right here and we're going to do that in this lecture and then later after we take care of retargeting these animations we're going to get some animations from mixamo and we'll use the same process now the new way is something we have to do in unreal engine 5. so what we're actually going to do is get these animations into our unreal engine 5 project so i have them all in a folder here called anim starter pack and i'd like to migrate this over to my unreal engine 5 project so what i'm going to do is right click on my anim starter pack folder this is just the folder that contains all the animations and i'm going to select migrate and allow it to migrate everything here and that includes the mesh and the skeleton and it looks like my skeleton may have a preview asset on it we don't really necessarily need the preview asset that's from the military weapon silver pack i can uncheck that and click ok and i have a copy of my project created i'm going to go ahead and go into this copy of my project right here go into my content folder select that folder and migrate all of these animations over and now i'm finished with my unreal engine 4 learning kit games project now i'm going to go ahead and open up my unreal engine 5 project this is the blaster project that we're creating in the multiplayer course and we have the unreal learning kit games character here and now we should have in assets and animations the animstarter pack with these animations and again they're rigged to the old epic mannequin so now we need to retarget these over to this character here and to do that we use a new type of asset called an ik rig we need to create an ik rig for this epic mannequin skeleton here and once we create this ik rig we can then retarget any animations from this skeleton over to our unreal learning kit games skeleton now before we do so i'm going to show you something real quick here i have a fresh unreal engine project this is the third person template this is the new one now you don't have to go and create this i'm just opening this up to show you now we have the new mannequin you can see it looks quite a bit cooler and it's sleeker more smooth everything looks great and i'm going to show you something in this third person template project here in the third person template project the new character in content characters mannequins rigs there's this rigs folder we have these assets here and one of them is called ik mannequin and if i hover over it we see that it's an ik rig i'm going to double click on this now this is an asset that we can use to retarget animations and you'll see that over here to the right under the ik retargeting tab we have what looks like a list and if i expand this a little bit we'll see that in these different columns we have some things now the very first column says chain name which indicates that each of these are chains these are ik bone chains and they each have their own name and they have a start bone and an end bone as well as an optional ik goal now ik stands for inverse kinematics and it's a technique used in both robotics and animation now this particular ik rig has goals it has a goal for each hand and a goal for each foot now you can move these goals and you'll see that the skeleton moves along with it but it moves along with it in a very natural way you'll see that the elbow bends the correct way and it looks like it would look if you took someone's hand and you just moved it you know grabbed it moved it in a particular direction and that's because this particular ik rig has something called a full body ik it's a solver now solver means it's solving mathematical equations that it has to solve in order to calculate where to put the bones from the starting bone to the ending bone in this particular chain you'll see that i'm messing with the left arm here and here under chain name if we look at left arm we see that the start bone is upper arm l and the end bone is hand l and so that's the bone so those are the bones that are moving whenever i move this hand goal now that's not something we need to set up to retarget animations i'm just showing you that this is part of the new system here and this particular ik rig can do this because it has a full body ik solver we don't need to set that up but just showing you now these chains these bone chains are created for all of the main parts of the skeleton that matter when it comes to animations we have chains for the arms we have chains actually for each finger as well and chains for the legs parts of the spine the neck and head and so on now this ik rig allows us to retarget animations because of these chains and if we get some other skeletal mesh that has its own skeleton it doesn't have to be the same skeleton we can set one of these up for that other mesh and create chains in that other mesh that have these same names and that way when we retarget animations unreal engine will know which chain to associate from this skeleton to the other skeleton when we retarget so again you don't need to create the third person template i'm just showing you that it has an example of an ik rig and how we can set it up so in this video i'm going to be opening this up to show you that i'm using this as a sort of guide when i create an ik rig for our skeletons that we're using in this project so the first step in retargeting animations over to our unreal learning kit game skeleton is to create ik rigs one for this particular skeletal mesh and one for the old epic mannequin so the first thing we're going to do is create an ik rig for this character the unreal learning kit games character now again don't worry if you see things here that are not in the tutorial series at this point i'm coming back to you from the future to show you this so i already do have animations retargeted because i've done it using the old way that we do in unreal engine 4 but i'm going to show you the process here in unreal engine 5. now since we need a rig for this character we need to decide where to put it and this particular character is in the learning kit games content that we migrated over so that's going to be in learning kit games assets characters character mesh and here is our mesh now we're going to use the sk epic character not the epic character optimized although these use the same skeleton so it doesn't matter if you choose one over the other but we're going to use the sk epic character now i'm going to go back out one level into the character folder and right click to make a new folder and call this riggs and here in riggs we're going to make a new asset we're going to right click go to animation and select ik rig now we need to select the skeletal mesh this is interesting it creates a ik rig based on the skeletal mesh and i'm going to choose sk epic character and i'm going to call this ik underscore blaster so this is the ik rig for our blaster skeletal mesh let's go ahead and double click that and open it up and we can see the skeleton with all the bones here and what we need to do is create chains for each of the main parts of this skeleton and that's a big reason why i have this project open this third person template because i can take a look at the main chains that we need to create in order to retarget now the ik rig for this new mannequin here has a lot more chains than we actually need you'll see that we have twist bones and metacarpal bones and we actually don't need to use those when we create our ik rig so we're going to go through and create the main chains for our new ik rig now the first thing we need to do here in our ik rig is set the retarget route and if i come back into the mannequins ik rig in the third person template project you'll see that the pelvis is set as the retarget route we're going to follow the example of this and set our pelvis here as the retarget route so we're going to right click on the pelvis and choose set retarget route this just chooses the root bone for retargeting and transforms each of the bones in relation to this root so this is sort of like the origin for the skeleton now we need to make those chains as we can see our fresh ik rig has no chains so what chains should we add well once again going back to the third person template project i have open again you don't need to have this open you can just follow along we'll see over here in the chains that there is a root chain and its start bone is the root and its end bone is the root so we need a root chain and to do that we're going to right click on our root bone in the hierarchy and select new retarget chain from selected bones and when we do that we see the start and end bone and we can name this and we're going to name it root with a capital r and click ok and now we see the root here and if we click on it we'll see that the root bone is highlighted in green so that's our first chain now we can sort of work our way down a bit here we have next our spine bone spine one through spine three and here in the third person template project if we scroll around we can find that spine it's all the way at the top actually and it's start bonus spine01 and the end bone is spine o5 so in this new mannequin there are more spine bones spine bones one through five but in our learning kit games character we just have spine bones one through three so even though there are less bones we can still set this as our spine chain so i can select spine01 hold shift and left click on spine03 to get those three bones and right click and select new retarget chain from selected bones and name this one spine with a capital s they're all going to be capital now let's click ok and if i click on this chain i see those bones on the character highlighted green so there's our spine chain now again in the third person template there's also a head chain and its start bone is neck one and its end bone is the head so in this skeleton we see neck o one to head is a chain with three bones necco one neko two and head in our learning kit game skeleton however if we scroll down and look for the neck and head we see we only have neck 01 in head so again we have less bones here but we can still make the chain so we're going to right click with neck o1 and head both selected new retarget chain from selected bone and call this head and click okay so now we have our head chain okay so looking back over here again i mentioned that there are lots of chains here we don't actually need all we really need to do is map the main chains that we need in order to get retargeting accomplished successfully so one of the main ones that we're going to need are the clavicles so scrolling down i can see that the left clavicle and right clavicle are chains with a single bone clavicle l for left clavicle and clavicle r for right clavicle we're going to follow the example so let's go ahead and find our clavicles first i have clavicle l i'm going to right click new retarget chain from selected bones and i'm going to call this left clavicle and click ok and we'll do the same thing for the right clavicle so i'm going to find clavicle r create a chain and call this right clavicle and click ok so there are the clavicle chains now we need the arms now looking at the third person template again we see the right arm maps the upper arm r all the way down to the hand r and highlighted in green we can see those bones let's make our left and right arms so i'm going to scroll up and find my upper arm l hold shift and select hand l right click and make a chain and call this left arm and click ok and i'm going to scroll down and find upper arm r hold shift and select hand r right click and make a chain and we'll call this right arm and click ok so there are the arms now the only other things we need are the fingers and the legs so let's take a look at those so here we see that each finger is done individually if we select our left pinky here and we can see the bones here and the start bone is pinky 01 l and the n bone is pinky 03 l and we can see those bones here in the hierarchy as well and the name is left pinky and this convention is followed consistently for all of the fingers in the hand so we have left pinky left ring left thumb and so on so we can go ahead and create all the fingers in our ik rig and we'll start at the top so up here at the top i see hand l and just under it are the index bones o1 through o3 i'm going to highlight those three bones right click make a new retarget chain and call this left index and click ok and next we have the middle i'm going to select those three and we'll call this one left middle next we have the pinky we'll get those three and we'll call this one left pinky and we next have the ring finger we'll create this one and call it left ring and finally we have the thumb we'll create this one and call this left thumb and click ok so there's our left hand we now need the right hand so under hand r we have the index finger first we'll get those three bones and call this right index after that we have the middle we'll get those three we'll call this one right middle next is the pinky we'll call this one right pinky next is the ring we'll call this one right ring and finally we have the thumb which we'll call right thumb now we have all the fingers and the other main chains we need to concern ourselves with are the legs and we can see in the third person template the left leg and right leg start at thigh l and end at ball l so we can scroll down and see those leg bones here's the thigh r and ball r so we're going to do that we'll start with the left leg so let's go down to our thigh l bone and because there's a calf twist bone here i'm going to show you something funny that happens when we select thigh l hold shift and select ball l and create a new retarget chain you'll see that the start bone is thigh l but it stops at the calf twist it's going to try to create two chains stopping with the calf twist in the middle but that's okay because we can fix it here in ik retargeting so i'm going to go ahead and name this one left leg and click ok and you'll see that it's trying to create the second chain starting from thigh l this time going down to ball l i'm gonna click okay just to let it create that one and scroll all the way down to the bottom we'll see that we have two new chains left leg and thigh l but i don't want the thigh l i'm going to hit the trash can icon now i just have left leg but i do need that end bone to be the ball l bone so i'm going to click the drop down and select ball l and now we can see that this left leg chain goes from thigh to ball l now for the right leg if i scroll down i can find thigh r and again it's going to try to create two chains so i'm just going to select calf r and create a new chain and call this right leg click ok and then find that end bone drop down and select ball r so now i have my right leg going from thigh r to ball r and now we have all of the chains that we need in this ik rig so now that we have an ik rig for the learning kit game skeleton we need to create one for the skeleton of the unreal engine mannequin that old one because all those animations we need are rigged to that skeleton so let's go ahead and click save and close this and open our content drawer and we'll go into our assets animations anim starter pack folder where we have all these animations and open one of these animations and we'll see the skeleton here we can click browse to asset and find the folder that contains this skeleton here it's in this content slash mannequin character mesh i'm gonna go back out one level to the character folder and right click and make a new folder and call this riggs and we're gonna make a new rig for this character if we go into mesh we'll see that the character skeletal mesh is called sk mannequin and it's in game mannequin character mesh so i know the skeletal mesh to use so let's go back into rigs and we'll make a new ik rig so right click go to animation and ik rig and we're going to search for sk mannequin now i see a couple here it's because i have several in my project but the one i wanted which is used with those animations is in game mannequin character mesh i'm going to select that one and rename this ik underscore mannequin and let's go ahead and double click to open up ik mannequin now i don't need this crouch idle rifle hip i'm going to close that and dock my new ik rig up here so now we need to make the ik rig for this skeleton so we're going to follow the same steps step one is to set the retarget route to the pelvis so we're going to right click the pelvis set retarget route and now we need our chains so first we need that root chain so i'm going to right click on root new retarget chain from selected bones and call this root with a capital r and click ok and now we can follow all the previous steps so working our way down we have the spine bones we can select spine spine01 and hold shift and select spine o3 right click new retarget chain from selected bones and we'll call this spine and click ok i'm going to go ahead and search for the neck and head bones and get those first so i have neck o1 and head selected i'm going to make a new chain and call this one head and click ok now after the head we have the clavicles so i'm going to get my clavicle l right click new chain and call this left clavicle and click ok and i'll find my right clavicle here it is make a new chain and call this right clavicle and click ok now for the arms i'm going to go up to upper arm l and hold shift and select hand l make a new chain and call this one left arm click ok and i'll find my right arm so i got upper arm r through hand r we'll make a chain and call this right arm and click ok now for the fingers a little bit tedious but nothing we can't handle we'll start with the left hand just under that we see index 01 through o3 we'll make a chain from that and call this left index click ok now for the middle we'll get those and create a chain called left middle click okay for the pinky we'll get those three bones call this chain left pinky click okay now for the ring finger we'll call this one left ring click okay now for the thumb create a new chain and call this one left thumb okay so there's our left hand let's go to the right hand and we'll start with the index we'll get those bones call this one right index and now for the middle call this one right middle and the pinky which we'll call right pinky and the ring we'll call this one right ring and finally the thumb which we'll call right thumb okay so we have our hands now we just need our legs so let's go all the way down and find our thigh l and again if we select all the bones through ball l and new retarget chain we'll see that it stops at calf twist but that's okay i'm gonna call this one left leg click okay it's gonna try to create another one i'll just click okay and delete that one and make sure left leg goes from thigh l all the way to ball l now for the next one i'll just select two bones starting at thigh r and call this one right lag click okay but i do need to make sure the end bone stops at ball r so now that chain goes from thigh r to ball r perfect okay so we have all the chains we can go ahead and click save and now we have an ik rig for the mannequin and we have an ik rig for the learning kit game skeleton now we can actually retarget now to retarget we're going to create a new type of asset this is another thing that unreal engine 5 introduces and it's called an ik retargeter now we're retargeting from the old mannequin which means we need an ik retargeter for the old mannequin as this is the source for the animations so here in the rigs folder for our mannequin right next to our ik mannequin ik rig we're going to right click go to animation and select ik retargeter and ik retargeter prompts us to select an ik rig so an ik retargeter requires an ik rig and we're making this for the ik mannequin as it's the source for our animations so we're going to select ik manikin and we're going to prefix this with rtg it's sort of short for retargeter we'll call this mannequin so rtg mannequin let's go ahead and double click to open this up and here is the retargeter now this ik retargeter is made for the source ik rig which is the ik mannequin you'll see that it's grayed out we can't change it but beneath that we see target ik rig asset and the target is going to be our blaster rig so we're going to select the drop down and choose blaster rig and now we can see the blaster character standing right here next to our mannequin so this is going to be great because we can actually see the two poses next to each other and this is one of the ways that the new retargeting method is better than the old one and we'll see the benefits for that very shortly now in the details panel i'm just going to point out a few things first we have target actor offset and we can click and drag this and you'll see that we're changing the distance of the unreal learning kit games character from the mannequin so we can choose how far away it is i'll set it at about 200 that way we have some room to work now if you're familiar with the old way of retargeting animations you'll know that these poses should be similar now they're both in about an a pose but the learning kit game skeleton has a more stiff straight skeleton it's a lot more rigid and the mannequin is in more of a natural pose so we need to know how much to move this pose to get it to look more like the mannequin's pose now this is one of the ways that the new retargeting method is also better because if we want to in the asset browser we see all the animations that belong to this mannequin as our ik retargeter is made for the source ik rig asset ik mannequin so check this out if we go ahead and search for say idle and we double click crouch idle rifle hip we'll see that right away our learning kit game skeleton is in that pose and if we double click crouch idle rifle iron sights we see that it's in that pose now of course the poses aren't perfect because we haven't even adjusted the poses to look like each other now if we click up here at the top on edit pose we'll see the poses and we can change them in fact if we want to we can make a new pose by clicking this plus here for new pose and that way we don't have to change this default pose we can use a different pose and that's what i'd like to do so i'm going to click new pose it's going to ask me for a name and i'm going to call this from mannequin and click ok so now we see under current retarget pose we have from mannequin and we have default pose and we can switch between those and i can change this pose to look more like the mannequin in order for those retargeted animations to look better so i'm going to go ahead and click edit pose so i can change the pose for this unreal learning kit games character now the bones do look a little large in fact they are too big but that's okay because in the details panel we have bone draw size and it's set to eight but we can click and drag this down and take a look at the bones in the viewport they go down to a manageable size i'm going to put it down to about .7 just so i can see the bones and we can select each of these bones so what we want is to change the pose so that our animations look more appropriate and this is the beauty of the new way of retargeting if i click edit pose and go back to look at these poses in the animation for crouch idle rifle iron sights i can see what they look like and i can click edit pose and come back here and change the pose so for example i see that the mannequin has its arms bent a little bit so if i select this lower arm bone i can bring it forward by about say 15 degrees now i'm in snapping increments of 10 but i can come up here to change my snapping size to 5 degrees and now i can rotate this forward by about 15 degrees and i'll do that for both of the lower arms 15 degrees or so and now i can click edit pose and come back to see what it looks like in the pose of the animation so we haven't even retargeted any animations yet but we can adjust this and see how it looks before we even retarget so we can get it looking just right before we actually create those new retargeted animations so this is actually really useful and what's even better is we can go through all the animations one by one and see what they look like and that way we can adjust that pose as we need to and that's what we're going to do we're going to first start with these idle animations and make sure that we get this pose looking correct before we actually retarget so i see that our learning kit games character has the arms a little bit too low so i'm going to go back to edit pose here and see if i can fix that i'm going to go ahead and rotate the arms up by 10 degrees this way and click edit pose and see if that fixed anything and we can basically just keep going back and forth and choosing different bones here i have the upper arm l and r lifted those up by 10 degrees and i see that that didn't really help so i'm going to get those and move them back down like this and the beauty of this is that we can always go back to the default pose if we screw this up royally and we can't get back to what it looked like before and we can also click reset pose i'm not going to do that but if we did click reset pose it would go back to the default so let's just kind of tweak this little by little until we get it looking right so i'm going to go ahead and get those lower arm bones and move them in by another 10 degrees i'm using the blue circular arc on the rotation gizmo and just seeing if i can get these looking a little better i do think that these arms need to be sort of up a little bit i'm going to go up by 10 degrees on the lower arms using the yellow gizmo and see if that helps and that seems to have made it a little bit worse i'm going to move them back now i can try the clavicles i'm going to move the clavicles up using those yellow arcs and see if that helps and also it's good to go between the various poses and see what they look like and make sure that they look okay so this is basically a tweaking game i think at this point it actually looks pretty good and remember you don't have to get that left arm just perfect because later we're going to be actually forcing that hand in the correct location using a different trick for getting the left hand and sticking it to a socket on the weapon so that way it'll look good for each weapon but actually i think what i have here is looking pretty good i can even go to all the other various animations and taking a look at what they look like and it looks to me like these animations are looking pretty good so once you have that pose looking good you can save your retargeter and now our ik retargeter asset is all set up and if we get any other animations from anywhere else that use this exact same mannequin skeleton as there are plenty of assets on the marketplace that do we can use this retargeter so now that we have our poses set correctly it's time to actually retarget so what we can do is we can do this one by one so i'm going to show you that first and then we can do them in bulk and i'll show you that next so i'm going to dock this back up here and i'd like to make a new folder for my retargeted animations so i'm going to go into assets animations and make a new folder here and call this retargeted and here in retargeted i'm going to make another new folder called anim starter pack and in this we'll put our new retargeted animations so here's what i'm going to do i'm going to go to one of these poses here let's go to fire rifle hip and with fire rifle hip selected right here we see export selected animations if i click that i'm prompted to select a path i'm going to go to assets animations retargeted anim starter pack and click ok and a new content browser tab pops up for me and i can open it and i see my animation now ignore the sword here this is a preview asset again i'm coming to you from the future so by the end of the course there will be a use for that sword and you'll see that once we get to the capture the flag section so ignore that but you'll see that my animation is retargeted and if i go into that new folder here's my new fire rifle hip retargeted animation great so that's how you do a single animation and that's useful because you can come back to edit pose and change the pose here if you need it in a certain pose for a given animation and then you can go to another animation and change the pose for that one and export that separately and you can also have various poses say half of your animations need a particular pose and the other half need a different pose well you can just click new pose and you'll have those two poses that you can switch between so this is a very nice way to retarget animations so to get them all retargeted at once you're going to go ahead and select all of them now i already retargeted the fire rifle hip animation so i'm going to find that one and hold ctrl and left click to unselect that one so i have all the others selected except that one and i'm going to click export selected animations open assets animations retargeted and select animstarter pack and click ok and give that a second and the content browser pops up and shows me it has all the animations retargeted and i can check them out and i see that they all look great awesome so that's how we retarget animations now in unreal engine 5 and we did this from the old epic mannequin but you can use any skeleton we want now you may be thinking well that was easy because the chains are identical between this skeleton and this one and you're right it was easy what happens if you want to retarget animations from say miximo the miximo characters don't necessarily have the same skeletons well i'm going to show you how to do that now so let's go ahead and close out of those assets we have now accomplished retargeting animations from the animstarter pack and we have those retargeted to our learning kit games skeleton this is great now for mixamo animations so i'm gonna go to mixamo.com and if you don't have a miximo account go ahead and create one they're free and here in mixamo we have characters and we have animations now here in characters i'm going to scroll down and find a character it doesn't really matter which one but i'm going to scroll down and find xbot and change to this it says proceed with this new character your previous character will not be saved it's talking about that character i was looking at we're going to click use this character and here is xbot so we need this skeletal mesh in order to retarget animations from mixamo so i'm going to click on download and the format for one of these is fbx and we can download this in a t post and a t-pose is actually great for retargeting to our unreal learning kit games skeleton as we'll soon see so go ahead and click download get that downloaded and go ahead and find that in your downloads folder it's called xbot.fbx and we're going to get this into our unreal engine 5 project so here in the unreal engine 5 project i'm going to go into assets and make a new folder and call this mixamo and here in miximo we're going to import that new xbot skeletal mesh now we can do that by right-clicking and selecting import to or we can click the import button and select it from there but we're going to import it it's in the downloads folder for me i'm going to import xbot.fbx click open and it's asking for a skeleton but we're going to leave it at none because it's going to come in with its own skeleton so make sure that's set to none make sure import animations is unchecked and we can go ahead and click import now it's going to pop up a warning message that's okay you don't need to worry about that stuff it's complaining about some of the bones not being vert weighted that doesn't matter for us all we need to do is close that warning message and now we have some assets in our miximo folder now we have a couple of materials this skeletal mesh xbot has two materials two shades of pink here so we're going to right click and make a new folder called materials and we're going to put those in there but before we do just to keep up with good naming conventions i'm gonna rename this first one m underscore light pink and take this other one and name it m underscore dark pink and get those two materials and move them into the materials folder and now they're sorted away now the skeletal mesh is called xbot but i'm going to rename this to sk m underscore xbot as unreal engine 5 is now moving more towards prefixing skeletal meshes with skm so i'm going to do that the physics asset is not that important we're not going to be using it in this lecture i'm going to leave it as is but the skeleton we're going to rename sk xbot okay so we have a skeletal mesh and a skeleton and if we double click skm xbot here's what it looks like just like it looks like in the miximo website cool so we have that mesh now in our project and of course we can click save all save that and now we need some animations so we can click on animations and there are lots of animations in miximo that we can use we can search for anything if i search for attack you'll see that we have different attack animations here's a melee animation that's pretty cool and to download it you simply click download and we're gonna leave it as fbx but we don't need the skin actually we can click that drop down and select without skin and it won't download that skeletal mesh it'll just download the animation information frames per second can be left at 30 key frame reduction can be left at none we can simply click download and we can find that in our folder and we see that it's called standing melee attack horizontal and it's an fbx and getting it into our project is relatively simple here in the miximo folder i'm going to make a new folder called animations and here in animations i'm going to right click and i'll use the right-click method this time of importing i'll select import to get that standing melee attack horizontal click open and this time we do want to select a skeleton we're going to select that miximo skeleton which we called sk underscore xbot so we're going to select that and we can go ahead and click import and if we double click it here's the animation and it looks exactly like it did in miximo alright so we need some more animations and the animations that we'll be using for this course are going to be some turn in place animations some jumping animations and such so i'm going to search for turn right and if i select right turn i see that this one actually turns in place i'm going to look for ones that don't have in place movement because we're going to want to rotate the character ourselves we don't want our animations to do it for us now some animations have a checkbox for in place those are the ones you typically want to stick with but some are actually in place by default like this one so this is a crouching turn right animation i'm going to download it and leave these as is without skin and click download and here in my downloads folder i have turn right but i'm going to rename this to crouch turn right as it's a crouching turn right animation now let's see what else we have here here is a turning right standing animation called turning right 45 degrees i'm going to download that one as well and i'm going to rename this one to simply turn right now in the course i might not have named these exactly the same but you get the drift if you have the animations you can work with them so i have turn right animations for both standing and crouching let's go ahead and search for turn left and notice i'm getting animations that are holding a weapon so that's why i chose these ones so let's see what we got here here's a standing turn left i'm going to go ahead and download that one and there it is i'll go ahead and remove the space in the name so i have standing turn left now we need a crouching turn left as well and here's one right here so i'm going to go ahead and download this one and this one is also called turn left i'm going to rename it to crouch turn left all right now just to organize these i'm going to make a new folder just here in my downloads for anims i'm going to call it anims and get these four and stick them in here just so i don't confuse them with anything else and now that we have our turn in place animations we're going to need some jumping animations i'm going to search for jump and there are some animations here where the character is holding a weapon and i like the animations that don't contain the hole jump but rather parts of the jump so we have the start of the jump here this one is the end of the jump and somewhere around here there's the apex of the jump we're going to use the three separate parts and that way we can prolong the jump by staying in the apex of the jump animation while we're falling so i'm going to take jump up download that one and take jump down and download that one and let's find that jump apex i think it's probably just called jump here but we'll find it and here it is it looks really funny because it's just hovering there we're going to download that one as well and in my downloads folder i'm going to take these three move them into my anims folder just to keep track of where everything is so now we have jumps now a couple more things that we'll probably need are a grenade throwing animation so i'm going to search for grenade and i like this one toss grenade we're going to go ahead and download that one and another animation i'm going to look for is i'm going to look for reload and this animation here a reload animation this might come in handy later so i'm going to download that one as well and i think these are all the animations we'll be using in this course from mixamo but if we ever need more we can always come back and download them because we're going to have a ik rig so let's get reloading toss grenade get those into my anims folder here so now i have these animations that i'd like to get into my project so let's go back to mixamo animations and click import and i'm going to find all those animations that i want click open and select the skeleton and that's going to be sk underscore xbot so we'll get that and click import all this way we'll import them all at once and here they are so we have these animations they're all looking great but they're rigged to that miximo skeleton so that's why we're going to need to retarget so let's go into our miximo folder and we're going to make a new folder called riggs and you guessed it we're going to make an ik rig so let's right click go to animation and ik rig and let's find that xbot here it is skm xbot and we're going to call this ik underscore xbot and we'll go ahead and open this up and for the third time today we're going to make another ik rig now i know this seems like a lot of work but we're doing all this work up front so now we can go and get any animations from mixamo or anywhere else that uses these skeletons and we can use this rig asset so really we're saving ourselves time in the long run here okay so the first thing we want to do is we're going to set our retarget route now here's where things differ from using the mannequin skeleton you'll notice right away that the bones are different they're all named differently and we might not have the same number of them so this is why the ik rig is so useful because we can retarget animations with different skeletons now the mannequin and the learning kit games skeleton had a root bone but if we click on hips here the top most bone in the hierarchy we see that it's right here this corresponds to the pelvis on those other skeletons so the miximo character doesn't actually have a root bone something to take note of so our hips are going to be our re-target root so we're going to right-click on hips and set retarget root to the hips this time and our other ik rigs had a root chain we're going to make a root chain and we're going to have to use the hips so we're going to right click new retarget chain from selected bones but we're going to call this root with a capital r so there's our root chain now we need our spine our head our arms and fingers and legs so let's go ahead and create that so the first thing we're going to do is the spine i'm going to select spine through spine 2. so we have spine spine 1 and spine 2. we're going to make a new chain and call that spine and click ok and now we see the neck and head right here we're going to right click make a chain and call this head remember that's the name of the chain for our other ik rigs and if all the chain names are the same this is going to be a very easy endeavor now we have the clavicles but here on the miximo skeleton they're called left shoulder and right shoulder so we're going to take our left shoulder right click on it make a chain from this single bone and we're going to call this left clavicle so left clavicle and that's because that's what it's called in our other ik rigs so we also have the right shoulder that's going to be our right clavicle so we'll make a chain from this called right clavicle so there's our shoulders now the arms are going to be from the left arm down to the left hand on the miximo skeleton so we'll make a new chain from those and it's called left arm so that's the correct name now for the right arm we'll go from right arm to right hand we'll make a chain it's already named correctly so we'll click ok now after the arms we're going to want to do the fingers now here's another circumstance where the miximo skeleton differs not only are they named differently but we have left hand thumb through left hand four we're going to get all four of these bones so let's highlight those right click new chain and we're going to call this left thumb so left thumb and click ok and we'll do the same for the other fingers so i'm just going to quickly do this and time lapse it as you already know how to do the fingers all you do is select the fingers and we know the naming conventions left thumb left index left middle and so on so let's go ahead and time lapse these ones now one thing i do want to point out though is that you're going to want to make sure that you take a look at what you're selecting because up here the thumb is the first finger but down here the pinky is first so something to watch out for all right so i finished all my fingers now i need the legs so i start with my left up leg and we're going to go all the way down to left toe end so the entire leg we're going to right click and call this one left leg so we'll click okay and we'll see that we don't have that problem we had with the other skeletons as we don't have any twist bones now we're going to take the right up leg through the right toe end make a new one and call this right leg and click okay and we're done we now have the ik rig for the miximo skeleton so let's go ahead and save that and close it and now we need that retargeter so right next to ik xbot we're going to right click go to animation and ik retargeter and select xbot that's the ik rig ik xbot and we're going to call this r t g for retarget xbot and we're going to open xbot here it is and we see the source rig is ik xbot and the target is going to be ik blaster and once again we see blaster and it's next to our miximo character this time and in the details panel we can change that offset i'm going to go ahead and change it to 200. move it over just a bit now this is going to be easier because the learning kit game skeleton can very easily be put into a t-pose so i still would like to make a new pose so i'm going to click new pose and for this one i'm going to call this from mixamo and i'm going to click edit pose and i see that the bones are all out of whack so i'm going to go to bone draw size and put that down to a reasonable value there and i can move these bones now i'm just going to move them up by about 45 degrees to put this in a true t pose and we may just go ahead and move those legs in just a little bit so they're more straight maybe even more but we'll see how the animations look i'm going to get out of the edit pose go to the asset browser and now i can see those animations from mixamo like crouch turn left crouch turn right we have the reloading we have jump up and so on now i do notice that there is a finger here that doesn't quite look right now i'm wondering if i made a mistake in my ik rig let me go back and look so ik xbot let's see it looks like my middle right finger so let's go to right middle and i might not have a right middle i think i might have skipped that one actually and that's that would explain it yeah i think i'm missing the right middle finger so i'm just gonna add that here it is i'm gonna go ahead and make a chain called right middle and save that i'm going to go ahead and reset the target ik rig and select ik blaster and edit the pose bring these up by 45 and it looks like things are looking good now so i had just forgotten to get that left right hand finger i didn't have a chain for it and that's why it was sticking out like that so something to be aware of now most of these are looking good this reload animation looks good the melee attack which we're not going to use but i figured i'd throw it in there because it looks cool that looks awesome turn left looks good now i noticed the poses with the gun do look a little off it looks like my arms are a little too far in so if i go to edit pose i think i'm actually going to move the clavicles up and i think that actually fixed it so moving the clavicles up a little bit and again you don't need to worry too much about that left hand as we're going to use ik and also these turn in place animations we're actually not even going to use the upper body we're going to blend that upper body out and just use the lower body anyway so that's totally fine so i think we got these looking good once you have them looking good you've tweaked them to your heart's content and everything looks great we're going to do what we did with the other anims we're going to export the selected animations now i'm going to make a folder here in content assets animations retargeted we have our anime starter pack i'm going to make a new folder called miximo and we'll put our retargeted animations there so here in our ik retargeter asset i'm going to select all of these animations and click export selected animations and go to assets animations retargeted miximo and click ok and here they are we have all of our retargeted animations and they look fantastic so this is going to be great there's that reload animation where's my grenade here's my toss grenade yeah look at that look at that that is great awesome okay so we have our animations we know how to get more animations we know how to retarget them if you ever get more animations just go ahead and stick them in the correct folder and that's going to be for miximo just go to your miximo folder that you created your animations here just drop it in there and then simply go over to your rigs folder open your ik retargeter and you should see that animation here and you're just going to double click on it look at it make sure it looks good if it doesn't go ahead and make a new pose and change the pose by clicking edit pose adjust the bones unclick edit pose look at the animation go back and forth make sure that you tweak it until the animation looks good then export selected animations stick it in your retargeted animations folder and you're good so kind of a long process there's a lot of setup for it but overall this process is a big improvement and it's a lot more versatile and it allows you to make sure those animations look just right before you actually retarget them so this is really a really big improvement for unreal engine and another thing is we'll be doing this pretty frequently throughout the course but if you ever take a look at your animations and they look like they're sort of into the ground like this well you can always get that pelvis bone and right here click this so you're in global coordinates mode and go into translation mode and just bring that pelvis up a little bit just make sure it's above the ground so that way you're not stepping through the ground and if you do that you're going to need a keyframe so go to the first frame and click key right there and now your animation will stay like that if you save it and leave and then come back into it you'll see that you're no longer in the ground you're just on top of it so that's another nice useful tool you can have and of course if you don't want a key frame in there you can bake it into a new animation asset which we do plenty of times in the course i'm not going to go over that now there's no need to so all right i think that's going to wrap this up and now you should know how to make new ik rigs you should know how to make an ik a retargeter and now you have these assets at your disposal and you can very easily retarget animations and now your toolbox of animations has just skyrocketed to new proportions so great job i hope you enjoyed this video i'll see you next time
Info
Channel: Druid Mechanics
Views: 56,880
Rating: undefined out of 5
Keywords:
Id: _sLnCqBaElI
Channel Id: undefined
Length: 61min 7sec (3667 seconds)
Published: Sun Apr 24 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.