Maya Constraints - Part 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right so now we're going to look at constraints and how constraints are actually different than parenting as we saw on the other our first rigging lesson so to do a parent I'm sorry to do constraints you need to be under the animation tab up here so if you're under or something else like polygon let's say we're modeling you need to make sure that you go under animations and if you don't have this tab you know a shortcut for that is you can just press f2 and then notice that will change to animation and then to find the constraints you go over here says constraint push that and then you'll see your constraints listed here so we're going to learn about these five different constraints so point aim orient scale and parent so actually parent is different all right this parent is different than the parenting we saw in the first lesson that's a different type of parent this is actually a parent constraint so don't get that confused with parenting right the child parent type of stuff so I'll explain how that works a little later so I'm going to going to cut this out every time you see these dotted lines here you go to any other men you see these dotted lines here means you can actually cut this out as a separate window so it's pretty neat you can dock this over here just remember that they're under constraint so that's where we're going to find these all right so to learn about these constraints and how they're different from parenting pretty much the only thing that sets them apart from each other is the the stuff you'll see in the channel box and the fact that they are constraint to each other if you remember when we were doing the parenting you remember the child could move independently away and then you could rotate the parent and then the child would move with it right and then you can move it like way over there and I will move with it well a constraint will not allow you to do that and I'll show you how that works so these constraints are actually used to control different types of attributes what I mean by attributes is for example translation is one type of attribute and then rotation is another type of attribute and then you have scale right so these constraints will actually constrain to each of these particular attributes that we have here so for example let's say I want this to be the the leader right and I want this one to be a follower this still kind of works the same as a child parent relationship but it's a little bit different and I'll show you those differences so actually what constraining does is you'll be able to select one and then the other one will get affected by it as well like I said kind of like the child parent relationship so let's look ahead and see how this works so to make the constraint it works the opposite of parenting remember parenting was child parent p4 constraints is parent child and then constraint so I know I get kind of confusing I still get kind of tricked into that but I know that constraints you select the parent first so this is going to be the parent okay so I'm going to call this parent and I'm going to call this child now this is separate from parenting in the first video these are going to be constraints but they still use that same vocabulary of child and parent right it just means that one is a leader and the other one is a follower so this one is going to be the parent and then I'm going to shift select the child and then I'm going to do a point constraint so I'm going to go into the options here the little box option box and I'm going to reset settings so that you guys have the same setting as I do and then we're not going to worry about all this stuff down here everything is set to default works fine the only thing that we're going to be messing with with constraint settings is going to be this maintain offset so we're going to leave this as is right now and I'm going to close this up and I'm going to say point so what does that do and why did that move to where the sphere is so if I grab the sphere and I move this up and down notice that the box is moving with it right I can move it this way the Box moves with it I can move it this way the Box moves with it right so now what happens if I rotate it if I rotate it notice that the box is not rotating only the sphere is now what happens if I rescale it if I rescale notice that only the sphere scales but not the box why is that well because point constraint only connects to the translation right so if I look here at the box look over here this is the box is a child that's the follower right the sphere is the leader so if I select the box and look over here the channel box you see that only the translate has these blue boxes that's because a constraint this point constraint only connects the translation of that child and parent relationship right so if I grab the parent and I translate it and the y in the X and in the Z that that little that box is going to follow because the point only connects translation notice that rotation and scale this is not set to blue so that means that there is no connection there about that's why when I move it around it moves with it but when I rotate it it does not rotate with it all right so that's how that parent thing works that the constraint the point constrain works but now the other question is why did the box move to where the sphere was right why didn't I come it didn't stay there where it was well the reason why it moved with the sphere was because if we look at the option maintain offset is set to OFF so if we actually checked it on before we did the constraint then it would have worked there would it just stayed there Bobeck because we had it off it actually connected the pivot point so the pivot point of the box matched up with the pivot point of the sphere so that's why I'd moved because we had this checked off so constraints are a little bit more difficult to to undo it's not as easy as doing a shift P as we saw with the two unparent right so to undo the connection you have to go back to the outliner remember window outliner and then do a show all and then notice here we have the child we expand this one and you'll see here this little exclamation mark in red it says child point constraint right remember that's the the point constrain that we added here so to remove that point constraint you can choose select that exclamation mark but this is point constraint and hit delete and then now we have deleted that point constraint so I can grab as a parent and I can translate it and now it does move with it so I can move this one back to its origin spot right so that's what happens when you do a point constraint so let me show you another thing that happens when we do a point in the stream but now let's do the maintain offset so I'm going to do maintain offset set to on so select the parent select child and then do apply and close it now check this out we still have the the translation a connection with them right so I can select the parent I can move it but now notice that the box did not move to that pivot point of the sphere because we did a maintain offset so that's another thing you guys need to learn offset so that's something that we're going to be using a lot when we do rigging right so I can rotate it and it does the box does not rotate because there is no connection you notice that the rotate is not set to blue so it's the same thing it's just that we did a maintain offset I can rescale this it does not affect it does not affect the child only when we translate this all right so another thing that we need to learn about constraints in and this is this has to do with all the constraints if you remember when we did a parenting let me do a regular child parent so you can see what I'm talking about so I'm going to grab this sphere little runner make it smaller and I'm going to duplicate this oops and make this and smaller now I'm going to set this to zero for each transformation do the same thing press G notice everything is set to zero everything is set to zero on this one everything set to zero and that one everything is set to zero all right so let me do the child parent P so this one is has a parent constraint I'm sorry this one is parented this one has a point constraint to it right so let's look at the difference if I move this one down and select the constraint one and let's move this one down as well so let's look at what happens with the regular parenting one so these were the the leaders right these two were the leaders and then these two are the followers so if I select the small sphere which we did the child parent P if you look here this is still set to zero right as if it never moved even though we are moving it select a child everything that still is that set to zero now if I select this one this one has a constraint that one does have values in here it has a negative point 986 so as I move this one around this one a constraint actually shares this value with the child notice the child also has negative 0.193 the parent also has negative 0.1 93 so you can see the difference between a parent constraint I'm sorry a parent a connection and a point constraint or actually any constraint so constraints and parenting it so that's the major difference between them so as we move the constraint the child gets the same values as I move the parent this parent child does not the child does not get the values from the parent so that's one of the benefits of using is this child parent p4 controllers when we do rigging and then this will do later on when we do joints and stuff like that which we'll get into that so let's set this back to 0 let's go into the outliner show all going to the child and let's delete that point constraint now let's look at what the aim constraint does actually for the aim I'm going to show you what it does with the cone because it's easier for that so do you create polygons I'm going to do a cone so aim constraint it's kind of the same thing I'm going to rotate this and then 90 and I'm going to freeze transformations so that everything is set to zero now so aim the only time I use an aim constraint is when I'm rigging the eyeballs so when you have a controller let's say we wanted this to be the controller let's say this was an eyeball in our character and the I was looking at this controller right so if I move this controller up I want this eyeball to rotate up like this and look at the controller right so that's actually what that aim constraint does so if we go into the options go to edit reset remember I'm not too worried about all these settings the only thing I'm concerned about is the maintain offset so again if we do the parent-child and then constrain them normally every uncheck maintain offset is going to flip out to another direction and the reason for that is because it has a different type of pole vector which pole vector is it can get a little bit more complicated but pretty much what you have to do is you have to come in here and you have to find the pull vector but or one of the aim vectors I believe that one so we're going to have to come in here and aim it yourself so I can rotate this one set 90 degrees or so maybe 180 so you know I can get tricky here to try and get this precise so I'm going to undo this and I never use the aim constrain that way so I'm going to undo until that disappears and I'm actually just going to do a maintain offset and again select the the leader select the follower to apply and close this so now because we did a maintain offset notice that this did not flip to the other side right so when we do an aim constraint always make sure that you have a maintain offset checked on and then now this one you can move it around and check that out the child this one will always aim at the parent and it's constrained that way so if that was an eyeball and this was our controller we can easily have our character look around right so that's pretty cool it's pretty cool I'll constraint that we can use zero that out and that one has some of the rotations I think when I constrain it it moved let me undo and do there it goes so that's how the aim constraint works so the only time when I use that is when I'm reading the eyes so orient constraint this one only connects rotation all right so if you remember point constraint only constraints translation aim constraint it works differently so we don't have to worry about that it just has how you saw this one points to something and it aims at it all the time orient constraint only connects rotation so let's go ahead and do that so go to the option box preset and again I'm going to do a maintain offset because I don't want this object to move and then I'm going to do parent-child apply now what do you think this is going to do when I move the leader of the parent if I look at the child look here if you look at the child it only has that rotation connection to the parent so if I move this if I translate it if I use one of these notice nothing happens because it's not connected to a translate right so I can move this around however I want nothing's going to happen but as soon as I I go into the rotate tool and I rotate this it's rotating with it right so I can rotate it this way and rotate it this way I can rotate it this way so that constraint is only connected to the rotation axis so even if I wanted to move this away let's say I move this out now rotate it you can rotate it up there because the translate has nothing to do with that right but the rotational does so if I rotate this one and I move it up and I rotate this one it's going to snap back to its original location because that's that's constraint that is attached to that rotation axes as the parent so this one cannot move freely in the rotate because we have that connection to the parent so I rotate it rotate this one a little bit boom you'll see it snap back because it's constraint with the rotation all right so let me undo this get rid of the constraint and show you what a parent constraint does and do it all right there so lastly how's this scale constrain is pretty self-explanatory again is it going to connect now the a scale so I can do maintain offset select the parent select the child apply close it and then as I rescale this obviously that one's going to scale with it I can move it nothing happens because it's not connected to the translate I can rotate it nothing happens because it's not connected to the rotate but when I scale it I guess it only works uniformly thought I would squish this way but it doesn't it only works when you scale it together this way see if it has a different option nope but I've never really used a scale constraint because if you do the child parent P it also scales it so that's how the scale one works is and like I said when we've rigged characters I've never really used the scale constraint so if you guys want to use it go ahead then lastly the parent constraint you might be thinking well we already saw that the point constraint connects that we saw that the orient connects the rotate and we saw that the parent up that the scale connects this so that pretty much takes care of everything right so what do you think the parent constraint does this one actually it's very useful because when we start rigging a lot of things actually translate and rotate right so if I want to move this off into some other location and rotate it I want to be able to connect those two together well actually this parent constraint reset and make sure that maintain offset is checked to on so grabs a parent grab a child apply closes so if you look here at the child this one actually connects both of them you see all these in blue it connects to translate and it connects the rotate so now as I move this one it's going to move with it as I rotate it it's going to rotate with it but if I rescale it nothing happens to that one right because there is no rescale connection onto that one so I can move this one back hit zero so that's what happens when I do a parent constraint and then because this one has a connection with the translation in the rotate it's not going to allow me to move it away because if I move it is going to snap back because it already has a translation constraint to it if I move it away or even if I just rotate it then I move it it's going to constraint back so it doesn't matter what I do move move as soon as I move the parent boom it constraints back so if you remember the child parent that one you can move the child independently and it didn't matter what the parent did it just let the child go on its own but when you do constraints it does not allow you to move the child and then move the parent because then it will snap this one back because it is a constraint so let me show you one last example before your put your brain explodes all this information I know it's pretty crazy so I'm going to go into this constraint now I'm going to show you how you guys can create this little rig setup when it comes to rigging so let's say I had this controller right so constraints also work with controls they work with constraining objects together so I'm going to show you what happens when you do a constraint with the curve or a control and an object so it's still the same same idea so let's say this was an elevator and this was our elevator control that we want to rig so that our animator can animate this controller going up and down and the elevator will follow it so since now you have to think again logically since elevators can only move or in other words they can only translate they do not need to rotate they do not need to we're not going to worry about the aim because we're not aiming anything it's not like an eyeball it's not rotating so an orient constraint won't work with it and we're not going to scale the elevator and a parent could work because remember the parenting connects the translation and rotation but because we're not worried about rotation you know why are we going to use that one so a point only connects translation so when we want this elevator to move up and down you know we only want the translation right so I can select this controller is going to be my parent right as I move the controller it's going to be the parent and then I want this elevator object as my child so I'm going to select the parent well make sure the offset is checked on right select the parent the controller shift select the child and hit add and now notice we have a connection in the translate so if I grab this controller I can now move it up and the animator can can move this up and down he can even you know move it like this but if he's a good animator you know elevators don't do this they don't go forward or sideways so it it depends on the animator how he wants to move it so that is how you can use that that point constraint and again I was going to use the the same thing here that I did with the aim but you guys already know how to do the aim so make sure the maintain offset is checked to on select the parent select a child and add it and then now as you move the controller this little cone you can see how it's pointed will always follow where I move this controller so again it these can ya these constraints work with curves and objects you know like you saw with the others so it doesn't always have to be just objects it can be objects and controllers working together and then this one let's say we had a vehicle and we wanted to rig this so that when I rotate this when I rotate the controller right now I'm rotating the controller but you probably can't see it so let me let me make it more obvious so you guys can see when I'm rotating this I'm just going to select these I'm going to move it like this press f8 oh that's not so as I rotate this right the wheel is not turning and I want this wheel to turn with the controller I put nothing is happening so I need to do a constraint from this controller to this tire here so how do we do that remember point constraint will only connect translation in constraint will aim at an object orientation or do rotation so that's the one we want so let's open up the option box make sure maintain offset is on select the controller select the tire hit add now as I select the controller I can rotate this and the tire will rotate with it right so that's what I want to do now I made it so that this brake doesn't rotate with it because in a real car the brakes don't rotate with the tire so that's what would happen all right so that's pretty much it for the constraints and that's what we're going to be using when we start adding controllers to the bones so we typically constraint the controllers as we have here you can string the controllers to the joints or to the bones in the character and then the parenting is done you know the child parent is done with controllers to controllers so we'll see that once we get into rigging our first character all right so check out my youtube channel animation methods on YouTube where you can check me out on my website animation methods calm or I have the rigging book now available and I also have an animation book and I also have more tutorials organized on my website so you guys are welcome to check it out all right so I hope you guys learn what constraints to and the previous video what parenting does and how they're different all right catch you later
Info
Channel: AnimationMethods
Views: 28,301
Rating: undefined out of 5
Keywords: rigging in maya, constraints, maya constraints, how to rig, rigging a character, rigging tutorials, rigging made easy, animation methods, Autodesk Maya (Software)
Id: m8dkoTOY2a0
Channel Id: undefined
Length: 29min 58sec (1798 seconds)
Published: Mon Apr 29 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.