Easy Rigging With Constraints in Blender 2.9!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to a very awesome tutorial about mechanical rigging using only constraints not armatures um now i understand that armatures use a lot less pieces and less meshes but um i tend to think that using constraints is a little bit easier so what we're gonna do is kind of look at an example i have here so i have the ship and by the way this project file is available to download on my patreon i only have one more uh one tier now which is three dollars a month it really mean a lot if you could support me there but um you can see that i have lots of little controls here and i can move them around and all these pieces are already like animated and this all works in local space and everything isn't that awesome and you don't have to like press a certain axis you can just hit g and move it and it does exactly what you want it to do um you know and there's lots of different rigs here you know you can move all these things around and different things around the ship anime and i won't go uh too in depth into this one because this one is for my patrons um but i will show you how we can rig another ship today so the one that we're going to be rigging is the lambda class shuttle from star wars uh the original trilogy and this is just kind of like an example of course you could rig anything like a fighter jet so let's go ahead and get started so i will say that you can download this model from a link that i've provided in the description it's a mediafire link some guy ripped a lot of uh star wars ships um and this is just gonna be in the empire folder but what i realized was that this these uh some of these models already have um bones attached to a lot of the pieces and there and they're uh a lot of pieces are not optimized for blender specifically so what i've gone ahead and done in this project file which i will download um in the link in the description so i've gone ahead and pieced and separated all of the pieces taken away all the armatures and modifiers and i've you know gotten the textures already and set up inside of blender so that you know they can be used more easily and i've done a few more things like model the boost and stuff like that that you can go ahead and explore but with all that being said let's go ahead and get to rigging so first thing that i want to rig are these large wings that i have right here so before we do anything let's go ahead and create our mesh controllers now you don't have to do this we can just use empties but i feel like it's it's more fun to use a mesh controller so what we're going to do is go to our collection up here create a new collection and we're going to call it controllers perfect and we're actually going to turn off the shuttle collection for now as well i'm also going to delete this so once we have our controller's collection selected let's go ahead and hit shift a and create a circle then we want to change the amount of vertices to 7. then we can tab into edit mode i hit seven on the number on the on the numpad to kind of put us in the in an aerial view of this circle and we want to rotate it we hit r and then rotate it 90 degrees we just type in 90. it'll rotate at 90 degrees now we want to edit this to just kind of create an arrow and so in order to do that we want to line some of these vertices up so let's go ahead and take these vertices and line them up first i'm going to take this one and type in 0.3 on the y-axis and then i'll move it down to this point take this one and also type in 0.3 on the y-axis and then these bottom ones i'm going to type in negative 0.3 because they are across the x-axis and therefore they would be a negative value because they're reflected and then we're going to take these points right here and let's see an arrow would probably be let's say 0.25 i think is a good place for these and maybe adjust these to 0.25 on the x axis as well and that will line all of our vertices up into this perfect looking arrow then we can select all of the vertices and hit f to fill it with a face all right now we have a little arrow as a matter of fact i think this this back part of the arrow they're all looks okay for right now but we're gonna put text beside it and i kind of want this piece to be shorter so i'm gonna you know scoot it up just a little bit to maybe like uh 0.3 negative point three i forgot that it's reflected um and that looks good to me okay so we're going to tab out of edit mode and we're gonna rename this uh let's say wing actually we'll name this arrow because we are going to be reusing this for multiple controllers and then we can just you know shift d to duplicate it right click to put it back in the same place and we will turn that arrow controller off for now okay so once we have that once we have our new arrow we can go ahead and double click on it and rename it wing control and we can hit enter and now we have the start of what our controller is going to be so when we have wings we want them to move you know we want to move this controller up and down to raise and lower the wings on our shuttle so what we're going to do is actually rotate this arrow um to be pointing up upwards so we're going to take it hit r uh and let's type in negative 90 and that should uh have it pointing uh straight up we can move it up uh the y-axis just a tad bit like that maybe scale it down then we can hit shift e to duplicate it uh and we can right-click to put it in the same place and then we can hit r and then 180 to flip it and we can of course move it below uh the other arrow the other thing that we want to do is actually put some text in here so in order to do that we are just going to hit shift a and we're going to add in a new text object and then we're going to tab on the keyboard just so we can edit it we're going to type in wing control just like that or yeah that's fine i guess then we can tab out of edit mode and so now we have some text here but we're going to scale it down just like that and also we are going to right click or i guess go up to object go to convert to and we're going to select mesh from text so now this is a mesh we're also going to right click on it hit set origin and we're going to set uh geometry to the origin and then we can you know position it reposition it just a little bit better we're also going to take our first arrow right here we're going to right click and we're going to hit set origin let's do origin to well yeah origin to 3d cursor and make sure that your 3d cursor is at the center of your scene once we have that we can select our other arrow and our wing control text and then select our first arrow so that it is the active object we can hit ctrl j and join them all into one mesh but this isn't um any kind of different colors and we want them to be different colors in the viewport so that we can easily recognize this controller um i i realize that this is all set up stuff and this is personal preference but i'm just going to go ahead and run through it as quickly as i can so we go to the materials tab and create two new materials uh the first one we're going to call arrows and the second one we're going to call well yeah we're going to call it text perfect now we're gonna go to the arrows and then go to the viewport display box we're gonna change the color to something very vibrant like yellow uh maybe turn the metallic up i i think that it tends to make it a little bit brighter when the metallic is all the way up um okay but now this is a little bit distracting i like my wing controller to be a different a different color so i'm going to hit tab i'm going to tap on edit mode and then i'm just going to select all of the vertices associated with the text then we go up here to our other material and hit assign now i can tab out of edit mode then you go to the text material scroll down to viewport display make it all the way white and make it metallic that way i have two different uh materials on my text and it looks like that i actually didn't get all of the vertices in my text so i'm going to do is shift z into wireframe mode and just try and re-grab all of the vertices in my text without getting any of the ones on the arrows and then go back up to text and hit assign and now we should be good to go cool so now we have a cool little wing control arrow um but it's not doing us uh anything good for right now so what we are going to do is hit r and then x and flip it on the 90 degrees so that it is facing the camera pretty much we're facing the the user we're just kind of creating a uh interesting ui for the moment now we can turn our lambda shuttle back on and we want to position this controller um in a spot that we will be able to see so maybe you know just use the uh you know g and then the letters associated with the axes to kind of move it around your scene until you get it in a spot that you like i'm gonna say right here so that i can take this controller and i'll be able to move it up and down now next thing we want to do is tie this all together so we're gonna go to our controller's collection hit shift a and create a new uh cube empty then we're going to hit one on the numpad and we're going to scale it up pretty large and we're going to also reposition it so that it is uh encasing our entire object that we want to animate um it actually doesn't have to encase the full thing i just um it's easier to grab if it is so let's see we hit three and we can kind of adjust it a little bit you can scale it along specific axes if you want to i'll scale along this axis and then kind of move it up a little bit okay so now we have a cool little cube controller but it's not tied to anything so what we do want to do is parent all of these ships pieces to the cube so in order to do that we can just you know hit shift z to go into wireframe mode and we want to select all of the ships pieces then we can shift select the cube empty and then hit control p to parent it to the object so now we should be able to take this cube let's just see out of wireframe mode and we can kind of rotate the cube along any way we want and all of the pieces of our ship should be following it they should all be parented to the cube which is exactly what we want and from now on you want to use the cube to actually drive most of the animation when it comes to the ship all right we're also going to take our wing control and pairing it to the cube as well so control p apparent to the cube perfect and maybe i actually want to take our wing control and kind of drag it in a little bit i actually like the uh our the controllers to line up a bit more with the world so maybe take the location along the x-axis make it 20 take the y um what was it negative three and the z will make it 45. all right actually maybe i want it a little bit more forward so negative 14. sure cool and i also like to turn off relationship lines because those annoy me like crazy so i'm gonna go ahead and turn those off all right so now we have a lot of the setup of our scene um so let's go ahead and try and get a little bit more done with this so what we're going to do is actually go into our controller's collection and create a new collection this new one we're going to call master controls just like that and let's go ahead and create another collection and we'll call this uh we'll call this others and then in others we want to create another new collection we're going to call it wings ah well there's already a collection named wings we'll call it wing controls all right so now that we have that this is all about organization by the way it's best to keep as organized as possible um when you're doing this kind of thing uh the other thing that we want to do is move our empties into into the correct collections so we're gonna take our wing control we're gonna hit m uh and then we're gonna move it to our master controls collection uh same with this cube we're gonna hit m and move it to our master controls perfect okay so now that we have that we want to go to our others collection maybe the wing controls collection we're gonna hit one on the numpad to go into front view we're gonna figure out where on the ship this wing will rotate by the way i do have some charts attached to that but we will get to that in a second so let's go ahead and actually maybe go into x-ray view so we can see this a little bit better all right so it looks like our wing is going to be rotating around this large circular gear type thing right here so we are going to create a new empty we're going to hit shift a go to empty and plane axis then we can uh drag it over to the spot in the middle of this circle so let's go ahead and select our wing again just so we can see it a little bit better one thing you can do to help you line stuff up is maybe turn off the superfluous pieces that are kind of getting in the way so i'm just going to select them and hit h to hide them um all of this landing here junk down here is not going to be helpful to us just yet either [Music] let's see and i i don't want to hide the master controller so hit h okay cool cool so looking at one and we're going to try and line this empty up a little bit better we're also going to select it and we'll make it a little bit bigger just so that we can line this up correctly so definitely get it on that cog right in the center that looks like a good place for it and we're going to have this wing rotate with this empty also we want to make sure that this empty is parented to the correct thing so we're going to select it and hit shift select the cube and then ctrl p to parent it to our master empty and then we can also you know hit seven on the numpad and line it up a bit better with the wing maybe in the middle over here that part didn't necessarily matter but i like it all to be in the general area where the real wing would be rotating around okay so now that we have this empty we want our wing control to drive the animation of our empty so in order to do that we're going to take our empty go to the constraints tab and add in a transformation constraint we're also going to change world space to local space in both of these boxes because when we rotate and animate our ship we want these controllers all to work within their own space um you know without some weird things going on in terms of the coordinate systems and i'll explain that a little bit more later on so we're going to take this empty and we will change our target to the wing control controller that we have right here okay so we're going to scroll down to map from and we want to map the wing controls z location like this as a matter of fact uh something that i think will will be helpful for the uh for this specific part is changing your coordinate system or your transform orientation to local coordinates so you can truly see what this wing controls local coordinates are so if i hit g and then z you can see the z-axis is actually the one that's going a lot uh aligned with the world y-axis so maybe i want to hit control a and hit rotation so now if i hit gz the z-axis is correct cool all right now we can reselect our empty down here for our wing and we want to go from map from and we want to take the z axis location of our wing control and transform it into rotation for this empty right so we're going to go down here to the map from and go to the z min and z max values now in order to do this we have to look at the current z values for our wind control it is currently at 45 um 45 i guess it's the location on the z-axis the coordinates for our wing control controller um on the zx is 45. so if i want to move this along the z-axis i can hit g z and kind of feel out how far i want to move this controller for the wings to go down i'm thinking somewhere around 25 or maybe 26 is where i want the wing control to stop so we're gonna go from 45 to 26 and that is our range so select your wing empty and change the z minimum value to your minimum z value of your wing control which in this case is going to be 26. the maximum is its current value at 45. okay so now what that is telling this empty is to look at our wing control z coordinates from 45 to 26 um and we can use those to transform our uh our empty here so we're gonna hit map two to kind of take down this menu right here and we want to change location to rotation we're going to map the location to the rotation of our empty now let's see we want to rotate our empty along its local y-axis i believe yeah so we're going to take versus y-axis we can see if we if we adjust the values here we are rotating it along the y-axis but we want to pull that information from the z uh axis of our wing control so we're going to set the y to z on our y source axis the the source for our y axis should be the z axis of our wing control alright so now we want to move our wing control down to 26. so that we can get a sense of where our um rotation is going to be as a matter of fact at this point in time uh it would be helpful to actually parent the wing to our empty so we're going to select the wing then select the empty then we're going to hit control p and set the object so now you can see if we rotate this empty the wing is going to follow it cool so let's take the wing control well let's go back to the empty and we're going to actually figure out how much we want um this empty to rotate now if you look at google images of the original lambda shuttle you can see uh in this image right here well let's see this image right here the wings are almost this this bent part of the wing is almost straight down and then it goes out it juts out from there so we're going to try and get this part of the wing to go straight down so let's go ahead and rotate uh we'll figure out the minimum value here want the wings to be going straight down and if you don't want it to go straight down of course you can you don't have to make it do that but i think it's more realistic if we have it go around this angle let's say 130 degrees so our minimum value will be 130 degrees and our maximum value should set the empty back to zero so now if we take this wing control and we move it around you can see it is causing the wing to rotate pretty cool but you know we are having to still hit g and then z and move this wing control around instead of just hitting g and you know being able to move this easily so we're going to select the wing control go to the constraints tab add a new constraint and select uh let's say limit location you want to turn all of these limit location values on and you want to look at the actual values for our wing control to input here so the location on the x value should be 20 and the maximum should be 20 as well and the location of the y value should be negative 14 on the maximum as well and uh the z is going to be our range so the minimum is going to be 26 and the maximum is going to be 45 and we want to select effect transform and change this to local space so now we can move this wind control just by pressing g in any orientation without having to press any of the axes pretty cool all right and the way that we can get the other wing to respond to this controller is very very easily um i'll actually show you that in just a second so i'll put this wing all the way up and uh let's hit one on the number pad and hit we actually duplicate this empty as a matter of fact so we'll hit one after selecting that empty and we're going to hit shift d and drag it along the x-axis just like this we want to put it in the center of our cog over here so kind of line it up the best you can [Music] let's see maybe like that that's pretty good all right but now you can see if we do move our wing control well first of all the wing isn't parented so let's go ahead and do that select the wing select the empty ctrl p object if we move our wing control now you can see this wing is rotating the wrong direction so to fix that we're going to take our empty and then go to the map2 coordinates and change minimum let's say minimum to negative 130 and see how what that does there we go so you just want to kind of flip that value so that it's rotating the opposite way perfect now we can move this wing control any which way and it is affecting the rotation of our wings super cool but you can see we have a problem and that these turrets which are on the wings are not rotating rotating with it and by the way i've also found that these turrets should only be in this orientation when the wings are down when they're up they should be rotated another way so i'm going to show you a quick little way to fix that and then we're going to round out this tutorial and you can use the things that you've learned to kind of you know maybe rig the landing gear if you still have any questions i can release a part two if you'd like so what we're gonna do is hit shift a create a new empty make it a plain axis and we're going to let's see we're going to try and line it up with the turret's orientation so we're going to hit one turn on x-ray view and we're going to move this empty up to the turret now we want the z-axis to be going uh through the turret um so we're gonna rotate our empty to try and match the orientation of our turret the best we can let's see i i think it's around negative 40. and we just kind of want to line it up then we can hit three and we want to line it up this way as well so somewhere in the center of our turrets is where our empty should be we can even kind of go into this view and we can hit g let's see shift z maybe or uh kind of line it up a little bit better g should see right there all right that looks pretty good to me so now that we have that we can turn off x review and we want to actually parent this empty to uh let's say the rotation empty let's we'll try the rotation empty first so we're going to select the empty then select our rotation wing empty for this side and then hit ctrl p and we're going to set uh the object so now that empty should actually rotate with the wing which it does perfect um and then we're going to take our turret and parent it to that empty so ctrl p object now our turret should be rotating with the wing pretty cool so what we actually want to do is take our wing control all the way down and select the empty that the turret is parented to then we want to go to the constraints tab we're going to add a new transformation constraint change it all to local space set the target to the wing control and we want to do the map from values from the z minimum of 26 and the maximum of 45. then we can take our map2 values down here and change the axis to the one that we need so we want it to rotate along the z axis so we're gonna change rotation and we actually don't have to change the source for this because we're going to be using the z location axis um to transform the rotation around the z axis of our empty so whenever it the wing control is at its minimum value we actually want this mtp to be rotated 0 degrees but when this wind control is at its maximum value we are going to rotate this turret up a little bit so if we take the maximum value and we rotate it you can see that the turret is um getting out of line with the wing which is not what we want so we're gonna go over here to the order to the uh this default drop down menu right here we want to make sure that uh z is the f is the coordinate that comes first so we're gonna we're going to go down here and choose one of these options right here i'm going to choose the bottom one so now you can see our turret is now in line with the rest of our wing perfect we can kind of adjust the max value a little bit more until we have this turret you know maybe at 90 degrees is a good value just kind of aiming up just like that super cool so now if we you know drag this down you can see the rotate the turret is rotating out as our wings come down and it rotates up as our wings go up perfect now we can actually take this empty and we can duplicate it drag it over here and of course it's not lining up so what we're gonna do is uh change the y rotation to be 40 degrees instead of negative 40. so now the z-axis should be aiming the correct way and maybe we can line it up a little bit better with the actual turret that's all right um and then once we have that we want to fix it up a little bit so we're going to change the maximum value to zero so that we can you know get this uh turret paired uh parented to our empty so we can select the turret then select the empty and then hit ctrl p select object uh and now we can go back to our empty and change the maximum value to 90. well actually that's going to be the uh the wrong directions we're going to do negative 90 because we are flipping it because it's across an axis so now if we take our wing control and we drag it with g we are having a bit of a problem this is something that you're going to have to do with you're going to have to go through and kind of uh you know debug your rig a little bit so you can see that the rig that this uh turret is parented to is actually parented to the empty for our left wing instead of our right wing so we're gonna select this empty then select the empty for the correct wing control p and then object as a matter of fact we're gonna select it hit alt p to clear parent and keep transform you know what let's actually change some stuff we're gonna zero out the uh transformation constraint we have here then we're gonna clear the um parent of our turret so alt p clear parent and select our empty alt p clear parent and key transformation and now we should be able to parent it to the correct empty so control p object turret turn empty control p object go to the empty and maximum should be negative 90 degrees all right now let's try and do that again there we go so now you can see when the wings are down the turrets are facing out when the wings are up the turrets are facing up as well so super cool um and i'm going to turn everything that i've hidden back on so alt h to turn it all back on and look at that we can test this by taking the cube rotating it and you know moving it entertaining the wind control and moving it now everything should move with it just you can just hit g and move it along super cool so what i'm actually going to do is take this wing control and go to the object properties then go to the visibility and uncheck show in renders that way this wing control will not render because it is a mesh object not necessarily an empty and i think that's going to be it of course you can also just hide the entire controller's collection if all of this stuff is getting your way um but i'm gonna just go ahead and hide the others collection we should be i'm good to go just like that so we can take the you know wing controller and move it all around and we get some really cool stuff now if you'd like a part two of the tutorial which would be me focusing on the landing gear over here um focusing on how to actually rig these pistons to go up and the doors to close behind it um with the correct timing uh be sure to leave a comment down below and i can give you a a part two of the tutorial but i think this is where i'm gonna leave you um to kind of try and do it on your own so thank you so much for watching i am kecked next and i will see you next time [Applause] [Music] you
Info
Channel: Kext Next
Views: 4,442
Rating: undefined out of 5
Keywords: star wars, blender, easy, tutorial, beginner, rig, rigging, spaceship, free, 3d model, learn
Id: 0qk83Eu-PQQ
Channel Id: undefined
Length: 29min 52sec (1792 seconds)
Published: Sat Sep 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.