#RiggingInMaya | Part 02 | Joint Fundamentals

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay welcome back before we start to build the skeleton which will drive our creature i wanted to first go over some of the fundamentals of joints it's important to get a good understanding of how joints work in maya and realize there is a lot more to them than simply being nodes which push vertices around if you already have a good grasp of rotational axes rotation orders and gimbal lock then please feel free to skip this video i would however recommend you watch it just in case there are any tips or tricks you may not have heard of before really quick question for you now how would you like to help support the future of this channel and keep these videos free well there are a few options one would be to simply treat me to a coffee at my coffee page as a quick and easy thank you you could also grab something from the ant cgi store or one of my other online stores like cubebrush and gumroad this is where you will also find the course files that go with this course so you can download them and follow along however for as little as 99p a month you could join the ant cgi club there are a few ways you can join you could head over to my patron or coffee pages or or alternatively simply hit that join button below this video in short the more support i get the more time i can dedicate to creating more high quality content just for you to get more information on how you can help follow the link on the screen or in the description below okay now that's out of the way let's get on with the video okay let's start with joint creation there are a number of ways to create joints in maya first we can use the main menus we need to make sure the menu set is set to rigging so we can see the skeleton menu now we can see it we simply move down to create joints and open the options just reset this so it's back to the default settings so here we have the main options associated with creating joints and joint chains i don't want to cover all of these in this video instead i will focus on the more important areas here and we can discuss the others as we build the skeleton later in the course you will notice that the mouse pointer has now changed to a cross hair which indicates we are in joint creation mode what i like to do is snap the joints to the grid just to keep things neat and tidy to do this i can simply hold down x which will activate grid snapping you can also see the button being activated up here what i can do now is click anywhere and the joint will snap to the closest grid point i can then click over here and create a second joint and then a third to complete the joint chain i just press enter and then we drop out of joint creation mode here we have a simple joint chain with each joint being automatically parented to the one before it you can see the hierarchy in the outliner so that is one way to create joints the next is to use the rigging shelf the create joint button is here and to open the options we simply double click it you can also see the last used tool is shown here for quick access and we can create joints just as before finally you can hold down space to access the skeleton menu through the hotbox okay now let's dig a little deeper into the world of joints here you can see we have a series of orientation settings these control how the joints axis will be created if i enable orient joint to world you see the other options become disabled what this is going to do is create each joint but make its axis match the world axis so the axis you see down here let's create three joints again i'll do them like this so it represents an arm with the shoulder elbow and wrist now if i select the joints you can see that the axis is the same as the world axis usually when joints are created the axis is automatically adjusted so the joint points to the next one in the chain so having the axis set up like this is no good for our joint chain if i twist the root you will see that the elbow moves up and down but we need it to remain still and just rotate or twist with the root so we just want it to turn and not change position the same with the middle joint or the elbow joint rotating this causes the wrist to move okay let's delete those and add in the correct orientations and let's turn this off now let's create the chain again but with these default settings you see maya has now adjusted the orientation of each joint for us so the x-axis is now pointing towards the next joint what this means is i can now twist the root joint and the elbow joint rotates but doesn't move up or down so this is more like how your shoulder would work the same with the next joint okay so let's look at what the settings do the primary axis is the one which will point towards the next joint in the chain the secondary axis points away from the joint finally the secondary axis world orientation tells maya which way you want the secondary axis to point it uses the world axis as a guide so setting this to y means the secondary axis will point up wherever possible you can also use this drop down box to invert the direction if needed let's build the joints again so you can see what these do so here you can see we set secondary axis to y and it's pointing up because secondary world axis orientation is also set to y the primary axis is x just as we specified in the settings the z axis isn't set because its position is purely dictated by the primary and secondary axes what's good is we can change this completely so this time let's have y pointing down the joint the secondary axis has automatically jumped over to z because we can't have the primary and secondary axes pointing in the same direction let's change this to x actually now we need to decide which way we want x to point we can leave this set to y because we want the x axis to point up let's create some joints and see what we have so there we now have y pointing down the joint and x is pointing up perfect okay let's do this one more time so i want z pointing down the joint this time i want y to be the secondary axis and that should point to the right or along the world's x-axis so now we have the x-axis pointing up and that's because we told the y-axis to try and point to the right because the joint is already pointing right it's trying its best to go there but this is as far as it can go so that's how to set up your rotational axes okay let's reset this if you build your joint chain and then decide you want to change the orientation of the joints you don't need to rebuild everything you can use another tool to help let's build the joint chain again and close this let's imagine you're building the skeleton and you need to reposition the joints so let's move this to here and this here maybe down slightly too and move this up here as you can see manually moving the joints has broken the orientations so each axis is now misaligned and no longer points to the next joint so essentially the rotations won't work as we would expect you see we've lost the nice twist we had it's not an issue though all we need to do is go to skeleton orient joint and open the options as you can see this is exactly the same as the section we had in the create joint tool i'll just reset it so you see we have the same options here to control where each axis will point we can tell the tool to also affect all the children of the selected joint so the other joints in the chain if i apply this now the orientations are corrected using the settings in the tool as a guide so x is now pointing down the joint again and y is pointing up the twist is fixed it works here too because we told it to also update the selected joints children we can also completely change this setup if we like so let's switch to y being down the joint and we will leave zed pointing up that's updated good as you can see it's dead easy to correct the orientations if you need to the only joint it won't affect is the last joint in the chain simply because that has nothing to point towards what we can do with this though is instead tell it to match the previous joint's orientation this is essential if this were to be a wrist joint for example all we need to do is enable orient joint to world again and apply that because this is already a child of a joint it will just inherit its parents orientation so that now matches this one's orientation okay let's close that if you did want the end joint to have a different orientation simply create a temporary child to that joint fix the orientation and then delete the temporary joint there are times when you will want to be able to see a joint's orientation without having to select it to do this select the joints and go to display transform display local rotational axes can now see which way each axis is orientated what this also allows us to do is go in and manually adjust each axis rather than it being done automatically there are plenty of times you will need to do this because the mayor tools don't always get the joint's axis pointing the way you want you will see this as we build the creature's skeleton what we need to do first is switch to component mode using this button here now move over to the miscellaneous components button this is the one that looks like a question mark and right click select local rotational axes what this allows you to do is select the axis itself it will turn yellow when selected you can then adjust it like so let's say we need it to point more in this direction so you can see that the orientation has been changed and we can rotate it around a new axis this does leave us with a problem though if i select the root joint you will see that the rotation and translation axes both match even the scale axis is the same if we zoom in a little you can see that we changed the rotational axis but the translation axis hasn't changed so it's different so this and the scale axis need updating too or it will cause issues with the rig if i look at the joints attributes you can see here there is now a value of minus 57 on the rotate axis this is essentially an offset we added when we edited the axis having this value here isn't ideal like i said it can cause problems with the rig but more importantly when the skeleton is exported to a game engine the animation won't come through correctly so we ideally need to clear this value maintain our orientation and also make the translation and scale axes match the new orientation the problem is there is no magic button or tool to fix this yet in maya on the bright side it is a very easy fix and all we need to do is use a bit of mel script open the script editor now don't worry if yours looks different to mine i prefer to use a plugin which enhances my script editor this is because i do a lot of scripting all you need to do is type joint minus e minus z s o all this is going to do is edit the joint and reset its scale orient which will also reset the translate axis too if i select the code now press enter to run it with the joint selected you see the translation axis resets to match the rotation one that fixes the problem the scale axis is corrected too we have also zeroed out the rotate axis values too so the joint is now clean and tidy and ready to be passed to a game engine okay so that's a rotational axis covered and we will see more of this in action in the next video let's now look at another important area of myers joints and that's their rotation orders first let's build another basic joint chain we will use the default values for this this will do as you rotate a joint in maya you will see that each axis red green and blue all follow as it moves they all stay locked equally distance from each other which makes animation so much easier the problem is this is all a lie we aren't actually looking at the correct axes if i hold down control and shift and then right click we get this marking menu in here we can change how the manipulator looks and how it works let's change this from object to gimbal you will see that the blue circle has now disappeared what you will also notice is that you can't manipulate the joint now not without selecting an axis now if i rotate the y axis the red x-axis follows but the blue z-axis doesn't but if i select the z-axis and rotate that the other two follow it what's even more confusing is if i switch to the x-axis neither of the others move so what's going on what we are seeing are the true rotational axes so instead of them all moving as one what you can see is that they are in a hierarchy of their own much like our joint chain in this setup z is the parent axis y is then parented to this and then x sits at the end of the chain so it has no children beneath it so this is why z moves everything y only affects x and x doesn't alter the other axes it's because of this setup we can do something like this if i rotate y to this point you will see that the x and z axes are overlapping and this is gimbal lock when two axes occupy the same plane so essentially both rotate the same way locking this joint until the y axis moves again so how do we get around this issue unfortunately there is no easy fix which will work in all situations not without creating a complicated system of nodes anyway what we can do though is change the hierarchy so we can dictate which axis will affect which and we can do this with the rotate order attribute by default it is set to xyz and this is almost the reverse of what the hierarchy is representing so x is actually at the bottom of the chain y is in the middle and z is at the top there are lots of other options for you to experiment with let's try the next one down y z x so this should mean that y is now at the bottom of the chain then z and then x should be at the top and affect everything else okay so y doesn't move anything else z moves y and x moves the others okay let's try another z y x so this time z has the least control y is in the middle and x is the dominant axis so you can now see how that changes how the joint rotates the idea is that you would set this up to minimize the chances of gimbal lock so you work out which axis will be used most often and then set the rotate order to reflect this so if this were an arm we would use z to lower the limb and then we can use y to move it forwards and backwards leaving x to be used as the twist you see we still do hit that lock here and it's important to say that you will never completely avoid it what you can do is set the rotate order to reduce the chances of it happening don't spend too much time worrying about each and every joint though in your character in most cases the default xyz will be fine because most joints will only need to rotate one particular way the elbow for example should only need to move like this but even then we hit a lock at this point so in this instance we know that y is the primary axis so we can change the rotate order to z x y that fixes it this is just something to keep in mind as you're building your skeleton work out which axis is the most important and update that rotate order accordingly don't worry too much though you can change this later so long as no animation has been done using the rig changing the rotation order after it's been animated will break the animation another important thing to mention is that all your controls and offset groups if you use them should also have the same rotation order as the joints they are moving there are a couple of other options which you might find useful when building your joint chains the first is symmetry this is off by default but when active this will automatically create the joints on the opposite side of the character for you this is what happens with it disabled as you already know if i set this to x-axis it will mirror the joints along the x-axis here if i create the joints now you can see the opposite side has been created too what's even better is we can move this side and the other follows so it's a proper mirror image we can rotate it too and it follows so you can see how this could help speed up the process of building a skeleton let's create another and mirror across the z-axis instead and that's done if we look in the outliner now you can see that the opposite skeleton has symmetry constraint nodes attached which are what makes the symmetry work the problem is these also lock the joints so you can't rotate them or translate them you can see they are locked by a direct connection with the yellow tags on the channel box so they will only follow where the original joints lead them if you do want to get control of them again all you need to do is delete the constraints that grants them their independence so you are then free to do what you like with them there's one more area i want to quickly talk about concerning joint creation and that's the projected centering option what this will do is automatically place the joint in the middle of the model if we look at the arm with this enabled i can simply click on the shoulder to place a joint and maya will work out the central point of the model for me it would help if we could see the joints so let's just enable x-ray joints so we can see the joints through the model okay that's better there it is a tiny joint now let's create one for the elbow and finally another for the wrist so there you can see maya has done a pretty good job of placing these joints for me where this tool really shines though is with fingers ideally i'd show the wireframe so i could see where the knuckles are but this is just a demonstration so that's one finger done okay let's create the others as a tip you can press g to jump back into the last tool you used so in this instance i can just press g to reactivate the joint tool and that's the thumb done okay that's the joints for the hand done yes we would need to go in and adjust them further and also make sure they are orientated the right way but this gives us a good starting point with areas like the arms legs and fingers the tool works well but it does fall down when attempting something like the torso i'll just create a few quick joints to demonstrate as you can see from the front they aren't aligned correctly ideally we need them straight so in this instance it would be better to create them with projected centering disabled okay so that's the fundamentals of joints covered in the next video what we're going to do is we're going to start building our skeleton okay that's another video over thanks for watching right to the end and make sure you also check out some of the other free videos and courses that i have available you can find links to all these on the screen now and in the description below remember to help support future content and keep these videos free visit the ant cgi store or join the ant cgi club alternatively if you would just like to show your appreciation for these videos why not treat me to a coffee at my coffee page again the link is on the screen now and in the description below thanks again for watching this is ant cgi signing off and i will see you on the next one you
Info
Channel: antCGi
Views: 2,300
Rating: undefined out of 5
Keywords: rigging, maya, rigging in maya, basics, fundamentals, joints, skeleton, orient joint, rotate axis, gimbal, lock, symmetry, rotate order, axis, axes, python, mel, segment scale compensate, scale, radius, joint orientation, menu set, shelf, tips, help, tutorial, fix orient, fix axis, 2019, maya 2019, gamedev, game art, game development, game rig, game rigging, beginner, maya 2022, 2022
Id: pYV6dvdFZag
Channel Id: undefined
Length: 25min 20sec (1520 seconds)
Published: Thu Nov 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.