#RiggingInMaya | Part 16 | Reverse Foot Systems

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so we have just a few more areas to cover before this rig can be passed to an animator and one of the more important is the foot we could leave it as it is we can move the controls around and the foot will follow but it's a bit basic and doesn't give the animator a lot to work with so in this video we are going to add more functionality so pauses are more easily achievable 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 look at the fk controls first as these are quite easy to set up with these controls we only want them to be visible when animating in fk but don't worry once we're finished setting the foot up they will automatically hide themselves what we want to do first is make them follow the fk foot control to do this we simply parent them to it nothing complicated about that so we just move these to here because we clean these controls earlier and by that i mean move the values down to the offset parent matrix section in the attribute editor we now have values here because the control's parent has changed so this is a new offset so what we need to do is remove these new values first we need to reset the offset parent matrix section so right click and go to set matrix to identity let's do that on the big tour too now let's check where they are in world space so reset these values and now let's move them out of the hierarchy and reset the values again okay good they are at the world origin which means they don't have an offset baked into them this could have been done using the freeze transformations tool now we have checked that we can parent the toes back to the foot control and now match the first control to the joint it's going to drive so select the first big toe control and then the first big toe joint and use the match transformations tool to snap the control to the joint now do the same with a little toe snapping it to the little toe joint we can now reset or clean the values again so move them down here or use the script okay i'll just make sure the other controls are still aligned yep good so we need to make sure we are working with the fk skeleton too so hide the ik thigh joint and make sure the fk thigh is visible we don't want to control the wrong joints what we need to do now is clean the fk joints so we can connect the controls to them directly so go through and move the values down also remember to reset the joint orient values too to correct any movement i'll go through and update the other tours now okay that's better now open the connection editor disable non-cable and bring the big toe controls into the left side and the joints into the right side and simply connect the translate and rotate attributes we can move the joints now with the controls let's do the same with a little toe just connecting those translate and rotate attributes to the joints okay so that's the fk foot controls in connected and working and if we switch to ik they vanish perfect told you it was quite a simple setup okay let's look at setting up the ik foot now and this is a little bit more complicated let's hide the fk joints and bring back the ik ones what we're going to do with this version of the foot rig is add in a simple foot roll control this will take the foot's pose from being back on its heel up onto the ball of the foot and then over onto the toes so the animator only needs to adjust one attribute to achieve all three poses quickly and easily this is ideal when working on walk or run cycles we will also add in the ability for the foot to bank from side to side too if you want to see a more comprehensive foot rig setup check out this video over on my youtube channel so to create the foot roll we simply need a joint chain which will drive the main foot and this is known as a reverse foot let's start by duplicating the main foot joint as that's in the ankle position already delete the children i'm going to rotate this so it's more in line with the toes which will make the movement more predictable and exact okay let's move it out of the hierarchy so it's just sat inside the leg group we want this joint to be on the floor so set translate y to zero which will bring it back down and move this back this will be where the heel will pivot from so here looks good but we can adjust it later if needed once things are up and running and we can see how the foot is rotating let's rename this to foot left reverse heel and delete that constraint node too duplicate this and move it forwards this will be where the foot pivots when the creature is standing on its toes so put it between the end of the claws and change its name from heel to toe and parent it to the heel joint duplicate the toe joint and move it back this time it needs to be in line with the first toe joint here so as the foot rolls forward it bends on the toes call this one ball create another copy and parent it to the ball joint call this ankle we want this one to be back where the ankle joint is although we need to keep it aligned with the rest of the reverse foot okay let's match the ankle's position first just the position not the rotation i'm going to use a re-root tool now which will essentially flip the joints hierarchy so the ankle joint is now at the top this will allow me to adjust the rest of the foot joints to align them with the ankle switch to the top view for a second and isolate the joints and now we can adjust the rotation to line them up it's important these are all aligned or the foot won't roll correctly okay that's better we can swap the hierarchy back now using the reroute tool again we need the hierarchy this way around so the joints rotate in a specific order so the heel moves the whole foot like this the toe then lifts the ball and the ankle and the ball moves the ankle so you can start to see how we are going to get the foot to roll we're going to be connecting directly to the rotation attributes so let's go through and clean the joints just to simplify things remember to also update the joint orient attributes too okay good let's quickly remove the color too just set it to default for now parent the heel joint to the foot control so the joints will follow where the foot goes with the ik leg we included the toes so we could control them in ik too we now need an additional joint and this will help to keep the foot level as the control moves this wouldn't be needed on a standard biped rig which has just one toe but we have two toes so this will control the ankle for us too duplicate the foot joint again and delete its children now match the new joint's position to the reverse foot's ball joint just use translation for now now parent it back to the ik foot joint and rename it to ball left ik that's the main control joints created so now we need some empty groups press ctrl and g to create a group rename it to inner left bank group duplicate this and change the name to outer left bank group these will be used to pivot the foot as it banks from side to side match both of these to the heel joint so we get the same orientation as the reverse foot now move these so the inner bank group is on the inside of the foot and the outer bank group is on the outside next parent them to the foot ik control so here we have the two groups now parent the outer bank group to the inner bank group again we need to control the rotations directly so we need to clean the values there we go so the foot will pivot something like this now parent the reverse heel joint to the outer bank group so you see the groups will move the foot like this and this let's hide the reverse foot for now and switch to wireframe so we can see the joints we're now going to use a series of ik handles to control the foot and toes so open the ik handle tool options first if you remember we connected the foot ik joint to the control using an orient constraint so we could animate and pose the foot we're going to change the way this works now so let's find and delete that constraint node here it is create a single chain solver from the foot ik joint down to the new ball ik joint you see we can use this now to control the foot's orientation and it will work better with the ik limp now create four more ik handles spanning each section of the tours so we have five in total let's quickly rename these to match the joints they are driving okay now parent them to the foot ik control so we can move the foot as before but if we move the control down you see the foot and toes follow as if the foot has peeled from the floor so it's a much more natural movement let's bring back the reverse foot we have the main driver ik handle here which was a key part of the quadruped limb it's currently parented to the foot control but we need it to instead follow the reverse foot so as the ankle lifts the rest of the leg will follow and the knees will bend quickly parent it to the reverse foot ankle joint now parent the first two ik handles to the reverse foot ball joint and finally move the other ik handles so they are parented to the reverse toe joint so they are all moving with the reverse foot now and we can pause it so it's on its toes actually let's move these so they are parented to the toe joint too okay that looks better now move the ball ik handle so it's parented to the reverse ball joint okay those are all set up now so it's time to start working on the main controls first we need some extra attributes on the foot ik control create a new controls divider and then add two new float attributes foot roll and foot bank so this is all we need for now to get the foot moving traditionally you would use set driven keys to set up a reverse foot system like this they are simply animation curves which allow you to manipulate one attribute with another the problem is i find them to be quite limiting plus they are very economical so instead we are going to set ours up using nodes now these can come across as being more complicated but they are so much more flexible open the node editor and bring in the foot ik control let's look at the foot roll first bring the reverse ball into the node editor and open it up at the start of your foot beginning to peel off the ground your heel rises so you are standing on the ball of your foot something like this so we need to do this first it looks like we need the rotatex attribute so let's connect the foot roll attribute directly to it so we now have the first stage of the foot roll now things start to get a little bit more complicated as the foot moves onto its toes like this the ball then needs to flatten back out again like this so we need a way to reverse the direction it rotates once it gets past a certain point we want the rotation to rise to a point but then go back down even though the foot roll attribute is still climbing let's look at the point where we want the foot to start moving onto its toes so around 25 remember that number 25 create a new condition node we have used these briefly before so you should be familiar with how they work call this foot left roll condition first we need to check when the foot roll attribute goes above 25 so change operation to greater than and set second term to 25 the value we want the foot to rise onto the toes and the football joint to stop bending forwards and start bending backwards to recap if the first term goes above the second term value of 25 the condition node outputs the color if true value here if it stays below it it uses the color if false value instead so it's a good way to quickly compare things let's connect the foot roll attribute now connect this to the first term attribute we also need to connect it to the color if false r attribute 2. so if first term is less than 25 roll the ball forwards now set color if true r to 25 so basically what will happen is if the foot roll goes above 25 the ball joint will stop moving and be locked at 25 which is the color of true value now connect out color r to the joints rotate x attribute let's test that so now the ball doesn't go past 25 even though the foot roll attribute has okay so we have control over the ball now so instead of being locked at 25 let's make it reverse and move backwards create a plus minus average node and call it foot left rule reverse pma connect foot roll to input 1d0 and also input 1d1 this now gives us two inputs here now delete the first connection which will leave us with the attribute now set input 1d0 to 25 the point where the ball starts to reverse change the operation to subtract so we are taking 25 away from the foot roll value next we need another plus minus average node so duplicate this one and let's call this subtract instead of reverse so the first node will give us an opposite value to work with and this one will take it away for us connect output 1 from the reverse plus minus average node to input 1d1 on the subtract plus minus average node let's go back to the attribute editor this time set operation to sum so what we're going to do is replace the 25 in the color if true section here with the new value which will reverse the direction of the ball this is coming from the two plus minus average nodes we just created connect output 1d to the color if true r attribute okay let's have a look i'll reset this to zero so we move up to 25 and once past it fingers crossed yep the ball reverses perfect okay good now let's add in the toe movement and we can use some of the nodes we already have so what we want it to do is lift the rest of the foot add the reverse toe joint to the node editor and create a multiply divide node open it and call it foot left roll tip multi connect the output 1d attribute from the reverse plus minus average node to the input 1x attribute on the multiply divide node now connect output x to the color if true g attribute on the foot roll condition node we can use the same node because we still want to check if the foot roll attribute goes above 25 so here if it's greater than 25 it uses this value here let's connect out color g now so it's the same column to the reverse toe joint rotate x again just like the ball we also need to change color if false g to zero so the tour joint's rotation will be zero while the foot roll attribute is below 25 if we try that now you see the toe joint is moving but it's the wrong way so all we need to do is change the input to x value in the multiply divide node to minus one instead of one that's better the foot moves onto the ball and then up onto the toes all using a single attribute okay so now we need to work in the opposite way so the foot can roll back onto its heel don't worry though this is a bit simpler let's remove these and bring in the reverse heel joint we need another condition node so we can check when the foot roll attribute goes backwards so into negative figures call it foot left heel condition this time we are checking to see when the first term is less than the second term so change operation to less than and connect foot roll to first term so this will tell us when the foot roll attribute goes under zero if it does use the foot roll value so connect that to color if true r if it's not less than zero use the color if false r attribute instead so set that to zero so the heel joint doesn't move now connect out color r to the heel joints rotate x attribute okay so now as we increase the foot roll value the foot moves onto the ball and the toes if we reverse it it goes onto the heel although it looks like the heel pivot is too close to the foot so let's move that back to a better position i'm just going to press insert so we don't affect the rest of the hierarchy let's try here okay that looks better i might play around with it a little bit more later i've spotted another issue though as the foot rolls backwards onto the heel the ball joint continues to roll back too which we don't want so we need a way to clamp that let's reset the foot select the ball joint and graph its connections i'll just open these so we need another condition node which will tell the ball to stop rotating if the foot roll attribute goes under zero and we can put this between the main condition node and the ball joint we will call this one clamp connect outcolor r from the foot left rule condition node to the first term attribute on the clamp condition node let's check the attribute editor okay reset these so set this to zero and operation to less than because we are checking for when it goes back onto the heel okay now connect out color r again from the role condition node to color if false r and we will leave color if true r set to zero so if the foot roll is below zero the ball joint stays at zero now connect outcolor r from the clamp condition node to the rotate x attribute on the reverse ball joint okay give it another try now perfect works like a charm so that's the foot roll set up now so let's look at the foot bank and this is easier so don't worry all we essentially need to do is tell these groups to start rotating depending on where the foot bank attribute is if it's a positive number bank one way if it's negative bank the opposite way so we can use a condition node again to set this up bring the two bank groups into the node editor and the foot ik control create a new condition node and call it foot left bank condition let's open this we know we want the foot bank attribute to be the main driver so connect that to first term let's move to the attribute editor now change operation to greater than so we can check when the first term value goes above the second term so this way we can check if it's a positive number if it is we can use color if true r here so let's connect footbank to that and set color of false r to zero so this group doesn't move if the first term is less than zero what we can do is set up the opposite action on the next column here so if first term is less than zero we can use the color if false g value here instead to drive the other group connect foot roll to color a false g and this time leave color if true g set to zero okay let's check what axis we're using looks like zed so connect alkyl r to the outer bank groups rotate z attribute and out color g goes to the inner banks rotate z attribute i may have these the wrong way around so let's check ah yes just as i thought okay let's just swap these over that's better we now have a foot which will rock and bank plus roll forwards and back onto its heel now what i usually like to do is have another control in front here controlling these two options which is more interactive for the animator with this it's the translation values that drive those first term attributes rather than the foot roll and foot bank attributes i plan to have a full demonstration of this on my youtube channel at some point in the future so look we can also move and pose the foot and the controls still work and stay relative to the foot control's position and orientation okay i realize this video is getting a bit on the long side but bear with me we just have one more step to go but it will add so much more flexibility to the rig first we need some more attributes so create three new float attributes called heel twist toe twist and toe tap now open the connection editor the foot ik control automatically loads into the left side for us let's look at the reverse heal and see which attribute will twist it rotate y ok load the heel joint into the right side of the connection editor and all we are going to do is connect the heel twist attribute to the heel joints rotate y attribute as easy as that okay let's check the toe joint looks like we need rotate y2 so the tour twists load the reverse toe into the connection editor and connect to twist to rotate y so now we can pivot the foot from the toe and also from the heel the toe tap takes a little bit more work to set up this time we need to control the ik handles so they move up and down rotating the toes first clean the values on the two end ik handles so we have zero transforms now connect to tap to the translate zed attributes this will make them move up and down now if you wanted to you could set this up so you had two attributes one for each two or maybe include one so the toes can spread too so move side to side once you have the main reverse foot set up you can add as many extra finishing touches as you like okay so there we have the foot rigged now there is something i just spotted which i thought i would mention before we move on just in case this happens to you you may find that as you blend between ik and fk the tools flip like this now don't worry this is just the constraint all you need to do is select the main joint with the constraint on the one the model is skinned to and change the interpolation type to shortest you see the toe snap back let's update the other joints too okay that's much better and it was just an easy update but i can see how something like this could stress you out and have you pulling your hair out wondering what is going on okay that's the foot done we just now need to repeat the process to do it on the opposite side and what i'll do is i will work on that between now and the next video speaking of which in the next video we will look at the last two areas we need to rig and that's the clavicles and the finger 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: 381
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, gamedev, game art, game development, game rig, 2022, maya 2022, offsetParentMatrix, foot, roll, toe, bank, claw, toes, condition, plus minus average, multiply divide, toe flip, twist, heel twist, toe twist, toe tap
Id: jXmK0Vl5iYA
Channel Id: undefined
Length: 34min 54sec (2094 seconds)
Published: Mon Dec 13 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.