#RiggingInMaya | Part 11 | Neck, Head & Eyes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so now the spine is rigged it makes sense for us to continue working our way up the rig and work on the neck head and eyes 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 we need the neck to follow the shoulders the head to follow the neck and the eye controls need to be able to switch between following the head or staying in place let's focus on the neck and head first so let's hide the eye controls for now when we built the spine we left the neck and head separate so they currently don't follow as it deforms we also kept it free of the ik and fk systems so it's unique in a way what this means is we now need to be able to follow the upper spine regardless of it being animated in ik or fk so it needs to follow this control and it also needs to move with the top fk spine control too with the head we want this to follow the neck control but we also want to give the animator the flexibility to keep the head level so we have lots to do but this isn't as difficult as it sounds let's find the controls in the outliner okay so with these controls what i want to do is take a more traditional route and use constraints more so so you can see this approach if you need to use it or if you end up working with an older version of maya but don't worry though in the next video we're going to come back and look at an alternative approach using the matrix attributes and nodes so with us using constraints this time we need to create two offset groups press ctrl and g to create an empty group now create another rename these to head control offset and neck control offset let's move these under the cog control and they need to match the same position and orientation of the controls so select the neck control offset group and the net control and go to modify match transformations match all transforms do the same with the head control offset group moving it to match the head control okay next move each control under their offset group you will notice now that the controls translations have reset to zero this is because they are in the same place as the offset group which are their parents and these translation values are relative to the parent let's look at the neck now we want it to follow the shoulder control and the upper spine or spine 3 fk control let's find them okay select the shoulder control and then the spine fk control and finally the neck offset group now create a parent constraint with the default values we can now see here the two weight values which will allow us to move between the two controls much like we did with the control joints if i rotate the fk spine now you see the neck control moves with it but it's staying halfway between the ik and fk controls this is because both weight values are set to 1. let's update that now open the node editor and bring the cog control in and also remove the shape node actually if you don't need to see the shape nodes when you import things into the node editor you can simply disable it up here just go to the display menu and select no shapes now it's gone and if we load the cog in again we're not getting those shape nodes okay we also need to bring in the reverse node which we used earlier to control the ik and fk blending let's graph this and remove what we don't need okay now we need the parent constraint node we added to the neck controls offset group if you remember we connected the ik fk switch attribute directly to our fk controls and joints so let's connect it again but this time to the spine 3 fk weight we used the reverse node to invert the ik fk switch value so the ik did the opposite of the fk so we can use it again here and connect its output x attribute to the shoulder control weight what we are doing is recycling the nodes so we don't bloat the scene with systems that do the same thing you can see the weights up here the shoulder is now at zero whereas the spine fk is set to one so the neck should now follow the fk controls yep it is good we can use the ik fk switch attribute to blend the spine back to the ik controls and the neck followers it's now stuck to the shoulder control so that's the neck control updated we still need it to affect the base skeleton though if we animate the control itself nothing happens the problem is the neck joint is constrained to the ik and fk skeletons so we can't constrain it to the control what we can do though is tell the neck control to instead drive the ik and fk joints so they will then pass that movement onto the base skeleton for us okay let's find the joints neck fk and neck ik you see there's nothing currently controlling these directly the attributes are clear which is good let's open the node editor and wire these up bring in the net control and the two neck joints because we are only interested in the rotations we can simply use a direct connection so connect the neck controls rotate attribute to the neck fk joints rotate attribute and then repeat this connecting rotate if we can find it to the neck ik joints rotate attribute we now have control over the neck if we switch to the fk spine the neck follows and we still have control okay let's reset the pose and now let's look at the head we're going to use a similar system to the neck but we want to treat the translations and rotations separately first let's make the head move with the neck select the neck control and then the head controls offset group we need another parent constraint but this time disable the rotate option and apply that so what we have now is the head control moving with the neck but it's not inheriting its rotations so it stays level just like with the neck control we want the head to be able to either follow the neck and rotate with it or stay level so it remains in world space so what we need is a real world anchor for it to fix to go to create locator to create a new locator rename it to world space locator now we will be using this in a few areas of this rig to help us with space swapping and space swapping is simply allowing one control to follow another or follow different ones let's move it into the rig systems folder so it will be hidden when we don't need it plus it will move with the rest of the rig and let's make it bigger so we can see it with that selected also select the neck control and finally the head control offset group because this is what is going to be constrained this time create a parent constraint but use the rotate option if we select the constraint node now you can see the two weights here if we set world space weight to zero the head control now rotates with the net control if we do the opposite and set neck control weights to zero and the world space weight to one the head still moves with the neck but it remains level because it's matching the orientation of the locator instead actually let's connect the head control to the skinned joint so we can see this better like with the rest of the bind joints we will just use a parent constraint so we can retain the animation information okay that's better the head now stays level okay let's wire this up to the attribute open the node editor again and bring in the head control and open it up we need the orient neck attribute here now bring in the parent constraint yep this one and open that so here we have the weight attributes neck and world space connect orient neck to the neck control weight we now need to invert that value so create a new reverse node call it head tilt reverse you should be used to working with this type of network now connect orient neck to input x and then output x to the world space locator weight there we can see the attributes are connected the animator can now blend between the two states with the orient neck attribute so with it set to zero the head stays level if we blend it to one the head now moves to match the orientation of the neck control so there we go head and neck rigged and we also added in some extra functionality for the animator okay with the head and neck rigged let's move on and look at the eyes and this is a quite simple solution but we will add in some space swapping options for the animator too so we have the eye controls here and all we want to do is make the eye joints look directly at them so no matter where the controls go the eyes will always be looking in their direction first let's create an offset group for the eye control so we can add in the space swapping and rename it to look at control offset match the group's transforms to the control and then move the offset group to the i group now move the lookout control so it's parented to its offset group we now need to clean up the values on the controls we can do this quickly freezing their transforms okay that's better we want the left eye joint to stay looking at the left eye control so when it moves the eye joint follows we can achieve this with another constraint again i'm using a constraint so we retain the translation values on the joint for when the animation is baked and exported go to constrain aim and open the options just reset this so this constraint will make one node aim at another first we specify an aim vector so this is the axis the joint will be aiming along we can see here this needs to be the z-axis each of these boxes represents the x y and z axis so we just put a 1 in the third box which represents z and set x the first box to zero next we need an up vector this is set to y by default which is the same as what we need you see the joint's y axis is pointing up that's all we need to do for now but you can find more details and examples of this and other constraints on my youtube channel select the left eye control first and then add the left eye joint to the selection and apply it's important that the eye control is directly in front of the joint or the joint will move to look at the control now as we move the control the eye follows let's turn the textures back on so we can see the eye in its full glory that's better okay now the right eye select the control and then the joint and apply we can use the same settings because both eye joints have the same orientations let's hide the joints and the wireframe okay there we go we can now animate his eyes you see no matter where i place his head the eyes stay locked on the controls now for the final part we want to give the animator the option of making the eye controls follow the head control or stay in world space as they are now this is essential for allowing the creature to lock its eyes onto something we already have an offset group and the world space locator so let's select the locator first and then the head control and then finally add the look at control offset group to the selection let's create another parent constraint with both translations and rotations enabled and there we have the two weights which we could control so let's go back to the node editor and clear it and bring in the look at control down here we have the follow attribute which can be set to world or head bring the parent constraint node into the node editor now and connect follow to the constraints world space locator weight so that's updated now we now need another reverse node so we can invert that value let's use an existing one instead of creating a new one we can use the head tilt reverse node because we only used one of the values before bring that into the editor and open it so we use the x channels with the head so let's use the y channels this time connect follow to input y and then output y to the head control weight attribute there we go let's test this to make sure we got these the right way around so if we set follow to head the head weight should be one ah no we connected these their own way around okay let's swap these so output y from the reverse node goes to the world space locator weight and the follow attribute goes directly into the head control weight that's better so the eye control should now stay in world space let's move the cog yep it does let's change the head so it follows the neck okay let's change this to head now and the eye control now snaps back to the head and follows it okay good so we're just trying to give the animator more freedom and more options when they animate as another option you could always change the follow attribute so it's a float instead of an enum this way the head would blend from one position to another much like the orient neck attribute does with the head so again this may offer the animator a nicer animation option okay that's the spine neck head and eyes rigged in the next video we will focus more on the limbs as we connect the fk controls 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: 648
Rating: undefined out of 5
Keywords: rigging, maya, autodesk, maya3d, rigging in maya, utility nodes, rig, node editor, nodes, Build Controls, Spine, Head, Pelvis, Waist, Abdomen, Sternum, Shoulders, gamedev, game art, game development, game rig, 2022, maya 2022, space swapping, constraint, head, neck, eyes, eye rig, aim constraint, look at
Id: 24d4ZJPvSGU
Channel Id: undefined
Length: 22min 3sec (1323 seconds)
Published: Mon Dec 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.