#RiggingInMaya | Part 09 | Control Joints

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so it's about time we started to tackle some of the systems which the controls will drive as this is a game rig we want the base skeleton to be left as clean as possible so what we're going to do is create a series of control joints what these are are copies of parts of the skeleton which the main controls will be connected to these will then drive the main skinned skeleton this makes for a cleaner rig especially when it comes to exporting it can also give you the option to quickly detach the rig if needed 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 patreon 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 so first we need a copy of each section of the skeleton let's hide the controls for now and then select and duplicate the root joint you can press ctrl and d to do this move it out of the hierarchy so we can work on it now unparent the legs and the arms and the pelvis we don't need the root or cog joints so delete those you can also delete the head and eye joints and the clavicle joints now let's hide the main skeleton let's quickly remove these from the bind joint selection set they they're in here because these are duplicates of the main skeleton we can just right click on the selection set and go to sets remove from selection set and then select bind joints that's better we don't want those accidentally being selected and skinned okay now we need to simplify the limbs we don't need the finger joints so delete those and also remove the twist joints let's update the other arm with the legs we are going to keep the toe joints for now this is so we can blend between ik and fk with them something we don't need to do with the fingers not on this rig anyway we do need to remove the twist joints though so there we have the main areas of the skeleton let's change the colour of them because they still have the colour coding from when they were originally skinned we can do this with the wireframe colour tool select the root joint of each hierarchy and go to display wireframe colour if we click default you see the joint colours have now been removed and they are back to the default colour we could however give them a new colour purple maybe okay that looks good you can also change this drop down box from index to rgb so you can specify a custom color instead this is exactly the same as if you were dictating a color for a control now we need to rename these joints firstly so there are no name clashes in this rig but also so we know what these joints are used for let's update the right side first so select the right arm and leg and go to modify search and replace names we can use this tool to quickly search through the hierarchy and replace part of each name so we could search for underscore r and simply replace that with underscore r underscore ik essentially tagging these as the ik joints because we had it set to hierarchy all the child joints are updated now too let's update the left side now so search for underscore l and replace with underscore l underscore ik that's done with the spine we will just go through and rename manually because we have nothing we can use to replace at the end of each name so those are the ik joints select them and duplicate them so we can create the fk joints these now have ik one on the end so let's rename that first so replace underscore ik one with underscore fk and now we can update the child joints okay let's group these temporarily so we can clean up the outliner so there we have our fk group and an ik group okay let's look at the arms first so bring back the arm controls and move these skeletons apart for now let's change the color of the fk arms so they look different maybe yellow uh actually blue okay that will do for now so we need the skin skeleton back now what we are going to do first is make sure the arms control joints follow the arm root joint this means the animator can use the control to reposition the arm if needed and this will eventually also drive the clavicle too first we need to clean this control so all the translate and rotate values are set to zero we can do this quickly as we did before by simply moving these attributes down to the transform offset parent matrix attributes now i'm going to cheat and use a small script i created to do this for me and these will be available as part of the course i will actually probably package them up in a nice ui for you too so you don't need to access them on the shelf so i just click this and there we go the attributes are moved so we don't need to use an offset group here which is good so now we do need a group press control and g to create an empty group and rename it to arm underscore group it's good practice to give each element a recognizable name like here i've used underscore grp this just means later in the rigging process if i want to quickly select and lock all the groups i can just search for underscore grp like previously when we were using offset groups i could just then search for underscore offset and quickly lock them all at once at the moment the arm group is down here so we need to reposition it so it matches the arm root control add the control to the selection and go to modify match transformations match all transforms that's now jumped up here again we're going to clean up those transforms using the offset parent matrix attributes what we now need is for the new group to follow the root control we could simply parent the group to it but i prefer to keep my systems separate where possible so we don't want joints nestled under controls open the node editor and bring in the root control and let's remove those shape nodes ah we should add an l into the name so we know that this is for the left arm and bring that into the node editor too open these usually we would use a constraint to make the group follow the control but we can do something much simpler and more effective all you need to do is take the world matrix 0 attribute from the arm root control and connect it to the arm groups offset parent matrix attribute we can now move the control and the group followers let's move the arm control joints under the new group so you see we can now position the whole arm what we need now is for the skinned arm to follow the control arms we also want to be able to blend between the two so the animator can work in either forward or inverse kinematics now with this being a game rig we can't use the matrix attributes or nodes not currently anyway but i hear that there may be a solution for this coming up in a future release let me explain why so here we have two joints and each is being controlled by a nurbs circle the first is connected using a constraint the second is connected using the offset parent matrix attribute just like we did with our root control let me show you so here we have the connection just the same as we did with the arm root control here we have the constraint just remove these and open these so you can see how much more complicated constraints can be but just because we have the matrix nodes it doesn't make the constraints redundant we still need them in our lives okay these have some simple animation on them animation which needs to be baked and sent to unreal engine so the animator has animated the scene all we need to do is select the joints and go to edit keys bake simulation to bake the animation onto the joints all ready for export now that's baked the animation onto the joints if we scrub the time slider everything seems fine we have all the keys here let's delete the controls and let's try that again so now you see that only the joint which was connected with the constraint has retained the animation this is because the constraint passes translation values to the main attributes which are then baked with the offset parent matrix connection no values actually appear here so nothing is there to be baked so with our rig you need the control joints to drive the skin joints using constraints so we can retain the animation information although you can use other nodes like the blend colours nodes if you prefer this will simply blend between two sets of attributes and there are videos available online which showcase this option okay back to our rig select the upper arm control joints and then the skinned joint we don't want the twist joints at this point so select the main joints for now now go to constraint parent disable maintain offset because we want the skinned arm to move to the other positions and apply that now do the same with the lower arm and finally the hand here we have those constraints and you can see the weights in the channel box so the hand will blend between the ik and fk hand joints they currently both have a value of one which is why the hand is floating between them if i reduce the fk weight to zero the hand joint now moves over the ik joint if i do the opposite the hand now moves over the fk arm so we can use these values to let the animator blend between ik and fk let's open the node editor and select the leftarm control so this is where the ik fk switch attribute comes into play let's bring that into the node editor and open it you can press three to quickly open a node there we have the attribute we now need the three constraints so select those and bring them into the node editor we don't need to open these now connect the ik fk switch attribute to each constraint's fk weight attribute hand fk lower arm fk and upper arm fk the arm has now snapped to the ik arm because the ik fk switch attribute is set to zero if we set it to one the arm goes back to floating between the two control arms this is because the ik weights are still set to 1 no matter what we set the fk weights to so we need to update those two what we need is for the ik weights to be the opposite of the fk ones so when fk is set to 1 ik is 0 and vice versa we can achieve this with another node press tab and start to type reverse create a reverse node this will take a value and reverse it so we can use it to invert the ik fk switch value rename this to arm ik fk reverse now the node editor and its many nodes can be quite intimidating so i would recommend checking out my video on the node editor over on my channel where i offer an explanation on how it works essentially we have three input attributes here and also three output attributes we just need one for now so connect ik fk switch to input x and then output x to each ik weight attribute on the constraint nodes the arm has now snapped to the ik control arm we can now use the ik fk switch attribute to blend between the two what's more we can also use the proxy attributes we added to also control the blending while we have these nodes here let's make them work a little harder remove the constraints from the editor and now bring in the ik and fk text what we can do is use the same attributes to also show and hide these connect the ik fk switch attribute to the fk text's visibility attributes do this for both the f and the k and now the output x attribute from the reverse node to the ik icon's visibility attributes so the i and the k now as we switch the text changes so the animator gets a visual representation of what state that limb is currently in it's a small thing but it can help when it comes to animation and in particular navigating the rig and the scene so we now have the control joints set up for the left arm we compose the fk arm and the skinned model will happily blend to it from the ik arm what we need to do now is move the control arms back into position so select the root of each and then the root control and use the match transformations tool to move them back into position the whole arm now moves with the root control and we can blend between the two now we aren't going to go further with this arm rig at this for now we are just setting up all the control joints so the main skeleton will move with them now we are done with the arm let's move it into the rig systems group so for the right arm it's exactly the same process so i'm not going to go over all that again instead let's have a quick look at the legs and again this is pretty much the same too so first clean up the transforms on the root control just moving the values down to the transform offset parent matrix tab or use the script if you have it that's done now create an empty group and call it leg left group and reposition that so it matches the root control also clean up the attributes too those values are down here now now open the node editor actually before i clear this because it has three inputs you can use the same reverse node for the right arm simply use the input y and output y attributes instead there's no point adding another node when you can share them okay now that's out of the way let's clear this and bring the leg root control and the leg group in and open these just as we did with the arm connect world space 0 to offset parent matrix so the group now moves with the control we now need to parent constrain the skin skeleton to the control joints remember to disable maintain offset now the knee and the calf and now the foot we also need to connect the toe joints too so go through and constrain those a quick way to work through these is to press g to repeat the parent constraint and then simply pick walk down the hierarchy and press g again so we have lots of constraints now let's organize this a little better and bring in the main leg control now connect the ik fk switch attribute to each constraint's fk weight attribute okay that's done now we need another reverse node so press tab and create one oops just bring those back in okay call this lag ik fk reverse again we can use this for both the left and right legs bring the control back so ik fk switch goes into input x and output x goes into each constraint node's ik weight attribute we can now blend between the two control legs okay let's update the text now so it represents which leg is being used remove the constraint nodes and bring in the text curves now connect ikfk switch to the visibility attributes on the fk text curves and the output x attribute from the reverse node to the ik text's visibility attributes okay great that works all we need to do now is move the leg control groups into the leg left group and snap them back into position so they all lie in the same space okay done let's move the main group now into the rig systems group okay that's the control joint set up for the left arm and leg and we can blend between ik and fk as mentioned earlier the process is exactly the same for the opposite leg and arm you can also apply the same technique to the spine too with this instead of using the root control you can use the cog control as the main position control for the spine okay i'm going to update all those now and i will be back in a few seconds right that was quick so here we have all the control limbs and the spine set up if i just move the ik joints back you see he follows we can use the ik fk switch attributes to blend back to fk2 when needed you can see the spine follows the cog control just like the limbs follow their root controls i also updated the cog control so it has the same attributes as the main ik controls too because we will need these options for the spine we can also blend between ik and fk with the spine okay so that's the control joints set up and ready for the main controls so in the next video let's start building the main systems 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: 931
Rating: undefined out of 5
Keywords: rigging, maya, autodesk, maya3d, rigging in maya, utility nodes, rig, node editor, nodes, Build Controls, 2019, Spine, Head, Pelvis, Waist, Abdomen, Sternum, Shoulders, gamedev, game art, game development, game rig, 2022, maya 2022, selection handles, offsetParentMatrix, control icon, ik, fk, blend, constraint, bake, reverse node, node, ik blend, fk blend
Id: AI3simFy6Gg
Channel Id: undefined
Length: 27min 52sec (1672 seconds)
Published: Thu Dec 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.