#RiggingInMaya | Part 13 | Intermediate | Face Rig - Joint Based Systems

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to video 13 in my rigging Amaya series all we are going to do in this video is continue on from the previous one where we built the joints and controls for this joint based facial rig if you want to see how he got to this stage then please check out the previous video so as mentioned we now have all the joints in position and orientated correctly we also have all the controls ready all that's left to do is wire these up so the controls drive the joints now before we dive in I just wanted to mention that you can now download all the source files for each part of this rigging in my series from my cube brush page you can find the link in the description below while you're there why don't you grab some of the other tutorials models our rigs I have on offer most are free but if you would like to help contribute to these videos all donations are welcome also keep an eye out for this popping up throughout the video when it does it means that as an added bonus I've written and uploaded a script which will help speed up that particular area of the rigging process right let's dive in if you remember for the lip controls we created two joints per control a root joint and also a tip joint which will be the one that drives a model I thought the best way to demonstrate the system used to drive these joints as to work in a separate scene so we can cover it in more detail and not be distracted so here we have our two joints plus a control unlike the other controls for the face we don't want to use translations to manipulate the tip joint instead we want to focus more on the rotation of the root joint we are doing this so we can achieve a better arc which will move around the face and ensure the tip joints orientation is always correct and pointing towards the root let's move the outliner out of the way and open the node editor bring the control and route joint into the node editor and remove that shape node we don't need it let's make things a little bigger and open these up what we're looking for is for the trolls translations to affect the route joints rotations the first thing we need to do is work out which axis affects which so it looks like the x-axis on the control should affect the Y rotation on the joint and the y-axis on the control should affect the x-axis on the joint okay let's undo all that and let's connect these directly and see what happens so translate x2 rotate Y and translate Y to rotate X if I move the control it looks like nothing is happening but if we look in the channel box we can see it is having an effect it's just a very small one we need to increase the value so the joints move more press tab and create a multiply divide node let's rename it so it matches the control and the joint so maybe add orient multi to the end too expand the inputs Connect translate X on the control to input 1x and translate Y to input 1 Y we need to keep in mind the way these need to be connected so connect output X to rotate Y delete that now and output why to rotate X and we can delete that too at the moment the amount the inputs are being multiplied by is what so it will just get the same values output from this nerd we need to increase these to get the movement we need let's set this to something like 550 there if you notice the joint moved so we know it's working let's apply it to the y channel now to now I remove the control the joints follow even moving up and down works too although it's in the wrong way we can easily fix that though by inverting the value so setting it to minus 550 instead now we can move the control and the route joint rotates so just reset these that looks better so what this means for our rig is we can translate this control and the tip joint will move around the mouth area in a nice arc this works fine as it is and if all our heads were perfectly spherical we could leave this here as you can see the arc is too wide so we need to find a way for it to get shallower you what we want is a way for the joint to move the control as the control is moved so as the control moves along its x-axis the joint moves along its z-axis because that's the one which that points down the burn we want to control the tip joint now so bring it into the node editor we know what connections we need so let's just connect them directly and see what happens so connect translate X to translate Zed on the tip joint the joint moved which is good and if we move the control we can see that it does get further away which is what we need but it's still too linear and it moves behind the root joint to get the arc we need to tell the joint to move away more when the control moves more so in effect the values need to keep increasing duplicate the multiply divide node we already have open the attributes and let's reset those back to one and let's change this to trans because we are working with translations take the controls trans X attribute and connected to input 1x on the new multiply divide node at the moment this will just multiply by wand so the arc will be linear so we need the value is being multiplied by 2 change to and not be fixed so let's just take the translate x value again and pipe that into input 2x just move these back and this down now connect output X to translate Z on the tip joint the joint has now shot back here with that said we do have an improvement in the movement the joint isn't moving behind the root joint now and the movement gets faster the further away the control is so we're on the right track we now need a way to stop the joint jumping backwards as you can see there is a value on the Z translation which is getting overwritten by the multiply divide node ideally we need to keep this distance but add to it so we essentially need an offset create a new plus minus average node let's just reset this connect the translate Z attribute from the tip joint to the input 1 D 0 attribute on the plus minus average node just to open these up so you can see what's happening okay try again translates out to import one d0 with that connected we can now see the attribute here and an import 1d one has appeared do the same again but this time connect translate Z to import 1d one attribute we now have two attributes here so this node will add wand to the other we don't need birth to be connected we only connected them to make them visible and so we could quickly star the joint said translate value go to the channel box and right click on input 1 D 0 and go to break connection so that's the current length of the joint and it's stored here and will always be added to whatever we pipe into the input on d0 channel let's rename this nerd before we move on so underscore offset under Scott PMA I'll move some of these around too we need to get the output from the multiply divide node as we did before but this time connect it to the input 1 d0 attribute on the plus minus average node now connect output 1d to the tip joints translate Z attribute so that's better but we have the same problem as earlier where it's moving but it's not enough it's also moving in the wrong direction this value should be getting smaller let's just organize this better you till you got node again like before we need another multiply divide node so we can increase the value so duplicate one of the existing ones just open these and we will rename it changing the end to invert underscore reverse connect output 1 d2 input 1x let's change the input 2x value to minus 1 so it will invert the value as well as multiply it now connect output X to translate it set so the joints moved again but now it's behind the root joint find the plus minus average node there it is let's try changing some to subtract there we go that's fixed it and now as I move the control the tip joint gradually gets further away so makes the arc shallower this is good but what if we wanted more control over the arc what if we needed it to be shallower let's remove some of these nodes from the node editor we don't need to see them anymore and hide these you so we have the X translation going into both inputs on this multiply divide node so these are the main values we are working with why don't we add another multiply divide node here so we can adjust the amount the translation is being multiplied by this should give us more flexiblity i'll just duplicate this one open these Connect translate X to input 1x move these over so let's rename this to gradient and connect output X to input 2x again with acceptor one we get the same result if I increase this to let's say 10 you can see the joint moving away already now if I move the control we get a much more acute angle in the arc you the beauty of this setup is you could connect this attribute to one on the control so the animator can animate the gradient or change it easily you can also do the same with the input one D one attribute which controls the distance of the joint adding this is an extra attribute will give the animator more flexibility and allow them to also move the lips in and out so that's the setup for the mouth controls and this could be used on many other aspects of the rig maybe eyelid controls for example so I'm just going to go back to the beginning before we added all these controls so what I've done to help speed things up is create a script to automate everything you just saw and this will be available to download at coffee com forward slash ant CGI to use it all we do is select the control first and then the tip join run the script and that's done for us the past ten minutes of work compressed into a few seconds it also adds the attributes I mentioned previously so you have more control over how the joints move you the gradient attributes will change the arc you so you can have a shallow our wide you offset controls the overall distance of the joint so like I said previously you could move the lips out or in a movement will adjust how far the joints move relative to the control it's small things like this that help to improve workflow so we have ten lip joints to rig which could take about ten minutes each so that's over an hour and a half's work this script compresses that into about 10 seconds so why don't you head over and download it now okay now you've seen the process behind building this system let's go in and use the script to apply it to our fish rig so here we are back in our scene we have all the controls we created in the previous video and if I make them visible we can see the joints too so as you can see we have the exactly the same setup we saw previously we have a route joint a tip joint under control at the end now I could work through each of these in turn following the steps I demonstrated before or I could just use a script so I select the control and then the tip joint and run the script there we go all set up we can manipulate the lip now using this and we can also edit how it works using these attributes as go through now and add this to the rest of the lip joints that's done do the corner joints now now the other side you okay those are done I'll just disable joint selection so I can select all the lip controls and we'll just enable it again oh I have the jar selected too so I'll just deselect that I can move all the controls now in the lip joints follow and they also move around the face too rather than just along one axis making animation easier for the animator obviously some of these need adjusting as the ark is maybe a bit too shallow in areas but we have these attributes which will allow us to do just that Plus these attributes could be animated too I'll reset the lips now now we could leave the lips like this and happily pass them on to the animator but I want to go a step further we added this global control previously with the idea being this will move all the lip controls for us again simplifying things for the animator the problem we have is a lower lip controls of parented to the jaw as there should be as we need them to follow the jaw control whereas the upper lip controls are parented to the head control so everything moves with a head we want all the lip controls to follow the global control instead so the logical thing to do would be to parent the lip controls to the mouth control right so we will move these here and also move the ones under the jar control to the mouth control to so they're all now under this control so we'll move with it but as you can see nothing happens they work when used individually but not when moved as a group if we move this and look in the channel box you can see we have clear translation values on the control if I move the mouth control and select the lip control again you will see we don't have any values now the way we have the lip rig setup means that the joints movement and rotations is driven by the controls translate values so in its current state we can't use them out of control what we need to do is add something between the control and the joints which will always have translate values no matter what control we use so let's create a locator and let's parent constraint the ippolit joint actually we need an offset group so let's group it first now parent constrain the group to the upper lip joint just to get it into the right position and orientation delete that constraint node and let's make it smaller the locator translate values are at zero which is important the values are being held by the offset group instead let's rename the locator now you adding underscore lock to the end and update the offset group to you we now need to parent it to the head control that's the wrong way around I'll just find the head control and move this into it we need to make sure it's moving with the head before we wire it up so open up the node editor what we essentially need to do is um pick some of the connections now because we want the locator to be the main driver not their control so let's add the locator under the control lay the graph of the control which will bring in all the relevant nerds now this part may get a little fiddly so what I would suggest is if this is the approach you want add the locator in from the start although there may be cases where you have similar problems with another area of your rig and following the next steps could be a solution so we need to backtrack a little and find out what the translations from the control are connected to we can see there's a connection here to the gradient multi-node so I'll open this up and we need to bring the locator back in you we just want to replace this connection so take translate X from the locator and connect it to input 1x instead mayor doesn't help matters by moving things around ok let's look for another connection right there's one here we don't need to see that nerd so let's remove it from the editor and we don't need these or this one you okay we have a connection here on the trans multi node so let's replace that so take translate X from the locator again and connect it to the trans multi nodes input 1x you we have another connection here going from the main translate attribute so it's effectively taking all x y&z at the same time let's connect translate on the locator to the import one attribute on the Orient multi node we don't need to see that anymore okay I think that's the mall let's test it so it moves with a locator but I think we've missed one ah that's it I didn't - the locator before so I'll do that now so let's try that again that's better the locator now controls the joint we now need to make the control move the locator because we don't want the animator to ever see the locator it needs to look like it's just the control that's in charge I'm just going to use a point constraint because I only want the translation values and make sure maintain offset is disabled so now I can move the control which in turn moves a locator which then controls the joints as you can see now I can move the mouth control too and the lip controls follow this now works because even though the main control has zero values the locator has them instead regardless of what's moving it so this will move the joints no matter what now I realize that was probably a bit more complicated than it needed to be but I think it's important to show things like that where you have a rig but you need to expand upon it the good news is that I also updated the same script I mentioned earlier so it will now automatically add in a locator for you again just head to coffee comm /and CDI to download it so that's what I'm gonna do now reload the scene and add the lip controls again one by one but using the updated script so here we go again I'm just going to go through slightly control and then the joint and run the script so that's one done and you can see we have a locator now I'll just go through and add this to the rest of the lip joints - that one and that one you there we go done I'm just sure the joints again we can use the mouth control now just select globally we also have the flexibility to adjust them individually to you we now have the issue where the lower lip controls no longer follow the jaw but we can quickly fix this you create an empty group joints we need the jaw joint parent constrained the group to the jaw joint and then delete the constraint nerd the group now matches the position and orientation of the joint parent this to the mouth control rename the group to lower lip controls offset unparent all the lower lip offset groups to the new group even though we've moved the controls everything still works with the mouth control all we need to do now is make the new group follow the jar control so use an orient constraint this time to do that now the lower lips follow the jaw again they also follow the mouth control you even if the mouth is open they still follow them out of control so we are just giving the animator an extra degree of flexibility essentially making their lives a bit easier which is the whole point of a good rig that's the lips rigged and as mentioned before you could use the same setup for the eyelids if you wanted the ability to pose them although this would be better suited to a cartoon character with larger eyes the beauty of this setup is ellipse now follow everything they even work if the whole head moves so that's the mouth done let's move on to the rest of the rig and you will be pleased to know that things get a lot easier from here on with the rest of the face joints all we're going to do is use a parent constraint to make them follow the controls so once you've added one you can then just select the control and then the joints and press G to repeat the constraint you so those are don't told you it was simpler we could use a more complicated system for each of these areas but sometimes the simplest solution is the best there's no point over complicating things the animator can now move all these joints around to pose and animate the face so we have these joints in here and at the moment they can be translated and rotated but why don't we give the animator a bit more freedom open the connection editor select the cheat control and click reload left and then select the cheek joint and click reload right select scale on either side to connect them that simple step has now allowed the cheek to also scale as well as move now you can't see it here but if you look in the channel box you can see the values have increased you let's do the same with the opposite cheek we can even add this into the lips and nose too in fact I would add it on all the joints you it's always worth checking that everything moves well with the head control and also test the rest of the body too sometimes you will end up with a double transform if the hierarchy isn't right so that's the head rigged and there are still some adjustments we need to do but we are now at a stage where we need to see how this affects the actual model so let's do that next we already have a skin cluster applied to our model so all we need to do is add the new fierce joint to it once added we can then edit how they influence it by painting the weights whenever you add joints to a model which is already bound to a skeleton it's important that the joint hierarchy is in the original bind pose so the pose it was in when it was first attached the model adding joints to a pose model even if it's only slightly moved can result in an offset or possible other issues further down the line when you're coming to paint weights the problem is the skeleton his number is stricted by all the controls and systems we've added so we need to disable them first go to modify evaluate nodes ignore all this will temporarily disable all these systems in the scene with the model selected go to the rigging menu set and then under the skin menu select go to bind pose this will ensure that a skeleton is in the correct post for us you may not see much if any movement but it's good to just make sure we can now go through and select all first joints we don't need the eyes or eyelids as we added those previously we also don't want the root joints either these are just part of the rig and don't need to be skinned you I better select the nose too and then add the model to the selection next go to skin edit influencers add influencer and open the options I'll just reset this you need to have lock weights enabled and the default weight set to zero if you add the joints without these being set Mei will add default weighting values to them which will affect the other weights meaning you will have to redo a lot of your earlier work locking the weights will add these joints with a value of zero meaning your original weights are safe that's the new joints added so next go to skin paint scheme wags and open the window just move this over select that again if I scroll down we can see the new joints you will also notice the padlock symbol is now indicating these a lot as you can see if I select them they have no influence over the model unlike the jaw where we can see the weights have been preserved let's go through and unlock these now so we can work on them you I think that's them all before we start painting the weights I'm going to star this pose I'll just hide the joints and the model and the locators - we need to select all the face controls and in the channel box and to select all the attributes right click and select key selected you could just press s2 to set a keyframe in the timeline we can see a red line to indicate the selected controls have a key on them now move over to frame 1 and enable auto a keyframe this will automatically add a keyframe for me as I move the controls we can bring everything back now I'm going to reduce the length of the time slider to 20 we only want to see the first two frames so it's easier to select them looks like there's a rogue key on the eyelid so I'll delete that so we can see how the weights are affecting the model we need to move some of the controls actually I'll hide the locators again as we don't need to see them and turn off x-ray adjoints so it looks like nothing's happening the joints not moving but remember earlier on we disabled the Nerds go to modify evaluate nodes and evaluate all to get things working again there we go I'll disable joint selection - we want to see them but not select them I can now go back to frame 0 to get back to the default pose which is essential when mirroring skin weight I'll leave these for now and move the corner controls I'll do both sides at the same time move those up and these down it looks strange having these wavy lips but you need extreme poses when painting weights I'll open the jar slightly to so now we have a basic pose for the lips open the paint scheme where it's tool again and right-click on the upper lip join and go to select influence I'll just reduce the brush size and disable actuary joints again I'm going to use replace and reduce the opacity to begin with so we compare the effect gradually because I have already covered painting skin weights in a previous video I won't be going into too much detail in this one but feel free to refer back to that one if you're not sure how to proceed I'll pick a softer brush to and start painting because we move the joint we can now see the vertices moving into position if we hadn't posed this you would see them turn white but I have no idea how the model would be deforming now I select the lower lip joint and start adding those weights we don't want to affect the whole lip we just want a gradual gradient going to the next joint you let's do the corner joints next with the corner I want this to affect a larger area because we will have more movement here when he smiles and frames I'm just blocking these for now so don't worry about being exact our precise you that should do for now on to the middle jikes now and remember we didn't move these controls so don't worry if the vertices don't move we do still need some influence here though and again on the lower joint you that's the left side blocked out so now we need to go in and smooth them out a quick way to do this is to just select the head joint as this affects all the lips too well all the upper lips anyway switch to smooth and turn up the opacity I'm just clicking gently around this area not painting because I don't want to soften too much I switch to the jaw joint now and we can soften the lower lips to again just adjusting it gently we can soften this area and the corner of the mouth - you want a nice distribution of vertices and for it not to look angular I know that that's going to be difficult with a low poly model when you're happy go back to frame 0 and go to skin mirror scheme weights just use the default settings and click apply if we now go to frame 1 again we can see the weights on his right now match his left and there we've now got more control over the lips so we can start to form mouth shapes although this area looks like it needs softening I'm going to disable actually adjoints in the actual pain skin weights window just down here so it doesn't activate each time I open it just smooth this out a little more and switch to the joint and smooth this area out more go back to frame 0 oops mayor bug let's just see how he looks with his mouth open hmm this doesn't look smooth enough I see if we can fix that you maybe try the jaw joint first you yeah that looks better switch to the head and soften that side too you okay let's reset the jaw and mirror the weights again yeah it looks good just test the lips yeah there's an angle here we need to soften we can come back to that though with this tutorial I don't want to draw a line about painting weights for hours so this is just a quick overview but I would hope that you would spend a bit more time in care with your weights okay let's move up to the cheek just move this out we will use a softer brush select the cheek influence and start painting I make my brush bigger we want more of an influence over the middle here so it's fully weighted you something like that we can then use smooth to soften it back down and round it off you now we can puff out his cheeks and suck them in we can also use scale to adjust the shape to and also rotate if needed so we are giving the animator full flexibility I'll just mirror those weights across you we can select to move both cheeks out at the same time and scale them what I'm going to do now is I'm going to go through and paint the rest of the way it's around the face they're just as easy as of cheeks and the lips just make sure you pull them first so you can visualize the influence the joint is having on the model so here we have the model with all the weights painted and mirrored across and to be honest I just use ng skin tools to do it we compose the lips individually and move them all at once you you can also scale them to to make them thinner or fuller depending on how stretched off squash the lips need to be we have the cheeks as before the area is on the upper cheeks - for when we need to squint our sneer at someone we can even raise and adjust industrials too and animate the whole nose just like with the lips you can move the eyebrows as a whole and quickly rotate it or go in and edit to the individual controls for a more dynamic pose you it's always worth making sure the face controls follow the head to so they don't get left behind or have a double transform applied this looks good when you're at the stage with any facial rig it's a good idea to try out a few poses to see how the joints look and how the weighting is holding up I've added a few quick ones here so we have a happy face to test the lips you an angry expression then Shakhtar surprised and a silly face to see how the lips form around the tongue I'll turn up the control so we can see the model its own as you can see even though this is a basic face rig you can still achieve a good degree of emotion from it you you'll notice I also I some tone controls too this is just a series of joints but the ones towards the tip get closer together because you need that extra bit of flexibility that's for the controls I'll just open the outliner these are just basic FK controls as we've used before they're just all parented to the jar control so we can rotate it you and also scale it to you I'll just move that back and bring back the model and hide the joints so there we have it a full joint based facial rake with lots of controls to play around with so that's the joint base trick complete what I want to do is finish this rig with a video of covering adding extra controls for locking it down making it ready for the animator cleaning up the scene and also making the whole rig scalable before I do that though I want to take a couple of steps back and revisit the facial rig but this time we will look at building it using blend shapes instead of joints so I hope you've enjoyed this video if you have please let me know in the comments below also let me know if you have any questions and tell me what future videos you would like to see remember to download the files from my cube brush page so you can follow along and why not say thanks and also earn exclusive rewards with a small donation via my coffee page as always remember to like this tutorial and subscribe to my channel and remember to hit that Bell icon so you're kept up to date with notifications on future videos and posts this is aunt c GI signing off and I will see you on the next one [Music] you
Info
Channel: antCGi
Views: 28,856
Rating: undefined out of 5
Keywords: rigging, maya, autodesk, maya3d, rigging in maya, rig, 2019, maya 2019, gamedev, game art, game development, game rig, face, face rig, maya face rig, joint rig, controls, nurbs, rotational axes, facial rig, orient joint, game face rig, node editor, multiply divide, plus minus average, multiplydivide, plusminusaverage, expressions, happy, sad, smile, grin, tongue, cheeks, lip rig, lips, nose, nostril, sneer, squint, joint rotate
Id: hnzfeDQY0oM
Channel Id: undefined
Length: 57min 4sec (3424 seconds)
Published: Wed Nov 20 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.