Rigging FPS Arms - FPS Game With Unity & Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
boy friends today we'll be rigging the fps arms that we made in the previous three episodes last time we colored them and before that we modeled them these steps are the same both for the low pulley and the high poly arms i'll be showing you how to do it on the low poly arms and i'll also show you the end result on the high poly arms again screencast keys are enabled so you can check out what i'm clicking in the bottom left okay if you want to rig something in blender you'll have to use bones and the way you add a bone is you make sure you're in object mode right here press shift a armature single bone and now with the bone selected you can press tab to go into edit mode and in here you can change the size of the bones and add more the way you add more is by selecting a end of the bone and clicking a and then you can extrude but for now let's just have this single bone and what i'm going to do is i'm going to g and z to move it up to around the center of the arms now i can take the top of the bone and press g and z and put it down here and if you want to rename the bone you can either do it up here by you know clicking down here and when you select the bone it will select it in the viewport as well or you can just select it in here and press f2 on your keyboard this is going to be our root bone or you can just call it root this bone is going to be like the master bone this one is going to control all of them together okay let's add some more so press shift a and it will add a bone down here g z to move it up and then i'm going to press g and x to move it to the side now you can see that the mesh is over the bone if you want to change that go to the armature tab or sorry the object data properties tab and then down here you can click viewport display in front and now the bones will be in front of the mesh it'll be easy to see them all right if you want to rotate it you can select this top circle right here and press r y and then 90 and it should rotate it flat and then gnx to put it around the uh elbow now if you don't know where your elbow is you can go into wireframe mode and find the elbow you can see that in the middle here is where the elbow is it doesn't have to be perfect it just has to be around there okay press e and x to extrude on the x-axis and this is going to be our forearm and now for the hand i'm going to press 7 on my numpad to go into top view i'm going to press e x to extrude the palm bone and now we're going to have to make the fingers the way i do it is i select the spawn bone shift d to duplicate it and place it on one of the fingers and then you can get the correct rotation like this duplicate this bone and then place each one where it needs to go shift d just like that okay one thing you want to make sure is that these start of the fingers are a bit inside of the palm just like that you don't want to have them too much in the finger like that they should be where the knuckle is some somewhere around here it will make animating much easier so just place them over the knuckles right there and of course one for the thumb for thumb try and place it around where it should be it's kind of hard because thumb is not straight okay uh if you want to place the thumb you can switch between front side and top view to try and place it where it should be of course this part should be at the top at the tip of the finger just like that and this one should be inside the hand so that'll be pretty good okay but this is only one bone and since we want to bend it we need to have joints for each of the well joints so what you can do is select all these bones press w and then subdivide and in this little drop down or box in the bottom left you can change the number of cuts to two and it will create all the bones for you just like that and now you have all the bones in the figures for example in thumb you should probably move this bone there and this one a bit higher up and probably all these bones just press c for this little tool or b to box select should be moved a bit up but that's all up to you now what i want to do is make sure that these joints are where the knuckles are so you can uh change up here from global to normal for the orientation of the transform and now you can press g and y or try maybe g and x or g and z to move it exactly in this direction and then you can make sure you placed everything in the in the correct position just to be sure just like that and for this it doesn't really matter that much okay change back to global whenever you're done but the problem is if you press ctrl tab to go into pose mode just like this or sorry control tab or just change it up here you can see that if i rotate this uh that the fingers don't follow that's because they're not parent to this bone they're parented that they're parented to this bone so in back in edit mode what you can do is select each one of these first bones and then lastly select the palm bone ctrl p keep offset and now in pose mode you can see that they follow nicely and all the other bones should be parented correctly that's only one side though firstly i want to name all these bones so i can copy them over to the other side so what i'm going to do is i'm going to select each one of them while in edit mode press f2 so this is going to be my bicep dot l this is going to be my forearm dot l foam the l dot l just means it's the left side and you're probably thinking well how the hell this is the right side well it's looked from this direction for some reason so that's the left side doesn't make sense to me either this is gonna be the thumb one dot l then we're gonna have thumb two dot l thumb three.l and each one for all the other bones a quick uh tip is you can write out the name press ctrl a ctrl c to copy and then you can just write index one dot l and then on this one just ctrl v to paste 2.l and here 3.l this will be the middle 1.l middle 2.l middle 3.0 this is the ring 1.l 2.l and 3.l and this is the pinky l pinky 2.l pinky 3.0 that's all of them but in pose mode you can see that it'll be quite hard to animate each bone just like that at least for the arms for the fingers i can uh i can work with that because they should be quite precise but we want to probably add some kind of ik system to these arms and just before we continue you can take this elbow bone and just move it up backwards with g and y this will help us with the case a lot just a little bit doesn't have to be too much so just so it's not straight i case for those of you who don't know is a way of moving the bones using other bones that's the best way i can explain you'll see everything once i show you okay in order to do that what i'm going to do in edit mode is i'm going to select this elbow bone press e and y to extrude on the y axis then i'm going to select it press alt p to clear the parent and now we can move it wherever we want without moving this as well so make sure you alt p and player parent and then i'm going to press g and y to move it backwards it doesn't really matter how backwards how much backwards you move it just so it's not you know point blank here and for the pump what i'm gonna do is i'm gonna shift the the spawn bone so i'm gonna duplicate it and then right click and make sure you don't touch anything now just press n go to item and change the length to something a bit higher just so you can tell between these two bones with this bone selected i'm gonna rename it to arm or sorry ik inverse kinematics arm target dot l and this one is going to be my ik arm pole dot l and again make sure that this uh ik arm target is unparented so alt p clear parent okay but you can see in pose mode if we move them they do nothing so what we have to do is select this forearm bone go to the constraints tab down here this will looks like a piece of meat and a bone add bone constraint and we're going to add inverse kinematics and you can see it asks us for the target and the pole target and we just made those so what we can do is select armature in here for the bone uh for the target bone just write target and you'll see ik target dot l and this you can write just pull and you'll see ik arm pull.l okay but you can see our fingers now are broken which is not good what you have to do is change the chain length and the chain length is amount of the bones in the chain and currently we we just have these two i mean not currently we're gonna just have two so the bicep and the forearm so just change it to two and also you'll have to change the pole angle so it fits correctly it should be -90 maybe it's 90 for you but make sure that it's flat like this and now if you take the target bone and move it you can see how well it works so it will be much easier to animate with something like this but i want the palm to follow this bone and a way to do that is you can click the palm bone the original one in the bone constraints tab you can add dampened track and this will make sure it follows it but we have to give it a target so assign the armature and again write target ik arm target dot l and what i'm gonna do is i'm just gonna change from head to tail just like that just drag it all the way to one and now if you move the target you can see that the palm follows and if you rotate it the palm follows again just like that so it's much easier to animate with this than what we had before and if you use the pole bone you can see that it changes the uh rotation of the of the arm okay now we just have to copy this one more thing actually uh make sure you select the ik arm target go to the bone properties tab and uncheck deform because we don't want this bone to deform anything this is just a control bone and same thing for the pole arm or the ik poll make sure that it's not deforming anything what you can do now is in edit mode so press tab or just change it here press a w and symmetrize and this will copy everything over okay so now we have both of them on each side and you can check the iks make sure that they work but one thing that doesn't work is a root bone for the root bone i'll go into edit mode select these two bicep bones and then lastly select the root bone ctrl p keep offset and now this bone will control the arms but we needed to control the eye case as well so make sure you take both of the uh ik targets and ik poles and then lastly just select this a root bone alt p or sorry ctrl p keep offset and now this bone will move the whole object once we wait paint it before we continue i'll just rename this armature to human fps just like that so once we're in unity we have human fps instead of armature make sure you save at one point so don't lose everything in order to move something with these bones so the this mesh uh you'll have to select the mesh first and then shift right click the armature ctrl p with automatic weights and what this is going to do it's going to allow us it's going to automatically weight paint our mesh and now it will deform it you can see that the bicep or the elbow animates quite nicely of course this is a bit exaggerated so you can always rotate and g to move make sure everything works together in order to rotate the fingers you can change here to local and then press g and z to rotate on the correct axis and just check that everything works you can see that the fingers uh rotate nicely as well that looks pretty decent if you want to look without the armature press a and h to select everything and then alt h once you're done looking so for example i can check how this looks alt h bring it back see how everything looks play around with it make sure that there's no problems with it for example the thumb should probably be a problem but we're not gonna move that part of the thumb that much i think it's actually pretty decent and you can see that well the root bone is also a d form but it's not deforming anything right now so that's good okay but if some of the way paints don't work for you for example i don't know maybe you want to change some what you can do is select the um the armature and then select the mesh and up here you can go to weight paint mode and if you select a bone you can see which area it affects and up here you can change the weight and the strength to of the mesh zero would be if you wanted to remove the weight and one is if you want to add it red 0.5 is i think yellow and so on and so on so yeah if you wanted to change some things you could if you wanted but i'm not gonna wait paint anything i think it looks pretty decent this is more for the high poly mesh and that's pretty much it right now i'm going to go over and uh wait paint the high poly arms and show you how that looks i weigh painted the high pulley arms and they work as well you can see that they bend nicely it's pretty good that's it for this episode in the next episode we're going to be importing this into unity so join me then and thank you for watching bye bye [Music] foreign
Info
Channel: Single Sapling Games
Views: 62,042
Rating: undefined out of 5
Keywords: script, make, game, for, free, development, dev, unity, blender, program, tutorial, guide, new, hd, twitter, youtube, developer, indie, design, art, cool, easy, quick, fast, 2019, fps, first, person, shooter, gaming, how, to, intro, introduction, learn, teach, learning, teaching, devlog, live, stream, livestream, unity3d, unity2019, blender3d, indiegamedev, indiegame, indiegamedevelopment, 2020
Id: 3DSK3K4mCFE
Channel Id: undefined
Length: 16min 23sec (983 seconds)
Published: Thu Aug 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.