#RiggingInMaya | Part 28 | Advanced | Spline IK Based Spine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to video 28 in my rigging in maya series the legs are now pretty much done so in this video we will look at setting up the spine to do this we won't just be relying on a ribbon to help drive the model we will also be calling upon mei's ik spline tool too to give us maximum flexibility now although this setup will be used on a dog spine it can also easily be adapted to be used on a more traditional biped rig too in fact we will be using this to rig our dog's neck as well before we dive in i wanted to let you know that you can now download all the source files and scripts for this and all my other courses from my cube rush 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 ansi gi 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 membership starts from as little as 99 pence a month and in return you can also earn yourself exclusive rewards these include the 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 ant cgi merchandise over at my teespring store there are two ways you can join the first is to simply click 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 so here we have dina our dog complete with his legs rigged and ready to go we still need to rig his paws but we'll come to those in a future video here we have the main driver joints for the spine so let's get them rigged first let's hide some of the elements hide the polygons and the controls let's also hide the leg systems i'm not using the main visibility control on the route for this because we need the main groups to remain visible okay those are hidden so first we need a ribbon so i'm going to use my ribbon creation tool to help with this you can download this from all my online stores or if you're a member of the ant cgi club alternatively if you want to see how ribbons are built from scratch please check out the video which is on the screen now i'll call it spine underscore ribbon we want three mid joints and a length of five these are all set up okay so let's generate it so there we go and we can see all the follicles here they are automatically placed in the follicles folder this is why i didn't hide it by the root control earlier because it would have also hidden the joints now and we wouldn't be able to see them the main ribbon is here what we need to do now is move this up so it matches the spine joints what i'll do is i'll use a lattice deformer to help with this we want the middle attributes here to match the actual joint count so we have five joints we also want outside lattice to be set to transform all points because this ribbon is so thin let's create that now rotate the lattice you can hold down j to quickly snap the rotation to specific angles and move it up a quick tip if you find you can't move the lattice in a particular direction it might be because you are using your manipulator in object space like this simply switch to world space instead let's close this let's snap this to the middle joint in the spine now we want to edit the lattice so it matches the spine's shape right click on the lattice and go to lattice point we can now select the points and hold down v to snap them to the closest joint on the spine like this and this so there you see the ribbon now matches the arc in the spine when done we just delete the history on the ribbon to bake it into it so the idea is that the driver skeleton is going to manipulate the ribbon the ribbon's follicle joints will then drive the model so up to now it is very similar to the leg setup let's just recenter the pivot on the ribbon and move it down temporarily next we need to create a curve along the spine this is needed for the spline ik i do realize that you can tell the spline ik tool to generate a spline for you but that can result in the joints moving slightly plus i prefer to position my own cvs okay let's use the edit point curve tool and set the curve degree to 3 cubic so we get a softer curve and while holding v click near each joint this will snap the points to the joints press enter to finish there we have the curve let's just center the pivot and rename it to spine underscore curve we have the joints and the curve so we can now create our spline ik go to skeleton create ik spline handle and open the options just reset this we can disable auto create curve because we already have one a better one and disable auto parent curve 2 we want to leave the curve where it is just like normal ik we select the start joint and then the end joint but we now have to make a third selection and that's the curve there we go that's done rename this to spine ik handle so the beauty of spline ik is we can now deform the curve and the joints follow so we get a more natural movement and an easier way to animate this is perfect for snakes or even rope rigs let's move the ribbon back up traditionally you would now use cluster deformers to animate the cvs but we aren't going to do that here duplicate the main driver skeleton let's move this out of the hierarchy all we need are the start middle and end joints there we go let's make the radius bigger so we can see them so these are going to be our control joints just like with the leg rigs let's rename them what we're going to do with these is bind them but not to the ribbon this time we want them to be bound to the curve make sure selected joints is selected we can now use these joints to manipulate the curve instead of using clusters okay so the joints are controlling the curve which is now driving the skeleton so now we need to move the ribbon all we're going to do is simply skin the driver skeleton to the ribbon this time we can use joint hierarchy so now all we need to do is use the control joints to drive everything we can even rotate too to get a nice arc in the back okay so in the scene i have some pre-made controls let's just make those visible so we have a global control which will move the whole torso and one for each control joint all we're going to do is parent constrain the control joints to the controls there we go we can now use the controls to animate the spine now there are a few problems when using this setup earlier we saw that we could rotate the controls and the ribbon would move but if we twist it like this nothing happens this is because we're using a curve so the twist doesn't register what we need to do instead is look at the spline ik handle down here we have two attributes roll and twist if i just twist the upper spine rotates so we can use this to get the twist we need in that area let's open the node editor and bring in the spline ik handle and the control joint let's check which axis we need yep x so all we need to do is connect the control joints rotate x attribute to the twist attribute let's move this i can use a control now to twist the upper spine there we go perfect let's look at the lower spine now you would think that the roll attribute works in the same way as the twist but on the bottom part of the spline but no as you can see it rolls a whole curve so we can't use this directly the lower spine is going to take a bit more work to get rigged what we essentially need to do is take away the twist from the roll so as the roll attribute turns the twist is rotating the opposite way what this will do is fool us into thinking that the top of the spine is not moving let's bring back the node editor bring in the root control joint and open its rotate attributes first we need a multiply divide node open these and rename it to spline twist multi connect the root controls joints rotate x attribute to input 1x and now output x into the twist attribute so the root joint is now controlling the twist now also connect the root control joints rotate x attribute to the role attribute so now as we rotate the control the upper part of the spine is moving twice as much as the root so it's basically adding the value twice what we want to do though is take one of those values away instead all we need to do is set the input to x attribute to minus one instead to take that away now when we rotate the control we are just getting the lower spine movement all we have done is basically said that the twist attribute is always the opposite of the role attribute now this is great but we have lost control over the upper spine so let's add this back in what we need to do now is add the shoulder control joints rotation into the mix so we need another node for this create a plus minus average node and rename it to spine twist pma connect the shoulder control joints rotate x to input 1d0 just move these take the output x attribute from the multiply divide node and connect that to the input 1d1 attribute on the plus minus average node what we are doing is adding these together to give us the correct rotation meaning we will still be able to use both controls now output 1d goes to the twist attribute what we can do now is twist the upper and lower spine controls independently giving us complete control over either end of the spine now let's look at the middle control you see we have the same issue here we can twist the control but it has no effect over the ribbon we can manipulate it the other ways but not around the x-axis so the problem we have here is there isn't an option to control the middle of the ik spline so we have to think outside the box now remember with this setup all we are really interested in are the ribbon joints because it's these that will drive the model so we could just use those instead let's clear the node editor and bring in the spine control joint open this up let's also bring in the closest ribbon joint number five and open its rotations i'll just check yep we need the rotate x attribute to give us the twist ah i see another problem we have a value on the rotate x here so we need to remove that first looks like my ribbon creation tool didn't freeze the transforms so i'll need to update that so we have two options we can select the ribbon joints and simply reset this manually for now that will change the orientations of the joints though instead i would recommend simply freezing the transforms which will maintain the overall orientation now luckily these joints don't do anything yet so it will be fine to do that in fact i will go back and do that after the video and i will also check the other ribbon joints too to make sure they are all zeroed out okay so all we're going to do is connect rotate x on the control joint to rotate x on the ribbon joint this will make it twist with the ribbon control 2. now what may happen is the ribbon joint rotates the opposite way like here this is just down to the difference in the orientations from the control and the ribbon joint let me turn on the rotational axes so you can see it better in this instance all we need to do is invert the rotation using a multiply divide node we did need one anyway to help us create a falloff effect which we're going to look at in a minute call this spine mid twist multi open this up connect rotate x to input 1x and output x to the ribbon joints rotate x attribute now set input 2x to -1 to invert the value as said earlier this will depend on the orientation of the joint if you throw the transforms earlier this won't need to be inverted but just experiment and see what you come up with there we go they both twist together so what we can do now is use the same multiply divide node to make the next joints along the ribbon twist two bring those into the node editor this time connect the control joints rotate x attribute to input 1 y on the multiply divide node now connect output y to both of the other ribbon joints rotate x attributes something like that that works but we need to update the multiply value if we set it to -1 we get the same rotation as the middle joint let's instead say we need it to rotate half as much so change this to minus 0.5 now if we rotate the control the outer ribbon joints don't rotate as much okay let's add one more layer so select the next two joints along the ribbon and bring them into the node editor we're going to use the z attributes now on the multiply divide node so connect rotate x from the control joint to input one z now connect output z to the rotate x attributes on the outer ribbon joints so joints three and seven move these this time we want even less of an influence from the control joint so let's set this to minus 0.25 now as i twist the control we get a nice gradual fall off moving down the ribbon now this isn't a perfect setup because if we twist the shoulder control it affects the whole ribbon but for the spine it works perfectly okay let's reset these what we need to do now is make sure the ribbon joints are added to the bind joint selection set so select these and drag them down it just makes life easier if we can select all the joints which are going to be bound to the mesh in one go we may find that we need to test just how the joints are looking on a more regular basis so it makes sense to speed up this part of the process okay let's bring some things back now select the bind joints there we go all the ribbon joints selected and let's quickly bind the model so we can see how the spine is working out change this to selected joints because we don't have a hierarchy that we're binding to now remember that these are default weights so the model won't look right at this stage upper control looks okay and the lower control good there's the middle control twist working too perfect we can move it around and rotate it okay looking good it's often a good idea to quickly bind your model just to make sure the controls are working as planned let's hide the model again and the rotational axes okay so that's a basic spline ik based spine rig that's a mouthful and remember that because this is also ribbon based we have the added option of adding more deformers to adjust the shape of the ribbon just like we did with our leg rigs okay so i'm going to end this video here and in the next video we are going to look at adding more functionality into the spine as we add squash and stretch and some more advanced functionality 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 also 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: 6,382
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
Id: KiqpzKUJKt0
Channel Id: undefined
Length: 26min 1sec (1561 seconds)
Published: Fri Feb 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.