#RiggingInMaya | Part 29 | Advanced | Spine, Neck & Head (Continued)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to video 29 in my rigging in my series we now have a basic spline ik based spine but there's still a lot of work to do on it so in this video we will add those finishing touches these will include squash and stretch advanced options for the middle of the spine and also a quick update so we can change the curvature of the spine we'll also make the legs follow the spine too before we dive in i wanted to let you know that you can now download all the source files and the scripts for this and all my other courses from my cubebrush coffee gumroad and art station pages you can find links on the screen and in the description below so you can follow along and pick the files apart to see how they work while we're here i may as well mention the ant cgi club becoming a member of the club is your way of helping to support more content in the future be these free videos assets or just help and advice memberships start from as little as 99p a month and in return you can also earn yourself exclusive rewards these include course assets models rigs and custom made scripts as well as a limited edition and cgi pin badge what's more you can also claim a discount on all and cgi merchandise at my teespring store there are two ways you can join the first is to simply click on the join button below this video and become a member of this youtube channel the second is to head over to my patreon page and support me there alternatively you can visit the link on the screen or in the description below to find out more okay so here we are exactly where we left off in the previous video we can move and twist the controls and then drive the spine ribbon the problem is if we move away from the ribbon it doesn't follow if we pull the opposite end the whole spine moves away so we need to fix this what we're going to do is make the spine stretchy this will ensure the ends stay where they are no matter what the opposite end is doing and for this particular area it's quick and easy to set up ok let's open the node editor previously we used distance nodes to help determine when the limbs were stretching we then use that information to scale the actual joints we could do the same here but this time we are going to use a different approach bring the spine curve into the node editor all we need is a shape node so let's remove everything else we need a new node now so create a curve info node what this will do is feed back lots of detailed information about a connected curve okay rename this to spine curve info now connect the curve shapes world space 0 attribute to the curve info node just select other and let's update the view so we can see the attributes there we go we need the input curve attribute if we look in the attribute editor now we can see all of these details the only one we are interested in is the arc length one here this tells us how long the curve is and it updates as the curve stretches so we can use this to tell us when to stretch the actual joints okay now create a multiply divide node and let's call this spine stretch factor so we need the arc length connect that to input 1x now copy that value and store it in input 2x just below it here we need to store it so we know what length the curve is when it isn't stretching the multiply divide node will compare these values for us if we change the operation to divide it will divide input 1x by input 2x and currently return a value of 1. when the scale changes this value will increase or decrease depending on the length of the curve so this is perfect to use in our joint scale attributes simply because we need those to have a default value of one all we need to do now is connect these to our driver joints open the connection editor load the multiply divide node into the left side and open the output attributes we want output x because that is the result of our stretch check now select and bring the driver joints into the connection editor too you don't need to do the shoulder joint at this stage because the stretch will only affect the area after each joint let's change the options so we can focus on the main attributes and open the scale ones now simply connect output x to each joint scale x attribute this is the axis which points towards the next joint that's changed to yellow to indicate it's connected let's see if this has worked so now i can move the shoulder control and the spine stays locked to it and it stretches i can also move the lower spine and the shoulders stay where they are the same happens if we move the middle control the end stays locked so we now have a stretchy spine which for a dog or a cat is ideal as we need to have as much flexibility as possible so they can get into those impossible positions one important thing i need to mention which i forgot to record in this part of the video is that you also need to connect the output x attribute from the scale factor node to the ribbon joints too these are the joints that are going to deform the model so they need to scale as well so the model deforms correctly i actually think i also skipped this when i built the legs so i'm going to go through and make sure those are all updated too before the next video okay so now we have the spine moving we need to get the legs to follow it this is quite easy because we already built controls which move the upper ends of each limb let's look at the lower spine first so we need to find these controls first what we need are the offset groups all we're going to do is simply use a parent constraint to constrain these to the control what we don't want though are the rotations so let's disable those now let's do the right leg we can now move this control and the legs follow let's hide some of these systems okay that works nicely you see if we rotate it the legs still follow but maintain their own orientation this is why i disable the rotate option so the upper legs don't rotate too this approach is a much more natural way to animate and it gives the animator more freedom we also opted for a parent constraint instead of a point constraint so the legs actually move as if they're parented as the lower spine control rotates okay let's do the front legs so we actually need to do a bit more work here because we didn't add any controls for the scapular joints i have a couple here which i already added and positioned i'm not going to go through this process again because i've covered it plenty of times before i also made sure that orientations match the joints too so we just parent constrain these to the joints with rotation added to that's one and that's the other one done now we want these controls to affect the main leg controls there are lots of different options on how you can do this you could maybe use constraints and have some sort of space swapping system so you have more control to be honest though i find simply parenting the leg controls to the scapular controls works well enough there's no point in over complicating a rig if it doesn't need it so let's find those light controls and move the scapular offset groups to the leg groups now parent the leg root offset groups to the scapular controls the leg now follows as the scapula moves okay let's update the other side that's done now all we need to do is parent constrain the scapular offset groups to the shoulder control remember to disable rotate there we go the legs now follow the spine so we're starting to feel like this is approaching a more complete rig one thing i also wanted to point out is that because we are using a ribbon we have all the options open to us to also deform it in any way we want obviously we have the main controls which will move bend and twist it but like with the legs we could also use a blend shape remember the ribbon joints are what's important here i'll quickly demonstrate so let's duplicate the ribbon and unlock it so we can move it let's throw on a very quick blend shape and also set that to 1 to activate it so if we deform this now the ribbon follows and so do the ribbon joints can use this method to achieve more poses with the spine if needed or as we did with the legs apply a sign or twist deformer for more flexibility you could even add a jiggle deformer to add that extra secondary animation that we also added into the legs so we can move the shoulder control now and the lower spine control we can also use the spine control to move the whole body the problem we have now is the middle control it's kind of just floating in the middle here if we move the other controls it doesn't follow so this will mean more work for the animator it's difficult to choose what to do with this control should it follow the shoulder control or the lower spine maybe it should just stay floating between them in these instances i prefer to give the animator the choice of what it should do yes it's more likely it will just need to stay between the other controls but there will be animations or poses where it shouldn't so let's create a system now where the animator has control over what the middle control does what we need to do is create a space swapping network so the control can move between the different options one of the options will be to stay in world space so like it is now so we need something for it to anchor to we can use a locator for this and this will be used when we set up space swapping on other controls in the future so let's create a locator make it bigger and rename it to world space position locator and i'm just going to parent it to the root control this is so it follows the character so the world root is relative to the character rather than the actual world now let's create an attribute so we can control what the control follows let's call it follow and set it to be an enum now change the names in the list we need both to follow both the shoulder and lower spine control then shoulder to just follow the shoulder control root to stick to the lower spine and finally world let's add that close this we now need a parent constraint but we are going to constrain the offset group on the control select the lower spine control and then the shoulder control and then add the world space locator now add the mid spine offset group now create a parent constraint with the default options so maintain offset is enabled here is a constraint and here are the three weight options so we can use these to control how the middle spine control works if we set upper spine and world space position to zero you see the control follows the lower spine control if we set upper spine to 1 instead it now follows this control and finally if we set world space to one it will obviously ignore the other controls and follow the locator okay so now we need to wire up the controls you could use set driven keys to do this if you prefer but i find nodes are more efficient and also offer more control and flexibility let's open the node editor again and bring in the mid spine control remove the shape node and now add the parent constraint node open these up you can just press three to do this so there we have the follow control and we have the weight attributes here okay to start us off we need a condition node we're using these because we can simply check what the follow attribute is set to and update the corresponding attributes let's call this follow both condition and open it up duplicate this three more times and rename them so follow shoulder follow root and follow world okay those are set what we need to do is not only set each weight value to 1 when the follow attribute asks for it but also check for when both is active and then set the shoulder and lower spine weights to 1 instead so this is a little fiddly to set up but i'll try my best to explain as we go start by connecting the follow attribute to each first term attribute let's look in the attribute editor so the first term will change depending on what follow is set to and the labels we created will be represented by a number it's now set to both which is first in the list so it's equal to zero shoulder will be one root will be two and world will be three if we set it to shoulder you can see first term is now one and root is two okay let's set it back to both so we can use the second term to check if it's equal to the first term so when first term is set to zero we do something so if it's zero we use the color if true value here if it isn't zero use the colorist false value here so let's update these values we need the true values to be one so the weight is set to one and the false ones need to be zero so the weight is then set to zero and switched off i'm only updating the first two here because the third column will be used later these values are then output through the out color attributes so first connect out color r to the upper spine weight this is the output from the first column in the condition node now connect outcolor g to the lower spine weight attribute this is the output from the second column now connect out color b which is the third column to the world space attribute so you can see that the three out color attributes now control the weights with the follow attribute set to both the control now follows both controls but we have more to do to get this working properly go back to the node editor and let's look at the shoulder condition node this time we want the node to be true if the first term equals 1 so the attribute is set to shoulders if it's true set the weight to 1 if it's false set it to 0. for these nodes we are only interested in the first column now connect outcolor r from this node to color if false are on the original condition node so you see we can control the attributes on the original node depending on what the main follow attribute is set to so if the first term here is not set to zero then we don't want to follow both controls so in this instance the condition node checks the colour a false attribute this now changes if the follow attribute is set to shoulder so it's triggered let's do the root or lower spine control next select the root condition node set second term to 2 so it triggers when follow is set to root color if true is set to 1 here so the weight will be set to 1 and false is set to 0. now connect out color r to color if false g this time finally let's wire up world so set second term to three and color if true to one and false to zero now connect out color r from this node to color if false b so there we have the three main attributes piped in also make sure color if true b here is set to zero we don't want this triggered here or the world space weight will be one when we don't want it to be okay let's test it if we set follower to both it should float between the upper and lower spine controls great that works perfect shoulders should just follow the shoulder control root will stick to the lower spine control and world doesn't follow any so this setup will be good if you need to pin the chest to the floor for any reason to be honest though most of the time this will be set to both but it just gives the animator more options and more flexibility and this kind of setup can be used anywhere so feel free to add it to other elements of the rig if you need it so there's one more thing i wanted to show you which is quite a nice bonus feature which comes from the way we set up the spine because we used joints to deform the curve we can also scale them to change the curvature of the spine so if i scale the control joint here you see we can curve the back more or make it more angular so we can add this into the rig let's create a quick attribute on the control set the default value to one because all our scale values default to one and let's call this bezier curve and add that now now connect that attribute to the control joints scalex attribute simple as that now it's an easy step but it adds more flexibility to the spine we can do the same with the upper spine too and the lower spine so let's add those attributes to these and wire them up that's one and the other let's test them now okay so there are points where this will break the rig so it's not perfect the same here when we go past a certain point what we can do though is lock these attributes so the animator never actually reaches these values so let's edit the attributes and we can set a minimum and maximum value let's set the maximum to 2. so this is locked now and won't break let's try five maybe three okay let's do the same with the other control this was more prone to breaking let's use 0 and 3 again with these being connected to scale values we don't want them to scale lower than zero okay that works now the upper spine okay we get this slight issue here so let's try a minimum of 0.1 instead that's better okay so feel free to experiment more with these as you may want different values okay let's reset these so that is a spine setup and we can do exactly the same to rig the dog's neck so i'm going to pause the video here and i'm going to go through and create the neck and i will be back in a minute okay here we go the neck is now rigged in pretty much the same way we did the spine using a blend of spline ik and a ribbon let's hide the model so you can see the ribbon here which is the same as the spine just a smaller one with fewer joints it has the same spline ik handle the control in the middle is simpler as it just stays between the shoulder control and the head control using apparent constraint we have the same twist setup as you can see we can move and stretch the neck too and twist it what i also did with this scene is update the ribbon joints so the scaling is connected to these two and i mentioned this earlier in the video and on the neck too also the legs so everything is updated now so on the head i added two new attributes follow shoulders and orient shoulders let's quickly skim the model so you can see it working better okay that's working so i can rotate the shoulders and the head follows we can adjust the neck and the head and the neck stretches you see we get a nicer stretch in the spine now we connected to the stretch to the ribbon joints okay back to those attributes at the moment follow shoulders is set to one so the head is being told to follow where the shoulders move to orient shoulders is set to zero so the head shouldn't rotate with it okay i can see the joints are doing what i want but the head model isn't let's reskin it but add in some of the head joints too that's better so the head is staying level but moving with the shoulders let's just hide those eyes if i set orient shoulders to one now the head will tilt to match the shoulders rotation if both are set to zero the head stays where it is so all this is is just two parent constraint nodes one just using transforms and the other just using the rotations so we can control both independently and we just use a reverse node to blend between the upper spine control and the world space locator i've covered this plenty of times before in this series so this is nothing new let's open the network so you see we have both weights here one driving translations and the other rotations feel free to download the source files and take a closer look at this setup another option which is something i'm still experimenting with is to use ribbons with the jiggle deformers like i showed you with the legs to add some muscle stimulation to the chest and stomach something like this like i say i'm still playing with that for now so i may pick it up in a future video if not it will certainly be included in the source files okay so we're getting closer to a fully rigged dog now minus the pause on the head i think in the next video we will look at rigging the tail using a blend of ik fk and also dynamics to drive it and we can also use the same setup in the ears well we've come to the end of another video thanks for watching right to the end and if you found this video useful please hit that like button to show your support while you're at it you could also subscribe and enable notifications so you are kept up to date with future videos and community posts if you have any questions or suggestions please post them in the comments below or alternatively why not join the ant cgi community discord group where me or other members of the community will be more than happy to help remember to help support future content and keep these videos free why not join the ant cgi club and earn yourself some exclusive rewards alternatively if you would just like to show your appreciation for these videos why not treat me to a coffee at my coffee page the link is on the screen now and in the description below thanks again this is ant cgi signing off and i will see you on the next one you
Info
Channel: antCGi
Views: 4,384
Rating: undefined out of 5
Keywords: rigging, maya, autodesk, maya3d, rigging in maya, rig, 2019, maya 2019, gamedev, game art, game development, game rig, game rigging, how do I, maya 2020, canine, quadruped, dog, patreon, labrador, ribbons, nurbs, follicles, controls, deformer, ribbon tool, antcgi, skincluster, crease, flexible rig, dog rig, tweak, fat, scale, 2020, maya2020, splineik, spline ik, spline, roll, twist, ik spline, space swapping, space, swap, switch, muscle, jiggle, head, neck, bezier, curve
Id: nfx85TpN9Ts
Channel Id: undefined
Length: 36min 4sec (2164 seconds)
Published: Fri Feb 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.