#RiggingInMaya | Part 15 | Twist & Roll Joints

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so we have the limbs rigged now and have also added in some basic space swapping options to give the animator more flexibility we do still have more work to do though on the limbs if you remember when we built the skeleton we added a series of twist joints at the moment these don't really do much so let's now look at getting these working 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 let's switch to fk so we have more direct control over the shoulder and also get rid of the textures and turn on wireframe if i rotate the upper arm you see that the shoulder follows the joint as you would expect the problem is that this isn't a natural deformation if you rotate your own arm you will see that the shoulder area doesn't twist like this instead it twists around the bicep area so we need to mimic this in our rig this is where the twist joints come into play let me select the upper arm twist joint back when we were skinning the model we made sure the twist joint influenced the shoulder not the upper arm joint this is so we can control this area more like this we can rotate the twist joint back to keep the shoulder steady what we can also do is use the second twist joint here to make the blend down the arm more gradual okay let's undo that first let's duplicate these twist joints and we also need to move them out of the hierarchy there we go let's rename these to follow instead of twist because the twist joints are going to follow these joints we will call this one follow tip as it's the end joint okay let's move these back now behind the arm next we need a locator call it upper arm aim left and match its position to the follower joint using the match transformations tool now move this back too so we can see it we need the locator to move with the follower joint so parent it to it there we can see it in the hierarchy so as this joint rotates the locator follows with its offset distance what this setup will do is let us force the twist joint to always point at the locator which will keep it steady meaning the shoulder won't twist even though the arm is but it will allow us to still raise and lower the arm too so we will get a more stable and natural shoulder movement okay so we need the z-axis to aim at the locator but we also need the y-axis to stay fixed onto the elbow so how do we do this well we can use an aim constraint which will keep the axes aligned for us select the elbow joint and then the twist joint and go to constrain aim let's reset this if you remember we used one of these on the eye controls earlier in the workshop now if you prefer you could experiment with the aim matrix node instead if you're wanting a more economical setup we're using a constraint because we need the translation values available on the actual joint so any animation can be baked and exported later so first we need the aim vector so looking at the joint we want the y axis to point at the elbow so set the second column which represents y to one and zero out the x column with the up vector we want to use the axis which is going to point at the aim locator this is the z axis but because the z-axis is pointing forwards we need to use a negative value so it looks behind the joint instead so set the third column which is the z column to minus one set weld up type to object up because we want to use an object to help drive the z-axis and now we input the name of the locator so upper arm aim left and apply that ideally you don't want any rotation values appearing here let's test this now actually let's show the rotational axes so we can see how the joints are rotating and this one so i can raise and lower the arm and also move it forwards and backwards but if i twist it the shoulder stays steady because the z-axis is staying locked onto the locator if i move the locator you can see it's following now that's the first part done so next we need the follower joints to move with the arm too but we need to be careful so we don't add that twist back in to do this we're going to use an ik handle so go to skeleton ik handle and open the options we need a rotate plane solver here so we can control that twisting movement create one from the follower joint to the follow tip joint let's rename this to upper arm follow ik handle we're going to parent this to the elbow joint but first match the transforms so it's the same position and now parent it to the main elbow joint the skinned joint there we can see it in position what this will do is make the ik follow the arm which will then move the follow joints for us so if i rotate the shoulder the joints and the locator follow it the same happens if i raise and lower the arm so the locator is staying behind the arm the problem is the twist has come back again we can fix that easily though with the ik handle let's find it there it is all you need to do is set the pull vector attributes to zero now we can move the arm and the locator follows and if we twist it the shoulder maintains its orientation ok now we need to update the second twist joint here we want this to be rotated halfway between the upper arm joint and the elbow so we get a more gradual blend open the node editor bring in the main upper arm joint not the twist joint and now bring in the second twist joint open these up so we want to affect the rotate y axis if we connect the rotate y attribute on the upper arm directly to the rotate y attribute on the twist joint we are getting the rotation back but it's far too much so we need a way to reduce that value let's create a multiply divide node and call this arm twist multi although you should add the left in here too so it won't clash when you do the right arm connect the upper arm's y rotation to input 1x and then output x to the twist joints rotate y attribute so as we have seen before we can use this to adjust the main rotation value at the moment input 1x is being multiplied by input 2x so by 1 which means we will get the same value if we change input 2x to 0.5 we will be getting half the value so if we rotate the control now the twist joint is moving half the amount giving us that nicer more gradual blend down the arm we can rotate the upper arm now and the shoulder stays level and the bicep area is following one quick tip would be to create a custom bicep twist attribute and connect that to the input 2x attribute on the multiply divide node this will then give the animator complete control over how this area twists so they can correct it if they need to on more extreme poses okay let's reset this all we need to do now is make the follower joint move with the torso otherwise the locator will be left behind and then the shoulder won't deform as expected let's move the torso okay so we probably want it to follow the spine three joint here this is the closest we aren't going to parent the follower joints to it as that would change the main skeletal structure and they would ultimately end up being exported to the engine so let's just constrain them and we can just use a parent constraint with maintain offset enabled okay good that now follows now move the follower joints to the main arm group under the rig systems group so we've done the upper arm and the shoulder now deforms in a more natural way so let's now look at the lower arm if we rotate the wrist you see we get quite a harsh twist here if you look at your own arm as you twist your wrist you will see it's the forearm that twists not the actual wrist so that's where this twist joint comes in we need to pass the twist down to this joint instead the other axes are fine it's just the twist we need to correct and we can use a similar setup to how we control the shoulder start by creating a new locator and snap it to the wrist position using the match transformations tool let's move it back too and rename it to hand aim left this is going to be used just like the upper arm aim locator above but instead this will trigger the twist rather than remove it we don't need any follower joints this time instead just parent the locator to the hand left joint so now it will follow as the hand rotates and because it's parented to the main skin joint this will work regardless of if we are using ik or fk to animate the arm what we need now is for the twist joint to be locked to the locator so we can use another aim constraint again we can tell it to always look at the elbow so it maintains the right orientation so select the elbow or lower arm joint and now we need the hand twist joint here open the aim constraint options again and change the world up object to the hand aim locator this time although we still need the y axis to point to the elbow it needs to be looking behind the joint instead so change the aim vector from 1 to -1 and apply that if i move the locator now the twist joint follows you can only just see it moving let's show the rotational axes so that's a bit clearer this time if we rotate the wrist you see the twist joint isn't moving that is until we twist it and then it starts to follow the locator so we are checking for the twist this time what we can do now is pass that rotation up to the forearm twist joint let's go back to the node editor we can use the same multiply divide nerd so open this up we can remove these bring in the hand twist joint and the lower arm twist joint move these up here now connect the hand twist joints y rotation to input 1y and then output y to the lower arm twist joint rotate y attribute the forearm now follows as the wrist twists but again it's too much so we need to reduce it let's half the amount again so change this to 0.5 the lower arm now has a nice gradual twist the beauty of this setup is we can position the hand anywhere we like and the lower arm follows if we simply use the wrist joint to drive the lower arm joint and connected them directly without the aim constraint and the locator which would have been an option there would be poses where it wouldn't work if the joint hit gimbal lock or the rotations clashed this would result in the twist joint flipping or rotating the wrong direction this way the rotations are dictated by the locator's position so it makes it much more stable and more predictable okay so that's the arm twist joints rigged and we have some much nicer and more natural deformation in the upper and lower arm now this setup can easily be applied to the leg now too so i'm going to pause the video while i do that and also update the opposite side okay so here you can see the follower joints we just built and here they are for the opposite arm down here you can see them just outside each thigh and they are controlling these twist joints in exactly the same way as with the arm with the feet we have the aim locator here what you need to remember with the feet though is the orientation is slightly different we kept them in world space so when creating the aim constraint here make sure maintain offset is enabled or the foot will move to point towards the calf joint so we can pause the arm in ik like this and the twist joints automatically adjust to the pose again at this stage we can see the skin weights need another pass now we are getting a clearer picture of how the model needs to deform let's switch the legs to fk so you can see we have the twist moving up here as the foot rotates the same with the thigh the rotation is being passed to the twist joint here with the leg follow joints these simply follow the cog joint just like with our arm follow joints they followed the upper spine joint or the spine three joint okay that's the twist joint rigged we now only have a few more areas which need controls building or connecting and that's the fingers clavicle and the foot so let's focus on the foot next as that's a much more complicated setup 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: 761
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, offsetParentMatrix, shoulder, bicep, wrist, twist, roll, aim constraint, follow joints, thigh, ankle
Id: C4YBoxJdRVA
Channel Id: undefined
Length: 19min 47sec (1187 seconds)
Published: Fri Dec 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.