#RiggingInMaya | Part 12 | FK Limbs

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so now the spine head and neck are rigged so let's turn our attention to the limbs 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 first we're going to wire up the fk controls and these are very similar to how we built the fk spine let's hide the light controls for now and focus on the arms all we need at this stage is for the fk controls to move and rotate the fk joints as we are focusing on fk we can hide the ik controls for now and these pull vector controls we will be looking at those in the next video i'll just find the arm group in the outliner so the root control moves the whole arm but the fk controls don't currently follow it so we need to make a few changes to how this works let's hide the ik joints first and move the arm ik and fk joints out of the arm group and also delete that group i realize this will break things for now but we need to rework the hierarchy so the fk controls work with the rig next we need to clean the translations from the joints so just as we have done many times before move the values from here down here or use the script provided to speed things up that's the ik joint done now the fk so you see the fk arm has rotated to here this is because we have joint orient values down here which are now being applied on top of the offset parent matrix values and we've encountered this issue before so we just need to remember when working with joints we need to remove those two i'll do the same on the ik joint too we now need to repeat this for the rest of the fk joints so we can connect the controls like we did with the spine so copy the translate y here down to here this now doubles the distance this joint is from its parent so we just need to zero out the main attribute to move it back and now do the same with the hand fk joint reset this to move it back so now we can set this arm up in exactly the same way we did the spine using direct connections which is why we needed the joints translations to be zeroed out open the node editor and bring the fk controls in just reorganize these and now bring the fk joint in too i'll move these so they're next to the same controls now connect the hand controls rotate attribute to the hand fk joints rotate attribute and also connect the translations repeat this for the lower arm connecting the rotations and translations to the lower arm fk joint we need to do something different for the upper arm if you remember we had to connect the spine differently too so it would inherit any parent translations this time connect world matrix 0 to offset parent matrix we can move the root now and the fk arm controls follow if we used direct connections it would stay in world space and we saw this with the spine so now we can control the arm using forward kinematics nice and easy and we didn't need to use any offset groups or constraints while we're here we also need to check the rotate orders you see the joint is set to y x z and the control is x y z we ideally need these to match so let's update the control i don't know if you did but did you notice that the arm moved slightly as i changed it it was only a little movement but this is why it's important to update the rotate orders so the controls and joints are synchronized if you do this later once the character has been animated the animation would change and need to be redone let's update the other controls okay that's the arm done let's reset these so now we need to add the root control back in so the whole arm moves with it let's bring that into the node editor 2 and connect its world matrix 0 attribute over to the upper arm fk controls offset parent matrix attribute okay good the fk arm now moves with the root control let's test this with the main root control now ah we have a problem but we also had this with the spine if you remember the upper arm fk control now has a double transform because it's inheriting the main roots rotation as well as the arm root controls so we need to remove this bring the main root control into the node editor press tab and create a new mult matrix node with this node we can add the matrix values together from multiple nodes rename it to upper arm fk mult move the connection from the arm root control so we are connecting its world matrix 0 attribute to the mult matrix nodes matrix in attribute we can now open the matrix in attribute here now connect the root controls world inverse matrix zero attribute that's a mouthful to matrix in one we use the inverse matrix values because they are inverted versions of the main world matrix values so this will essentially take them away so the mult matrix node is now using the arm roots world matrix values but then taking away the main root controls values now connect matrix sum to the upper arm f k control's offset parent matrix attribute okay so now we can manipulate the route and the arm stays where it should be we can also oppose the arm using fk and it stays solid no matter where we put the route okay let's reset these so now the arm moves with the root control so let's add in the option for it to either rotate with it or stay in world space so we are essentially adding some space swapping functionality but don't worry we will go over this in more depth in a future video first what we need to do is store the main arms position so press control and g to create a new empty group rename this to arm root left world space now use the match transformations tool to match the group to the arm roots position and orientation so that's now in the same place make sure you also clean the values on the group moving them to the transform offset parent matrix section we need a new node now this time create a blend matrix node this will give you the option of blending between a number of other nodes call this upper arm left fk blend make some room for it over here connect matrix sum from the mult matrix node to input matrix just open the attribute editor now so up here are the values we just connected taken from the arm root control so this is the node we want to blend let's click this button here to add another item to the list and now connect the arm root world space groups world matrix 0 attribute to the blend matrix node's target matrix attribute which is under the target zero group now that's appeared here what's good about this node is we can specify what attributes we want to use so we can deselect translate here so the arm will match just the spine's orientations now connect the output matrix attribute from the blend matrix node to the upper arm fk controls offset parent matrix attribute here we go if i rotate the root control the arm doesn't move but if i move it it does this is because we are telling it to instead use the world space group's orientation what we can do now is use the envelope attribute here to simply blend between the root controls orientations and the world space group's orientations the next step is to add this functionality into the rig so the animator can easily access it without having to find the blend matrix node to do this we can use the follow attribute we added to the upper arm fk control although thinking about it it would make sense if this was a float instead of an enum so the animator can blend between the two stakes rather than snapping from one to the other let's add a new flow attribute call it world orient set the minimum to 0 and maximum to 1 matching the limits of the envelope attribute and add that so we will use this instead now connect world orient over to the envelope attribute on the blend matrix node let's also delete the follow attribute now too as it's no longer needed we can use this now or should i say the animator can use this now to make the fk arm rotate locally so it follows a root control or stays in world space and follows the group okay so that's set up now let's reset these the next step is to now make sure the arm follows the spine you see as we manipulate it the arm just floats here and doesn't move which isn't natural first we need the left arm group back so let's create it again and move it into the rig systems group and rename it move the ik fk and world space group into it now create two new groups we want two so we can store both the ik and fk positions of where the arm should be rename them so the first is shoulder left ik world space and the second is shoulder left fk world space now match these to the arm root control so they are in exactly the same place actually this should be left fk so i'll change that to l parent the ik group to the ik shoulder control so it follows it and the fk group to the spine3 control let's also clean the attribute values too again moving them down to the offset parent matrix section there we go and now back to the node editor i'll just clear this bring in the new ik and fk groups and also the left arm group all we want is the left arm group to blend between these two shoulder groups so as the animator blends between ik and fk the arm will move to the correct spine so to do this we need another blend matrix node rename this to shoulder ik fk blend connect world matrix 0 from the ik group to the input matrix attribute on the blend matrix node go to the attribute editor and add a new item to the blend matrix node now connect the world matrix 0 attribute from the fk group to the target 0 matrix attribute now connect output matrix to the arm root group's offset parent matrix attribute now if i rotate the fk spine the arm follows i'll just move this if we switch to ik nothing happens but that's because we also need to tell the blend matrix node to swap to the ik group 2. add the cog control to the node editor let's find the ik fk switch attribute and connect that to the envelope attribute on the blend matrix node now the arm follows when using the ik spine we can also blend between the two and the arm follows let's test the main root control again now things have changed ah right so we have the double transform issue again so all we need to do is remove the root's influence again just like we did earlier let's make some room and create a new mult matrix node call this shoulder left ik mult duplicate this and update the name to fk instead of ik and remove that one let's add the root control to the node editor too connect world matrix 0 from the shoulder ik group to the shoulder ik mult nodes matrix in attribute now connect the root controls world inverse matrix attribute remember we use inverse because we want to take these values away connect this to matrix in one now we repeat this for the fk side so world matrix zero to matrix in and then world inverse matrix from the root control to matrix in one we now need to connect these to the blend matrix node so matrix sum to input matrix and matrix sum from the fk mult matrix node goes to target matrix under target 0 just here we can rotate the root now and the arm stays in position you will also notice that the arm isn't rotating with the spine it's just staying almost level this is because we have its world orient attribute set to stay in world space if i change this to zero the arm now stays orientated with the spine okay so we have the fk arm set up and the arm also follows the spine so that's a lot to take in so i hope you were able to follow along with the right arm you just follow exactly the same steps so i won't go over it again if you are unsure just rewatch the video but apply it to the right arm instead you can also apply the same process to the legs too what i would recommend is using the hip control as the main control when blending the legs between the ik and fk spines rather than using the cog this will just give you more flexibility when animating the hips okay so what i'm going to do is i'm going to quickly whip through and update the other limbs now so we're back in a sec to show you what they look like okay so here we have all the fk limbs rigged we can move the cog control and they all follow just as i mentioned before you can use the hip control on the ik spine to control the legs and the limbs follow when the spine blends between ik and fk okay so that's the fk limbs set up just to further illustrate the world orient attributes we added if i rotate the character now the arms and legs rotate with him if i select the fk controls and set world orient to one you see the difference the limbs move with the torso but don't rotate with it so they remain level this is a nice option for the animator so the limbs can be more independent okay so that's fk lim's covered for now so let's move on and look at setting up the ik limbs in the next video 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: 453
Rating: undefined out of 5
Keywords: rigging, maya, autodesk, maya3d, rigging in maya, utility nodes, rig, node editor, nodes, Build Controls, Spine, Pelvis, Waist, Abdomen, Sternum, Shoulders, gamedev, game art, game development, game rig, 2022, maya 2022, offsetParentMatrix, fk, arms, legs, spine, hips
Id: fNqlkkh6aM8
Channel Id: undefined
Length: 22min 36sec (1356 seconds)
Published: Tue Dec 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.