Unreal Engine 5 Tutorial - Control Rig Part 2: Types of IK

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] foreign and welcome back to a control wig episode 2. unfortunately it's been a long time since episode one and the main reason for that is that uh the control rigs full body ik was broken in version 5.0 now I don't know if this has been fully fixed yet in 5.1 but I say I want to move on and show you some other stuff anyway I gave up waiting um so we're going to try to go ahead with this next episode so in this episode we're going to go through the ik nodes talk about how they work how you set them up and what do the options mean on them and so by end of this video you should know the difference between each one and when you want to use each one so let's get started okay so um moving on to a slightly different topic than we last were here uh we're gonna go through the ik nodes so we're going to go through and create a new control rig for our mannequin over here sort of right click on this one create new control rig and there it is and we'll open it up okay so this is the mannequin and as you can see we've got our settings that we've gone through last time we were here in episode one you've ever watched episode one yet go check out first as we do covers on the core basics of what you're seeing here so the first thing we want to do in here is find our forward solve execution here and we're going to create a new control for our hands okay so I'm going to go to my rig hierarchy here I'm just going to minimize the rig here and create a new control and I'm going to rename this control here the hand l control and I want to put this into a position of the hand here so I'm just going to move it around and by clicking on it over here let's actually minimize this again because it's going to get annoying there we go okay so I'm going to move this to roughly where the hand is so let's move it up here it's basically bigger so you guys can see a bit clearer okay so let's move it roughly to about a hand is like so let's actually hide all these bones for now so we can not worry about that there we go so once you've got roughly where you want it to go if you right click on it you can see down here you've got set offset transform from closest bone and when you click on this basically it's going to lock itself down to that bone coordinate there which is Handy way of doing it as a shortcut I showed different method in part one you could do either way is my ways of doing this um so by means use this one if you want um so if I move this around and want to reset this with compile or Ctrl G to reset all the deformations it will be set back to that point now okay so how do we actually use the ik node so there's three I want to go through and if I just right click in here and type in ik you got these three you've got basic fabric basic ik and c c d i k I'm going to go through those three different nodes here we'll start off the basic ik and talk about how this works so the basic ik takes two bones item a and Item B well it can be anything really but normally it's two bones and so we're going to choose the upper arm here for our control so I'm going to do the upper arm and that's the right arm I just realized I put it hand no that's the left arm that's why um left and Item B is going to be the lower arm now basic ik works with just two bones that's its thing it does two bones only and you're given the effector which would be the hand in this case attitude and L and there we go it'll snap to that so it just moves those two bones only so nothing else is affected by anything else it's just those two bones there and imagine it's like a triangle okay so it's drawing a line from the upper arm down to the lower arm so you've got this little triangle nice line coming from one to the other and then it's going to the pole Vector the pole Vector is the third point of the triangle and that indicates which way the triangle sort of orientated around if you can imagine that and the pole Vector is down here but we'll come to that in a moment first of all let's add the effect ring because we've got this effector here this controller and we want to add that into there so at the moment the effect is the hand L which works fine we want to move it around and stuff but um handle is kind of locked down down here so what we're going to do is going to affect it with the transform uh but we should drag from our control get control and just drag the transform into the effector and there you go now going back to that pole Vector I'm talking about the third point of triangle the third Point by default is zero zero one which gives us a value which is like down this way a little bit okay so it goes down around about here which is not great you know obviously his arm is bending in a weird way if I move this around it kind of doesn't look okay so we're going to go to the pole vector and get that from our control here we're going to make it use the control and make it relative to that so we're going to do is first of all change the pole Vector to use a location rather than a Direction so that's that one and you could use another control point if you want to do this you actually can do that but I'm just going to use the one they've got current here because we don't want to make it too busy keep it quite simple so take this transform pin and do absolute to make an absolute pin and this one would be the parent node because we'll make it relative to that one there so we'll take that pin there and we'll take translation of this and put that into the pole vector okay the local is what we're going to do as an offset from that point okay and I want to go back out okay to out a little bit so I'm going to go to translation and we want to move it in the Y by looks of it by 30 and if you want by the way to see a debug visual where this is if you go to any of these pins here but pole Vector we can right click on it and do add visual debug another little square Point here so you can see that's the point it's aiming towards so the elbow basically is pointing towards that point there um so imagine a triangle going from the upper arm bone down to low arm down to here okay and that's how it determines the bend um yeah you just readjust this however you want so I'll make it go a bit in the X as well negative 30 there and that should look a lot better okay so still not perfect yet because we've still got a shoulder issue going on over here so the shoulder issue is something that's determined based upon what mesh you're looking at so in the mannequin the ue5 mannequin at least uh we need to fix a secondary axis of the bone so the secondary axis determines which way the bone is going to determine which way it should bend so secondary axis at the moment has a default value of one in the Y which basically makes it look like it's upside down and how this looks like it's back to front upside down so change the Y here to negative one it will flip it the right way around and now when I move it around get a much better look at this okay much better okay but as you see it's only two bones so if I pull it extra hard it's not going to affect anything else just that bit okay so it does have some limitations too so let's take a look at the other ones we got fabric is next so fabric stands for forward and backwards reverse inverse kinematics okay so forward and backwards reverse inverse kinematics and this takes in a number of items so this talks about a chain of Bones and how they can move in terms of the ik so if you have to give a whole set of Bones here so to get the set of Bones we're going to go to our root bone here and I want it to affect everything from the spine all the way down to the arm so I'm going to go to spino one select all the spine bones then hold down control click clavicle L upper arm L lower arm L and then hand l so all of those connected like so so we've got the full chain going along now drag this out and drop it in and create item array I can now plug that item array into the item set so that's a really nice short wage adding loads of items to our fabric ik here so I'm now going to plug this into a forward solve instead of the basic ik so let's just bring that down here and by default it's gonna look weird because the effect transform by default is zero zero zero so it's going towards the floor we're going to use this point instead so we just take the transform from our control pin and put it into a basic AFK now you can see what this does if I were to pull this around you can see it's affecting all of those bones as such now the way fabric works is if I show you all the bones this makes a bit more sense so another look at here but just focus on this chain going from the hand all the way up down and around to the spine as I pull this hand away you'll notice it affects this bone first and then it go this bone then this bone this bone and then this bone this bone so it does a chain so if I put it away you see this Bone's moving and now this Bone's moving and as it gets further and further away they all start to move okay so it's like a chain event of when things move around and stuff so let's push this out forwards like so as if you're going to reach four door okay so Fabric in this particular animation wouldn't make much sense because it's making your character do weird things like this um which you know maybe what you want I don't know but it kind of looks a bit odd but yeah there you go so that's fabric okay and you've got a few things that you need to make sure you're aware of so propagate to Children if you don't tick this basically it's only going to do that one bone joint you want it to affect all of the children of it like the hand and fingers so tick that button it should be on by default anyway and the way it goes um set it back to transform so what that does is if I pull this too far away it stretches the bone out massively yeah and that's because the effector transform is being set and manipulated like so if I turn this off it'll snap the bone back and won't stretch the bone there so you can use that in up the guard so it's pretty useful um but yeah let's go back to this pose here now we'll look at the other ik node which is c c d i k and this stands for and I hoverboards I can remember this one cyclic coordinate diverse inverse kinematics so basically it's light fabric works very similarly it just handles the mathematics a little bit differently which you'll see quite evidently in a second so I put that into execute here use the same items list and we'll use the same effector so no no changes just changing node basically and now you can see how this one reacts differently and you can really see it's a little bit better like our character's not leaning to one side for example our characters are standing there and looking pretty normal okay now the way CCD ik works is basically all of the bones are moving all at the same time they don't move well like a chain down the chain it all move fluidly at the same time yeah just by a different weighting on each one and I feel this one is quite nice it gives you a much nicer look and feel and looks a bit more natural be aware you can over stretch it there is no effect to transform you can turn off for this one I don't know why just there isn't um at least not to my knowledge so you can break it quite easily but which one you use depends heavily on what kind of Animation you're trying to do and also the setup for your uh character mesh that you're using each kind of mesh is going to be slightly different so do play about the numbers especially when doing things with like the pole vectors and the axes here if you want to mess up out of those do be aware of that um but for ik purposes um play out of it to get whatever works best for your actual animation uh so if we're doing a door handle thing for here for him CCD ik seems to be the best option and I could aim this point over here to a door handle and turn it and and other things like that okay so yeah there you go there are the three basic um ik notes that you should be aware of and there you go we've got our ik nodes covered in the next episode I'm going to talk about the aim Direction nodes and talk about how we can aim our character at different objects in the world and also objects on themselves controls on themselves you can watch the next episode right now over on patreon.com forward slash Ryan lady we can find all my videos only from just one dollar a month if you like my content please subscribe to the channel it really does help out a lot and it does um help boost the algorithm and get us more into people's inboxes so thank you again so much for watching and I'll see you next time bye everyone thank you [Music] foreign [Music]
Info
Channel: Ryan Laley
Views: 17,945
Rating: undefined out of 5
Keywords:
Id: yMhyMucBxkk
Channel Id: undefined
Length: 14min 13sec (853 seconds)
Published: Tue May 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.