How to Rig a Gun in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello my name is hayden and today i will be showing you how to rake a gun in blender so i'm going to open up my rig that i'm going to be animating with i'll save it as a alternate file this will be rig tutorial and then i'm going to bring in my gun mesh from there i'm going to rotate it transform it scale it to be the correct size and i'll do that using the palm and the hand relationship and after that i'm going to get a quick posing with the left hand to see if i need to adjust the scale again once you're happy with the scale and the posing we're going to head down to this little green triangle and this is all about the vertexes and the vertices and you see here vertex groups there's already a few vertex groups made for the tutorial we're going to delete them hit a to select all the vertices and create a new group we're going to call this body and we'll go down to assign and all the vertices on the model are now going to be assigned to that vertex group we'll then later make the other vertex groups and unassign it from the body on the individual parts you can press l and it will kind of select the whole part and here we're gonna make a new one called mag and we'll assign it to that vertex group next up we're gonna do the bullets and this is gonna be the main bullet that will go like in or be with the charging handle if you want to show it off so we'll just hit l on the shell and l on the bullet make a new group for it and hit assign and here i'm just testing out um by hitting select making sure it actually worked we'll move on to the other two bullets in the magazine and call that bullets and then we're gonna keep going down the line selecting each of the parts that we want to control isolate them with our selections create a new vertex group and assign it and these vertex groups are just going to be different moving parts of a mesh that you want to control on weapons it's pretty consistent anything that you want to animate most likely the magazine the trigger the mag release the charging handle the slide sometimes the bolt is separate from the charging handle uh it all depends on just what you want to animate all right now that we have all of our vertex groups created and assigned i'm going to go through the list and hit select on all of them except the body and once we have almost selected we're going to go to the body and hit remove and to check that it all worked we're going to select the body and move it around and as you can see i forgot part of the magazine so that's the easy fix we'll just deselect all of those vertices and we'll go back to the magazine hit a sign and go to the body and remove it all right so we now have all the vertices double checking that the body is only the static parts of the mesh and none of the cool parts that we hear in anime so now we can go into the armature and edit mode of the armature and start making some bones for this it helps to de-clutter your view for all this especially if you are extending part of an armature and so from here i'm just going to hit a and then h to hide then we can unhide all of these things later with alt h as you can see here a new recording is started and that is because my blender crashed and i lost my progress there so some of my vertex groups are named differently but anyways we'll carry on we're going to create a new bone with shift a and we're going to place that bottom sphere at the point in which we want to control the weapon here it's going to be a little bit above that handle and we're going to start duplicating and scaling some of the bones and all of the places that we want to control our vertex groups i don't bother too much with rotating the bones here just for consistency purposes later in the graph editor it helps with the position and the rotations being somewhat a bit more uniform and i'm going to roughly move the safety's bone in position along with the bullets position for just animating inside a blender it doesn't have to be super precise as long as you animate it correctly you're fine it's not gameplay um and next up we're gonna be naming all of our bones and this is where it helps to be really patient and make sure that you name all of these bones the same as their matching vertex group so here we're going to name the body bone body as it says in the vertex group there and i like to expand that which i did earlier and here i'm just going to go down the list to find bolts call that bolt and our first bullet bullet and then next up is bullets after that is the mag and next is mag release and as i'm doing this i'm just double checking my spelling if you want to be really critical about it you can double click the vertex groups copy and paste into here but if you trust your spelling and you're not too tired it should work out just fine here i forgot the trigger so i'm just going to create a new vertex group call that trigger go down over to body remove it from the body and make sure it's signed to the trigger vertex group go back here to bone rename it to trigger now the moment of truth select the gun mesh then the armature and control p it's going to bring up this menu and make sure we hit with empty groups and if it all worked we can go into pose mode and select our body bone hit g and move it around and voila just test everything out making sure it moves with the corresponding bone if it starts moving with something else that means it is most likely sharing some vertices with another vertex group and here i was moving the trigger and i don't think it was working so we're just going to go back because i think i forgot to assign that those vertices to the trigger's vertex group and because we did assign with empty groups there's all these uh armatures vertices in there all right and as you saw before all of these bones move individually and we're going to connect some of them select both of your bullet bones and then select the magazine bone hit control p and keep offsets if you do connect it it's going to move it right to the magazine so remember you hit keep offset and you won't lose all your hard-earned work next up we're going to select the charging handle the mag release the trigger and the safety and last we're going to select the body and do the same thing control p and keep offsets as you notice i'm not going to do that with a magazine i'm going to do that with a constraint in the bone constraints area instead so we can control uh its relationship on the fly during an animation so if you want to have so a move with the gun here but we can animate the influence to zero and where it'll act as if it's in world space so if you want to do like a mag throw or something like that or if you want you can make another child of and have that be with the wrist so if you're reloading you can animate the influence to go from zero on the body and then do that with a hand and now the magazine follows the hand if you want i don't typically do that with my stuff i typically animate the left hand being constrained to the magazine and then animate the magazine from there but each animator has a different process for that but this is mostly a raking tutorial so i won't get too far into that here personally i like to keep my constraint systems inside blender as simple as possible right hand parented or constrained to the gun and left hand constrained to the magazine magazine will then be animated out and back in to the weapon and then as you see here my influence is zero and if move it up to one it moves up so i have to hit set inverse and it should go back to that position and i'll just make sure you adjust the influences there make sure that they're one um since you're doing at the start it's okay if it gets a little off even after hitting set inverse just reposition it on your idle pose and that pretty much sums it up uh just a side note you can create your guns armature separate from your hands armature and you can animate both of those at the same time but you might run into some issues with the action editor and each armature having their own action so i like to work with the unified rig that includes the hands armature as well as like a weapon system set up within that same armature and so you can easily use the action editor and eventually use nla editor if that's your jam that pretty much sums up this tutorial happy animating happy rigging and take it easy
Info
Channel: Haydn Cooper
Views: 54,589
Rating: undefined out of 5
Keywords:
Id: lSGkAgDbim0
Channel Id: undefined
Length: 11min 0sec (660 seconds)
Published: Fri Jul 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.