Houdini 16.5 Rigging Series - 04 - Left Hand & Left Arm Completion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the rig for our hand is pretty simple and fairly straightforward there's just lots of repetition so what we'll have is a simple bone hierarchy to represent the finger we'll have our proxy geometry and those bones will be driven by a series of controls so let me rotate those they rotate the bones and then our parameter pain will also be very simple will group the hand parameters in a little group box here we'll have a geometry display a bones display controls display the hand rotation will also drive the twist that we were talking about in our arm so we'll implement that as well so I can rotate the wrist through that handle but then if I rotate and Zed you can see that I get this nice twist that moves up the forearm so we'll implement that as well and then the rest of the controls are essentially just an interface on a number of expressions so we can do things like curl all the fingers at once we can splay them sort of move them side to side we can fan them back and forth and then we can also flex them and then these parameters are repeated for each of the fingers the thumb index middle ring and pinky I can see the index finger has curl display fan and flex and then we have parameters for the individual rotations down there and then also for the thumb but it doesn't have a fan or a flex it just has curl an display so pretty simple pretty straightforward just lots of repetition and let's get started to begin our hand rig we're going to turn off the spine proxy and spine controls head proxy head controls and our arm proxy and our arm controls but we'll leave the bones on and then we'll turn on our soldier body so we can draw these bones correctly and what we want to start with is a hand bone and we could attempt to draw it here in the hand using the various bone drawing options but probably the easiest way to get exactly what we want is to simply start in the network with a null I'll call that so it's sitting down at the origin and we can make it much smaller and then just put a bone in the network so it will pop down to the origin and because these two are the in the same spot we can just wire them together and so now it's as if we've drawn this bone at the origin for starters we can make its length much smaller and then to position it we can just take the left hand bone route and make it a child of left arm bone to now it pops itself with the root of that bone we can then take the length of that bone so select left arm bone to go to the bone length just copy that value and now down in our left hand bone route we want it to sit at the tip of that bone so we want to be in a negative direction so we can paste that left arm bone to length value and then just negate it so now we know that this null this left-hand bone root is sitting exactly at the tip of that bone and then just as we did with the the arm bones we want the rotation of this bone which we should call left hand bone we want its rotation to be in the the x axis pointing down we want it to be positive so right now it's oriented in the same way as the lower arm bone so we can change that by selecting the root and moving that like that so now when we select the left hand bone and we rotate in X we're getting a positive value here so that's what we want and now we can just align this with the hand geometry and if you make this bone and you can't see it through the geometry you can right click and use the flag x-ray and that will turn that into an x-ray object and you can see through the geometry so again with the roots selected I'm just positioning this the way that we want it we can select the hand bone go back to the bone length tab and just make it about that long that should be good we can turn the select ability and display of the root off so there's our bone we can give it a color if we want to let's make it red so there we go and now select the left hand bone root turn on keep position when parenting and just sever that connection so now it's as if we drew this bone exactly where we wanted it right in the middle of the hand but it's good and now we can add a control to this hand bone and once we have that control we can finish up our our proxy geometry so to do that we'll go back to our rigging tab select our hand bone FK control left hand bone is our proxy or our prefix I mean just what we want and now we get our control hierarchy so we have an offset an auto and a control and for this control I'm gonna leave it as a circle but I'm gonna make it much smaller maybe I'll turn on the turn on the I K control the arm just to compare the sizes that should be good and what we'll do next is will constrain the hand bone root into the bone hierarchy of our arm and we'll do the same for our hand bone offset so that when we're in FK and our arm rotates it'll bring all of these controls for the hand along with it to constrain our left hand bone route we're going to be using a parent blend so with that one selected we can select parent blend and we're going to use a simple constraint we're going to be using the transform but not the rotation so we turn these three off we'll be using key position and then we can select a lower bone as the new parent so accept selection and we're dumped into that left-hand bone root constraints Network you can see that we're getting rolled space getting the parent space getting the left arm bone to and we're computing the full transform but then the final parent just has translation and scale so we're not sending rotation out and we can see the effect of that and turn back on our controls parameters our control parameter for our armed and if we select the I K and we move it you can see that our hand bone is following with the I K if we move that to FK and rotate you can see that the hand bone is also following but you'll notice that it's just transforming its orientation is remaining local so we'll deal with that in a second we also want to move this hand control the hand bone control so we'll set up the same constraint so with the left hand bone offset cult selected we'll go to a parent blend simple again just translations turn off the rotations it's asking us to select that again so we'll say accept selection asking for a new parent which is the arm bone accept selection it dumps us into the left hand bone offset constraint Network and again that parent is just sending out a transform and scale and we can see that now when we trends are we in IKr not so let's turn on K back on when we move our ike a control that circle hand control is also moving and when we turn the arm to FK and rotate it's also moving so that's what we want it's turn I came back on and now what we want to do is constrain the rotation of the hand bone to the rotation of this hand control so select the hand bone parent blend we're going to use a simple constraint we're going to turn off translation and turn on rotation and turn off scale it's asking us to select a new parent object so we'll select the hand bone control right click accept and now in our hand bone constraint Network we have the very similar constraint network except the final transform is just sending rotations so now if we select that hand bone control and rotate it we're rotating the hand bone and when we rotate in X we're getting a positive value now that we have our left hand bone control hooked up we can use its Z rotation to drive those twist bones so to start we're going to turn off our soldier body and we're going to go over and find our proxies that we made a little while ago bring those down we're going to need to put them near the upper and lower arm bone so I'm going to rearrange this Network a little bit there so we have this series of proxy geometries and now we need twist bones inside each of our upper and lower arm bones so for the moment turn these off and if you'll remember we installed a script called split bone and we're going to use that to create new bones within each of our upper and lower arm bones so I'm going to select the left arm bone one I'm gonna hold the shift key down then click split bone that gives us a split bone prefix and I'm just gonna use split or actually let's use twist you can use it whatever you want twist so it makes more sense in this case and I'm going to say okay now it's gonna ask me the number of bones that I want and the default that I've set here is at four and that will be fine for these twists and so now you have to try and find out where these bones are so let's move that left arm bone two out of the way move these out of the way we've built twist bones for our left upper arm and before I do the left arm bone - I'm gonna rearrange this network much more it's a little too crowded there we go so left arm bone - hold shift and split bone twist for now we have our twist bones so now we can hook up the proxy geometry for our arm - each of these bones turn them on and make sure that the we'll have to cycle the lock here because now that we've attached them to the bones the actual geometry is floating out over here so we go inside control click on the lock flag then just lock it up again you can see that that popped right where we want it so we have proxies for our twist bones and you can see that if we twist one twists like that the upper arm and you could put that shoulder proxy as a child of this first bone or not depends on what you want to do in in my case I'm just gonna leave it attached to the shoulder for now so now that we have the proxy geometry and we have the controls that we need we can use this twist expression shelf to set up some expressions on our twist bones so that when we twist this hand control in Zed we'll get a nice twist distributed up the forearm and then from the shoulder down to the elbow and then at the elbow up and down the arm so we'll start up here at the shoulder and to use our twist expression shelf tool we just hit twist expression and we're prompted let's see down in the status bar select the first and last control objects so in this case that's the shoulder or rather the upper arm rotation lower arm rotation except that selection and now we're prompted to select the bones in order right click and accept that selection and now you can see that these bones have an expression built into their rotate z parameter so we can test that if I select the upper arm control and rotate in Zed you can see that we're getting some nice twist there I can select this one rotate and there's twist as well so now we'll do the lower arm so again twist expression we're prompted for the first and last control the first control will be the lower arm FK control the second control will be the hand rotate control except that selection and then the bones in order now we can test that so if we rotate from the elbow will get twist in the upper arm and in the lower arm and then when we rotate our hand we'll get a nice twist in the forearm great before we move on with the hand I went in and cleaned up the network a little bit more and I added these network boxes around the major sections of our rig so we have the spine here head neck in the arm and then I also went through and added the missing node groups for the left arm and the head and neck made sure that those were all accounted for and again you can get to that by shift-z that will bring up this window and then I added the display expression for our proxy geometry for our arms so that if the G display is one then they'll be on otherwise they'll be off so now we can use our left arm geometry display to turn all of that geometry off or proxy and off when it's into form I also turned off the display of the twist bones and that's not controlled by this bone display so you can see that if bone is on we can't see the twist bones and attach the control displays properly also right now we're in I came mode and you can see that by the left arm FK Aki blend is set to one if I move this toward FK and I pass 0.5 you could see that the Ikey controls of the arm turn off and the FK controls turn on and that point 5 is just kind of an arbitrary an arbitrary value and where I did that was in the FK controls I bring up the expression editor with alt e can bring this out so I'm saying that if the left arm control display is 1 and the left arm I kfk blend is less than 0.5 then this should be 1 on if it's greater than 0.5 then it should be off and you can see that it's greater than that means that we're going toward I K so this will turn off the FK controls if we're less than 0.5 and then I did the opposite for the iCade controls I'm saying greater than 0.5 so some simple expressions to drive whether or not either set of controls is on all right having done that we can move on with the head putting bones in hands can be difficult hands are not symmetrical they're not lined up with anything they're all wobbly and weird so really there's no trick to doing this the the only thing you can do is just dive right in and start doing it but there are some things that we can do that make it a little bit easier in 1613 u 16 and 16 v we have in the bones tool some placement options and by default it's view based but we also have normal based and free hand and what these view and normal based modes are is that the bone tool will detect the geometry underneath our cursor and so when we click and create bones it will use the view plane and try and find the middle so it'll it'll to detect this first surface here and then it'll detect the back based on this view direction and it will find the value in the middle and that's where it'll place the bones and then the normal based method will detect the surface normal either at the front and then again at the back and find that middle distance and then free hand is just free hand it won't won't care about anything in the geometry so what we can do is we can give this a try with view based on the thumb and if we just sort of line this up we might want to go into orthographic mode by turning off perspective and just trying our best to line this up and then give it a shot so one two three bones finished drawing so we get our bone chain and if we have a look at it we can see that it's not what we want the the bones have been placed correctly before where we clicked in the middle of the geometry based on that view plane I'm going to come out of orthographic and back into perspective but they're not lined up with each other very well you can see we have this little little bend here and so that's that's not going to be great for our rotations we if we rotate these you can see that they they kind of go all squirrely so that's no good and normal based placement will will end up being something similar to this so what we can do is we can try using one of the other features of the bones tool and that is the divisions parameter so again I can go to view based I'll just go back to orthographic and what I'm going to do is I'm going to click once here and instead of drawing three bones I'm gonna come out to my end position and I'm gonna use my scroll wheel to make three divisions so now these bones will be lined up with each other finish drawing so now I have my bones I'll come out of ortho view back into perspective so now these are nicely lined up which is what we want but you'll notice that when we if we select our chain root and we go to the transform tool because we want a better position and orient these bones this root is lined up with the world space so that's not too bad for repositioning but when we want to orient this it's kind of you know it's a little bit difficult to get the kind of weird angle that we need to conform to this thumb so take advantage of our split bone tool and what we're going to do is again back into orthographic just to help us out a little bit go back into the bones tool view based and just gonna start it here I'm gonna reduce this back to one bone and click right there so now I have one bone that is approximately where we want our three thumb bones to be I come out of using escape to come out of the bones tool I'm gonna select this bone and I'm going to ctrl click on our split bone tool I think it's ctrl click we'll find out you can leave this at split we have to rename these nodes anyway and say ok and I want instead of four I want three bones so now we get this separate chain and we can turn the display of these guys off I'll just take this make it a little smaller easier to use come back into perspective mode so now we have three bones that are lined up with one another but we also now have a route that is oriented with our bones so now moving in and reorienting this chain will be much easier so before we do that we want to check that our rotations are going in the right direction so I'm going to select all three thumb bones and just rotate them positive so this is going backwards so I'm going to take our roots put 180 in rotate Z and then clean that transform now when I select those bones and I rotate an X they're going forward and I'm getting a positive rotation so that's what we want send that back to zero and now I can take this root and position this chain right where I want it so I think a little bit over here and then I think for rotation if you find when you're rotating something and you want to be quite precise it's sometimes difficult when selecting an individual axis you get kind of a difficult little wobbly Ness what you can do is with that selected if you move your mouse very far away from the position of rotation way out here you can get a much finer control over that rotation so I'm going to place that right about there maybe move it a little bit more over so that's pretty good but you'll notice that our our bones while they're aligned properly they're not long enough and they're not in the right positions but having oriented the whole chain with this route now it's very easy to simply select that first bone and rotate it just how we want we can go to the bone tab on the bone and just increase that length a little bit to push that rotation right to there which is you're pretty good and then we can select the next bone and rotate it down maybe make it a little bit longer and we can select that last bone rotate it just a little bit and make it a little bit shorter so now since we've only rotated each of these bones in X they're still perfectly lined up and now we can just select all three bones go back to the transform tab and we want to get rid of these rotates so we can just say modify pre transform clean transform so that's that's about the best trick for making finger bones that I can think of it's pretty simple and straightforward but you get a lot of control which is what you need and the key thing to remember with with finger bones is that no matter what your geometry is unless it's really crazy some sort of fantasy creature or something the most important thing for your animators is that these rotations are consistent and predictable and so that's what we want to keep these all nicely lined up and then for naming gonna start naming these left hand and then this is the meta root zero and we're gonna use numbers to to name our but our fingers so the thumb will be 0 the index will be 1 middle will be 2 ring finger will be 3 and pinky will be 4 in our interface when we get to this we can call it thumb and pinky and and whatever we want but it doesn't really matter we don't need to have these kind of readable names for our nodes but for scripting it's much better to have use you know sort of numbers as suffixes so that will be the left-hand meta root this will be the left-hand meta bone zero and then left hand procs and this one will be called dist and I'm using just the the anatomic names for bones and you can find that really easily just google hand bones or go to the Wikipedia page and you'll find something like this so we have carpals which are like the little weird bones in the in the hand we have metacarpals so all five fingers have a metacarpal they have a proximal phalange all of them have an intermediate phalanges set for the thumb and then they all have distal phalanges so I'm using that convention and now we can get rid of this early chain bone that we made we don't need it anymore and there is our thumb so next we'll do the index middle ring and pinkie finger an optional step when rigging a hand is to create metacarpal bones in addition to finger bones they're not always necessary it really depends on the character that you're doing for our character I'm going to create metacarpals and we could go through the same kind of process that we did for the thumb but I'm just going to create a quick bone just down at the origin I'm just going to go into the bones tool I'm gonna put some grid snapping on just do that real quick so now we get a chain roots and a chain bone and I can take that chain root and parent it to the hand bone whoops before I do that I'm going to take key position when parenting off a hand bone so now it snaps up right where that hand bone is grab the bone itself make it much much smaller and now with the chain routes selected we can escape out of the bones tool now I can offset it from the wrist still have snapping on turn that off turn this route off so I want to put the metacarpals at the wrist but offset from that wrist rotation spot so you can see in our little picture of of our metacarpals oftentimes people will have a set of metacarpals that all rotate from the same spot and they sort of fan out like that but that's not very good you want to spread them out a little bit so by parenting their route to the hand bone we have them aligned properly and so now we can just spread them out a little bit and rotate slightly and go to the bone itself go to its length and about there and then we'll check again check the rotation to make sure that when we when we go down we want to go in the positive x we're getting positive x here that's what we want may be great now I'm gonna name these in in the same way that I named the thumb so left hand meta route 0 this becomes left hand meta route 1 this is left hand met a bone 0 bone 1 and you'll notice that all I did there was copy this name and paste it into this name and so it tried to name it zero bone zero but there is already a bone zero so it Houdini will automatically increment the number if a known name ends in a number it'll increment it so we get that automatically and now what we can do is we can simply so these two copy and paste and now we get perfectly incremented metacarpals so here we just have to move them over into their correct spots and then we can attach finger bones to these chains all right so I've done exactly that I've duplicated the left hand meta one metacarpal two meta two-out-of-three in metaphor and then I oriented them to point to the position of the finger rotation i modified their length a little bit and then in their positions kind of gave them a a little bit of a curve just to reproduce that slight curve that a hand has and so next what I'm gonna do is I'm gonna do exactly what we did with the thumb for each finger I'm gonna draw a single bone from this point to the tip of the finger and then I'm going to use my split bone shelf tool to create those three bones I'm gonna make sure that their rotations are positive in the curling in motion and then I'm going to position them properly so I'll come back when I've done that and show you what I've done so I've finished all of the fingers and as I said earlier all I did was use the same technique that we used for the thumb I created a single bone chain from the root of the finger to the tip then I used our split bone tool to split that with single bone into three I made sure that my rotations were correct I repositioned using the rotation of this well first with the root then rotated the this bone increased its length a little bit rotated this bone modified its length rotated this bone modify its length a little bit and then actually what I did was just in the network I took a bone chain and using alt held alt down and then clicked and dragged to create a new bone chain and then I just parented the root to the next bone so that I could quickly reproduce that and then I just had to go in and modify each of these individually so we can go back to our thumb thumb meta root it's got keep position when parenting on so we can parent that in to the hand bone like our metacarpals and now we can test our rotations if we grab all of our finger bones and in the rotate we can rotate them in you can see that they're all rotating into the palm quite nicely so now we just want to go through and and clean some of this up so I'm going to select all of the bones shift select those shifts let the fingers and in the transform I'm going to say modify free transform clean transform on the bone tab and go to this rest angles and I'm just going to put zeros in here these numbers can get a little bit modified as we are doing things we'll talk about rest angles later on when we go into capturing but just to clean all of this up and then all of these bones I'm going to turn off there select ability or make sure that they're turned off so that I can't can't select them in the viewport and then all of these root nodes going to select going to turn off their select ability and their visibility I can just clean clean this up a little bit and now I can actually test to see that our our wrist control if I rotate that it brings all of the bones with it so that's good and then next what we're going to do is we're going to make the proxy geometry for all of these bones and then after that we'll set up our our control hierarchy for each of these bones I've gone ahead and made proxy geometry for our hand and fingers and again that was making a group on our original geometry and then object merging it into separate object and then locking it in a null then I parented each of those pieces of geometry to their respective bones and I turned off the Select ability flag so now when we rotate our bones our proxy geometry follows along and we're ready to make our controls so we're gonna use our FK control shelf tool and it's as simple as selecting a bone hitting FK control it'll give us the default prefix which is just fine for what we want it okay then we get a series of nulls are offset or auto and our bone control and the controls by default are coming in at one unit which is in Houdini by default one meter but I think I'd like to change that to something a little more reasonable maybe 0.15 see how small that is let's try point 1 so that's a bit better we can go ahead and change those later if we want so I'm going to edit the tool itself and the the FK control object has a Geo scale and that's being set here with this variable control size and that's being defined up here so I'll put that zero whoops 0.1 I'll apply accept so this is the the meta bone control I'll select the next one FK control so now it's coming in at a much more reasonable size distal so there are the controls for our thumb I'm going to pause the video and do the same for the metacarpal bones and for each of the finger bones and then I'll come back and show you what I've done okay I've gone and made controls for all the metacarpal bones and all of the finger bones and then I've parented the offsets of all the meta bones to the hand control and then just parents at each bones controls in order so meta bone control is the parent of this offset this controls the parent of that offset and so on and then for the metacarpals by default the control will come in way up here at the root of the bone which is fine for the rest of these fingers but for the metacarpals they all get jammed up here at the wrist so what I've done as you can see down here is I selected the control and just moved it in Zed along the length of the bone until it got to an area with that I liked in this case it was 0.75 I can just clear these and then I moved it slightly up in Y I think like that and then I need to move the pivot back to the root of the bone because I don't want this control pivoting from here so it's easy enough to take these values and just copy this parameter and come down to pivot translate paste the values and then put their opposites in so now when I select this control here in a much more easily accessible place it's still rotating from the root of that bone like that and then again just parent all of these together and there we go so now we have a full collection of controls which are a child of the wrist control here and then each of the metacarpals will move and it will bring along all of the finger controls grab all of these see the word moving nicely next we'll set up a series of constraints between the hand controls and the hand bones themselves to create our constraints we're going to select one of the bones I'm going to go to our constraints tab and we're going to use the simple blend set too simple we're just going to select rotation and we're going to keep position after so it asks us to select object to constraint or to create blend constraint so we select our bone accept that selection and now we're prompted to select the target object and the select our hand meta bone zero control accept that selection and drops us into the constraints Network inside the bone object you can see that we're getting the world position of the bone we're getting the position of the bone control or performing a simple blend and then we're maintaining the offset even though there isn't an offset in this case it's nice to have so now we can select that control object and we can rotate our bone so I'm gonna go through and do all of these all of the thumb bones metacarpals and all the finger bones and I'll come back when that's done so I finished constraining all of the bones to their respective controls so now I can select those controls and animate our fingers I also went into the network and clean things up a little bit made it a little more organized I also created our node groups for the hand bones the hand controls on the hand proxy objects on the hand proxy objects I select them all and used our lock all shelf tool to lock its transforms so I did that for all of the proxy objects I made sure that all of the nulls that we aren't using have their select ability and display flags turned off and now we're going to go and start building our parameter interface for our hand and that will will sit right below the left arm parameters in our left arm folder and then once we've done that we're going to mirror all of those controls so that when we mirror our left arm all those controls will hook up automatically because they'll be looking for all the right names so to begin making our parameters for our left hand we're going to start in the left arm folder and make a new folder call that left hand to make it a simple folder and then we're going to select our geo display bone display and control display from our arm duplicate those drag them into the left hand now we can rename these and now we want to create basically a hand rotation will promote this hand rotation and then we're going to create a series of sliders to drive a curl ass play a fan and a flex for our fingers so to start that take our left hand bone control will promote the rotation so we'll call that left hand bone control down bone wrote and then we could if we wanted have these automatic curl and Flay splay and and flex go from 0 to 1 or 0 to 10 I'm going to do 0 to 10 or sorry negative 10 to 10 so I'm adding a whoops about a label parameter a float parameter and I'm gonna call this curl and come down here to the range section will turn on range I'm gonna make this negative 10 into 10 and I'm going to turn on the lock for both sides so that will restrict this slider from negative 10 to 10 so select left hand curl I'm gonna hit duplicate force play for fan and then for flex I'll go in and rename these so these controls the curl splay fan and flex will drive all of our fingers but we want some of these for each individual finger as well as well as controls for their their rotations so I'm going to create another folder I call this thumb duplicate it for index middle ring and pinkie rename these and now I want to take for the thumb I think we just need we need curl and maybe splay so I'll take curl and splay duplicate those put them into into the thumb and now I can say left thumb I'm splay and now I want to grab the rotations from each of our thumb controls so I'm going to select left hand met a bone control throw that rotate in there call this meta wrote select the proxy copy this and then I'll take the pistol now if I hit apply and see that for these controls their rotations have been promoted we can take a look at our parameter pane now so underneath our left arm we have a left hand group we have our display of our controls bones in Geo we have the left bone rotation we have these left hand curls playfun and flex that go from negative 10 to 10 then we have a thumb index middle ring and pinkie and the thumb has a curl and splay that go from negative 10 to 10 and then we have the meta procs and dist rotations so what I'm going to do is pause the video and I'll add the same to these four fingers and then we'll hook all of this stuff up and then write some expressions so that these sort of global style controls will drive all the fingers so I'll be right back alright I finished adding all of the interface parameters for a hand the thumb index middle ring and pinkie one change that I did make was that the left hand flex parameter used to go from negative 10 to 10 like the curls play and fan but I changed that to 0 to 10 and I did that for the index middle ring and pinky flex as well then what I did was I went through and just as we had done in our other sections turned on the display flag of our proxy objects and I went and stole that same expression that we were using before that if the Geo display is off the display should be off if it's on proxy it should be on and if it's on deform it should be off so I did that for all the proxy objects and I hooked up the bone display you can see here it's off turn it on and then I did the same for all the controls off and on for the curls play fan and flex controls in order to sort of understand this without getting ourselves distracted we're gonna concentrate just on the pinky and we're gonna start with display and display goes from negative 10 to 10 and when display is at 10 we want our pinky display out like that about 20 degrees and then when the display is at negative 10 can probably come in again around 20 degrees well we'll see how it how it looks so the question then is how do we map this negative 10 to 10 parameter to the rotation of our pinky rotation while keeping this parameter free we want to leave this control open for our animators and how we'll do that is by using the auto no just above our control because if we select that and rotate it it's giving us the same result but it's going to leave this guy free for our animators so in order to see these things a little bit better I'm going to select all of the auto nulls and I'm just gonna give them a different whoops different color in the network just gonna give them this may be a pale red just so we can see them and find them quickly we're going to ignore the the meta control for a second and just concentrate on this control at the knuckle so we know that we want to when we do pinky splay of 10 we want to rotate this Otto know by about 20 degrees so the first kind of obvious thing that we can do is we can take this pinky splay and just drag and drop it into the Y Channel so with that direct relationship we do pinkies splay of 10 so we want to first of all reverse these we want to go if we have 10 positive we want to be going out so the first thing we can do is just negate that but we saw earlier that we want to go up 20 degrees not just 10 so what we can do is we hit alt II you know in a channel we bring up the expression editor and what we can do is use the fit function and what this will do I'll just sort of write it out in a basic form for you so it's a fit and to function so we do the work inside the parentheses we have a value that has an old min and old Max and then it has a new min and a new Max so we're going to take a value that has an old minimum and an old maximum and we're going to change those to new minimum and new maximum so we're going to remap whatever that value is between this new range and in our case that value is this left pinkie splay that has an old minimum that we know is negative 10 and it has an old maximum of 10 and the new minimum we want is we think negative 20 will try negative 20 and see how it looks and then the new max is 20 and then we know that we want to reverse it so that when it's a positive splay it's going to go out so we just cut this so now we have that but for our value we want to put in that parameter so just to go over it again whoops we want this channel so we're gonna take this channel the left pinkies play that has an old minimum of 10 and an old maximum of or an old minimum of negative 10 an old maximum of 10 we're going to remap that value from negative 20 to 20 and then we want to negate it so if we hit apply and accept you can see if that worked so again left pinkies play and that's exactly what we want we go to 10 and we have negative 20 go to negative 10 and we have 20 so that is the principle that is going to run all of this stuff for all these fingers and then what we're going to do is just sort of layer different rotations and and different fit expressions for all the various controls so next we'll do left pinky fan and this time when we go to positive 10 we want this control to rotate in the x-axis and we want it to go in let's see maybe let's say 35 degrees so again will not use the control but we use the auto and we want to go in the rotate X direction so we take left pinky fan can drop that it right in there if we go positive that's what we want but we want again ten we want to map this too I think we said 30 so again old E and we can say fit that value between the old minimum which was negative 10 the old maximum which was 10 to the new minimum we're gonna say negative 30 a new maximum of 30 and then we can apply except test that out so right now it's at 30 because this is at 10 and if we bring that up to zero or zero is zero a negative 10 is negative 30 so that's our fan action but what makes a fan a fan is that these fingers all have different values so this pinky is going to 30 so the ring finger should probably only go to about there which is let's say 15 so we can do that right away because we know how to do that so we'll go into this we'll copy this we'll go to our ring finger auto and right inside rotate axis we can paste it so instead of left pinky fan we can say left ring fan and we know instead of 30 I'm gonna do 15 15 so now if we go to a ring left ring and do fan it's gonna go up to ten down to ten and that's going to use 15 so if we put both of these on to their maximum you can see that they're just staggered a little and then for the middle finger and the index finger we're going to use the exact same values but we're going to negate them so that the middle finger is going to come out a little bit and the index finger is going to come out even further so that they do this Fanning effect and then when we go to the opposite way these will reverse themselves so I'm going to do that for the middle and index for the fan and I'm gonna do also thus play for ring middle and index and for this play it's exactly the same thing our pinkie splayed out by find it by twenty degrees and then it displayed in by twenty degrees the ring finger is probably going to go you know maybe ten degrees out and end middle finger will go ten degrees out and in but in the opposite way of the ring finger and then the index will also go the same degrees as the pinkie but again opposite so I'll finish up those and then I'll come back and show you what I've got so I've completed the splay and fan for each of the fingers and see that here's the fan at negative 10 for each finger so pinky ring middle index and if I go to a positive ten they reverse themselves and then if I do splay to negative two ten they splay out and then if I go negative display in like that so next we want to do curl and curl is essentially the same thing we're going to take the control or rather the auto above the control and we're going to curl it in but we're also going to add the same amount of curl to each of these controls so we get this kind of a thing going on so we need to decide how much of a curl we want for each of these fingers so if we take this pinky let's say let's say 65 degrees for that guy see what 65 looks this guy yeah 65 and then yeah 65 so well pretty we'll remap for pinky curl we'll remap positive 10 to 65 and negative 10 won't be negative 65 because that would be that would be something like this which is not natural so we would actually want to map negative 10 to something more like maybe something like that negative 20 so let's see how we do that we take our auto control again and we're going to go into rotate X alt e' to bring up the expression editor and the expression editor is nice that you don't have to stay all on one line you don't have to to keep adding and adding and adding and adding what we can do is we can simply add and then go to a new line and and this is nice because we can separate all out all of the different things that we're going to do and it's much easier to read and much easier to to edit when we need to so we're going to do pinkie curl so we can just grab that whole fan expression and paste it in and change it to curl so now we're doing negative 10 to 10 remapping it to negative 30 to 30 but we said that we wanted it was negative 20 to 65 but this is probably not going to be what we want but I'll apply it and accept it anyway just so you can see what's happened so our value for curl is at 0 but we've introduced a little bit of curl here which is not what we want we want zero to be 0 so how do we fix this well what we can do is we can break apart this little expression so instead of mapping negative 10 to 10 and remapping it from negative 20 to 65 what we can do is we can take negative 10 to zero and we want to remap that from negative 20 to zero and then we can add that to a remap of 0 to 10 and 0 to 65 so instead of trying to do it all in one line which we've seen doesn't work we can split it up because we're taking just a portion of the full range of this parameter and remapping that and you can get some pretty complex things if you want in there but this is perfectly good for us so we want to keep our pinky fan but we're going get rid of that curl which doesn't work so we're gonna have a pinky fan influencing this node Plus this half of pinky curl and then plus the second half of pinky curl so let's see what that gives us if we apply it except you can see that pinky curl is at zero and our auto-rotate X is at zero so that's a good sign if we go pinky curl all the way up to ten we can see that we get sixty five and if we go down to negative ten you can see that we've got negative 20 so that's exactly what we wanted and now all we have to do is take the curl and apply it to our other two Otto nodes in rotate X so II replace the zero with that same expression apply and except now you can see that at negative 10 all three of them are are curled to negative 20 if I bring that back to zero its back to zero and now it curls all the way up to sixty five so I think that I meant I'm able to use that same amount negative twenty and 65 for all four fingers so I'm gonna apply that and then we'll move on with the next section I was almost 100% right that the negative 22 65 would be good for all of these fingers it's pretty good we could adjust them a little bit make some of them a little more some of them a little less but for our purposes here those values are fine so again we have 10 it scrolled in negative 10 it's curled out for all of these fingers so pretty good next we're going to do the Flex and the Flex is a little more involved but it's using the exact same expressions that we've used already so when we flex this finger from zero to ten what we want this finger to do to kind of well flex so this rotation is going to go sort of negative maybe about thirty the next segment of the finger is going to go thirty in the opposite direction and this guy going to go about thirty as well so the finger keeps it kind of keeps it same line from root to tip but it bends up in the middle so here on our and our knuckle I know we got here about thirty so we can go back in again to our left hand procs bone for auto in our X we can add can steal this save us some typing so now we want pinky flex and this one is it about was it negative 30 so zero to ten in our flex because our Flex parameter goes from zero to ten so flex zero to ten we map that from zero to negative 30 we can copy this apply except just put those back to zero so now if we look at our knuckle for pinky that flex brings it up like that so that's just what we want and then both of these Oh can't do that do them one at a time add the exact same expression pinkie flex zero to ten zero to positive 30 and copy that paste that in here so the plus zero to ten zero to thirty so now for our pinkie flex we go from zero to thirty so it just flexes up like that so those values may even be useful again for the other three fingers so as I did before I'll apply those values and come back now that we're finished with the curl splay fan and flex for each of these fingers we need to add in these expressions and because these ranges are exactly the same we can just reuse the same expressions that we used for the individual fingers but instead of using in this case left pinkie curl to drive these rotations we can use left hand curl and so I've already set that up on the pinkie I'll show you the effect of that so we have our left pinkie folder left pinkie curl if we go forward curls in curls out but now also the left-hand curl will drive those rotations the difference being that the hand curl will also drive the other fingers not just the pinkie and as I said that because the Rangers are the same and the values are the same all I had to do for each of our Auto nulls was I took this split pinkie curl fit expression going from negative 10 to 0 and 0 to negative 10 and I just added it on to the end and changed pinkie curl to hand curl so now this parameter is going to drive the rotation here by these amounts but also the hand can curl control will drive the same rotations by the same amounts so I just did the same thing to this auto control null and this one and that will be the same for the splay fan and the Flex so I'm going to apply all of that to all the fingers I'll come back and show you what I've done and then we'll quickly just finish up with the thumb which doesn't have all of the controls it just has thumb curl and thumb splay but it'll be set up exactly the same way so I've finished up the thumb so it has a thumb curl and a thumb splay but it operates on its own it's not influenced by any of the global hand controls and then for the metacarpals for these controls we did I did very much the same thing except in some cases I just took the direct channel values so of the hand curl and index curl and then I just multiplied them by a very very small number and so if you look here at this knuckle the hand curl it just you can see the moves all all of them down just a tiny bit and then the index curl moves that metacarpal down just a tiny bit and then the same with display it goes out and in just a little bit just to to keep the palm a little bit alive while these fingers are moving around so you can see they separate a little bit there and you'll have to play with these numbers quite a bit to suit your character and once you actually see this deforming you may want to increase these numbers or or decrease them but you can see that even though we go back to this expression even though we have a lot going on here it's really just the same thing over and over referencing different controls so once you understand basically one of these little guys then all of this makes sense and you can add and remove and and play around with these numbers all you want it's all very very simple they're all just being added together to result in a final whoops don't do that to result in a final rotation for each of these bones so don't be don't be intimidated when you see something like that because you you understand each of these individually and you can you can work out what's going on pretty quickly so we are done with our hand and that means that we're done with our arm so what I'm gonna do now is I'm gonna go through and clean up all of these nodes like all of our auto nodes have have these expressions in there rotates but all of these are unlocked so I'm gonna go through and and make sure that they're all locked make sure that the only control that's being displayed is the actual control itself and then when I come back we will just take a quick look and make sure that we haven't missed anything and then we'll mirror the arm and hand parameter pane to create a right arm a right hand and then when we have all these parameters mirrored to the right hand side we'll grab all of this stuff our entire arm and hand and mirror it over to the right hand side gone through and made sure that all of our nodes are displayed properly that they're named properly they all have an L underscore in their node name and I noticed in fact that these space switching nodes actually had L arm and so I changed them to have L underscore arm so that was these ones here so everything is good and we can now mirror the arm and the hand as well as our parameters and you could do this in either order you could mirror the nodes and then mirror the parameters or mirror the parameters and then we are the nodes I'm gonna mirror the parameters first so we have left arm within which we have left arm left hand all the fingers and if you look at a the type properties here you'll notice that there's a lot of parameters and duplicating all of these maybe we could just select them all and hit D and then rename them all but this would be well it would be horrible because there's lots of them so I wrote a little script and I've installed it with our others here in our rigging shell and it's just called mirror HDA parameters so if we edit the tool and have a look at what that has in it it's reasonably simple it's doing just a few things it's getting the selected node and finding its definition because it's an HD a and then it's making a copy of the parameter template group so that would be you know all of these all of these parameters and the way in which you edit parameters in an HD a is to make a copy of the templates and then you modify the templates and then you set them back into the definition so that's what we're doing here we're making a copy of the template group and then the user is asked through this read input function to name a folder so that could be master or spine or whatever in our case it's left arm and the default here is left arm but you could change that any time and then it asks for an old prefix and a new prefix so in our case and the most common case is left and right so given those things it goes through that copy of the pom template group and anywhere it said CL it'll change it to an R and then it inserts that change into the copy that it made of the parameter template group and then it sets the parameter template group for the definition to be that modified copy and then it saves the the DHD a so we can see how that works if we go up select our HDA click mirror HDA parameters so here it asks us to name a folder so we're gonna give it left arm we're gonna say okay it asks us for an original prefix that would be L asks us for a new prefix in this case R and it's done so you can see that it created another folder called right arm and recreated all of those controls even all the fingers so we didn't have to do any of this work and if you hover over any of these you'll see the little pop up and sure enough right our underscore hand control so that will be true for all of these things the one that it didn't do is this left arm because left is being spelt L EFT not just L but that's no problem we can just go and find it and we can just change it to our right and if that had been l underscore or l arm it would have changed it automatically but since we spelled it out for this folder it just ignored it so that's done now we have a left arm and a right arm and we don't have to recreate any of these controls so now we can go inside and mirror the actual notes themselves so in the viewport and a select mirror and then very importantly we want to change this new prefix so our current prefixes L we're going to do our underscore and it's going to remove the old name up to underscore mirror plane is y Z which is fine and then I'm going to select the nodes in the network not in the viewport because any nodes that are not displayed I won't be selecting so I'm gonna select these two large net boxes so the arm and all the hand nodes and in the viewport you can see that it's giving me a preview mirrored properly so then again in the viewport I'm gonna right-click and select accept selection or I can hit enter and Houdini is gonna work for a bit so at this moment I'm not going to touch anything because I want to see what's going on so the arm looked like it's mirrored properly but the hand is sitting over here so there might be something wrong and in the network it recreated the to net boxes and filled them so that's all good so what I can do is take this network box put it on the right hand side and this one just below it so the reason that this seems like it didn't work is that the location of this hand is being determined by a constraint and sometimes using the mirror tool which recreates all of those constraints so time's the offset on the constraint won't recoup so one way you can you can fix this even though technically it's not broken it's just appears to be broken one way you can do it is to save your hip file and then reopen the file and by reopening the file Houdini will cook all of these nodes properly and that will recoup the offset and it'll be fixed but we might try just going into our right hand bone offset as that constraint if we go inside and we might be able to update the offset so our controls went over so that's good and we can go back up then we go over here to our bones right hand bone root which also has a constraint dive inside and again update the offset and the bones popped over to the right hand side you'll notice that the recreated constraints network is still pointing or the node is still called left arm bone - but it is actually pointing to right arm bone - so you might see one or two of these little things that that didn't get renamed right arm bone - or something but just look for the target and you can see that that is correct so we can go up and now if we select one of our right hand side controls and test it we can see that the rig is working but it's translating on both sides so why is that the reason is that the mirror tool has done almost a complete job it's mirrored all of our nodes and all the relationships except it has not changed the the channel references so all of these nodes are still being driven by the left arm parameters so we need a way to change that and unfortunately the way to change that is to either build your left and left arm and hand and then mirror and then promote all of these individually like promote all the left hand side and build your your interface and then do the same again on the right hand side but we don't want to do that it just takes too much time so the better way is to do as we have done build the interface for the left arm in the left hand then mirror those interface controls mirror the actual nodes and now we'll use yet another a little script that I'll be providing I've call it up change and the reason I'm calling it up changes because he uses an H script expression called op change and op change is extremely powerful and so you have to be fairly careful in how you use it and it does pretty much what it says it will change something and what we're changing you can see in this little example here if I was in the text port I got a window text board and I say help op change I'll get a big help description so you can see there's lots of different parameters for the type of change that you want to make and very simply it searches and replaces text in parameter values and you can specify the type of of node and specify the node names their paths and then this - I option which is one that we'll be using allows you to to search for partial words so in our case we're doing partial word left underscore so look for left underscore and change it anytime you see it anywhere - right underscore and then we're also using the - n option - capital n and that will that means node with a full path so based on the selection we're going to prompt the user for an old prefix and then a new prefix and then for each of those nodes so we're gonna build for each node we build a path we do op change capital n plus that path so the path to the node and we're going to do a partial change and we're going to change the old prefix to the new prefix so let's see how that works let's just do it on one node to make sure so currently right arm bone goal control this guy here is being channel referenced to left arm iCade translate x y&z so we'll select that node will click op it will ask us for an old string and the default in this case is left underscore which is what we want the new string is write underscore which is what we want and there we go if you're on Windows you'll get a little console pop up there so it's gone and looked for any left underscore and it's changed it to write underscore and so now when we move it it moves on its own and if we pop up the parameters we can go to the right arm and there we go so that's exactly what we need to do and we needed to do it to all of these nodes so I can simply grab everything in these NAT boxes pop change left underscore right underscore I get a little console pop-up and now all of these should be just fine and we can have a look at our hand so we got right hand curl in the left hand isn't doing anything so that's it we have successfully mirrored our entire right arm our left arm and left hand to the right arm and turn those on make it look the same and you'll notice that the the default mirror color is for at least four green is this kind of purply color you can change that if you want I'm gonna leave it as it is so the next thing that I'm going to do I'll pause the video and come back and show you what I've done but I'm gonna go through and make sure to clean all these nodes you can notice that many of our controls still have unlocked parameters so I'm going to go through and lock what needs to be locked and make sure that nodes that don't need to be displayed are turned off and then after that what we're going to do is set up that automatic shoulder control so that when I raise up the the arm this shoulder will move a little bit with that I've gone through and made sure that all of the nodes in both the left arm the left hand right arm and right hand are displayed properly the ones that shouldn't be displayed have been turned off then I've gone through and selected all the controls and locked all but the promoted parameters using the lock all script that we have and now we can set up these little automatic animation controls and these are optional things sometimes animators prefer to do these things manually but sometimes they like to have a bit of automated control so the first one we're gonna set up is in the when the arm is in the ik' mode and we raise this wrist control we want the shoulder to just lift a little bit and we'll accomplish this with a look at constraint and what we'll do is we'll take the left shoulder bone auto which is above the left shoulder bone control and will create a look at constraint between this guy and this wrist control so that as this wrist control moves up the Otto node above the shoulder control will look at it and so it will rotate up as well so to do that I'll select don't have anything selected actually go to constraints select look at turn on keep position and then we'll be prompted to select an object to create look at constraints so we select our left shoulder bone auto and in the viewport right-click and accept and then it asks us for a look at object and that's going to be our left bone goal control just this guy here so accept that and then it's going to ask us for a look out look up object if any and in this case we don't have one so we can just hit enter in the viewport that'll drop us down into our left shoulder bone Auto constraint network you can see that it has this look at chop and it's the goal is where the target is the goal control so the important notes in in this case because we're going to modify these or they'll look at and the offset and the look at gives you some options for what the axis is and the up and all of that but in our case we want to look at this offset because we don't want 100% constraint if we go back up and we select our goal and we move it straight up you can see that the shoulder moves along with it perfectly and while that's you know that's kind of cool it's a bit too much for what we want we want just a much more subtle lift for that so we go back to the control or the shoulder bone auto constraint network and we select this offset we can use this blend parameter to blend that constraint all the way off if we want and in fact we'll be promoting this up to the parameters of our character here for the left arm but for now let's just put this said point two and see the difference whoops so now if we move our arms straight up and see that I'm just getting just a little bit of sort of sympathetic rotation in our shoulder when we move that up so that's that's great that's what we want and then of course moving in any of the other axes so if I move the hand forward a little bit you can see the shoulder kind of rolls forward and back so that's perfect and again in and out as well so let's just promote this right away so just here in the note path we can right click and say type properties there are the parameters of our soldier so in left arm or L unjust L arm inside left arm right underneath this left arm fki K blend going to add a separator and then underneath that let me go inside the constraint network grab this offset node just gonna take this blend that has this point to value already which is a pretty good default just going to select it drag it up right underneath that separator so now it's blend but we want that to be a little more descriptive so so we'll call this left arm Auto sholde blend let it apply and accept and what that was let's just double-check that there we go so now we can go up so that still works but in our parameters we have this left arm shoulder blend at a point too so we can blend that straight off and now the effect is gone or we can crank it all the way up to one and we get that exaggerated effect so you can play with the range and the default value there just using the go to the type properties for that parameter here you can change the range from right now it's at zero to one but you can change that here you can also change the default after the parameter has been created by going to the channels tab and just changing this point to two whatever is best for you all right the next auto control we want to create is between the the shoulder rotation and the rotation of the scapula so what we want to do is when this shoulder rotates up in Y you can see that the scapula is following because it's it's a child of the shoulder bone but we want the scapula to rotate back down in X just to fill this space a little bit better and the way that we'll do that is with a simple expression so we'll go to our shoulder control and we want its Y rotation so we can right click and select copy parameter on the Y we can go over to our scapula root auto and here we want the X so we'll just right click paste relative reference so now when we rotate you can see that we're getting this double transformation so select the auto again and put one negative one times that expression so now this will do the opposite so we take our shoulder control rotate in Y see that it's it's staying down there and if we rotate down you can see that it's rotating a little bit forward so again this current effect is probably too much we want maybe about half of that so what we can do is we have this negative one to create the reverse we could change that to 0.5 but I think I like to have the negative one to reverse the value and then multiply that by a separate number to be our blend and now when we rotate we get just a subtle little bit of movement in that shoulder or in the scapula and then we can still because we did that to the auto we can still select the control object and manipulate the scapula independently and then lastly we're going to drive the rotation of our clavicle with the rotation of the upper arm bone so that as our arm bone moves around our clavicle will move with it and we'll do that with a constraint so we'll come to our constraints we'll go to a blend we'll use a simple blend just rotation and keep positioned after so the node that we want to constraint is the left clavicle root auto right click and accept and the node that we want to drive that with is the left arm bone one so again it pops us down into this constraint network and in this case we have a simple blend that has the blend parameter so we can use this to blend it off but you can see that if we change this value the offset node needs to be updated so we can't promote this for our animators to to increase or decrease this effect without having to update the offset every time so that's inconvenient but what we can do is use the offset node and it's blend can parameterize constraint so we can see that if we back up if we select even if we're in Ike a move that arm bone goes up you can see that our clavicle is is reacting to the movement of this upper bone but it's reacting much too much so we'll go into that clavicle root auto into the constraint and the offset let's put this at 0.05 so just a tiny tiny little bit of influence so now if we move this up you can see the clavicle is is just barely moving and again you can change that to whatever you want and you can see also the shoulder is still moving and the shoulder is also driving the clavicle great so what I'm going to do is do the exact same thing on the right hand side and then I'm going to promote this blend for the clavicle offset and also for the scapula instead of this hard-coded point 5 I'm going to create a parameter to drive this so I'll do that for both sides and come back and show you what I've done alright I've gone through and recreated the constraint and expression for the right hand side so when we raise the right arm shoulder moves a little bit scapula moves a little bit with the movement of the shoulder and the clavicle also moves just slightly with the movement of the upper arm bone and then in the parameters I changed what we had before I had a little separator here but now that we have three parameters that we're not probably going to use very often I made if I go to the type properties I made a folder in both the left arm and right arm called left arm Otto and I made its type collapsible and what that will do is it will create this little you know a little plus and minus guy here so you can just collapse that and you don't have to see those controls anymore so it cleans up our interface a little bit and then if the animator wants to go in and make an adjustment then just open that up and can play around here and then for the scapulae we had this expression negative one times the shoulder bone control times and we had a hard-coded I think 0.5 I'm created a parameter here called SCAP blend the value of 0.5 and then I just I'll just reproduce what I had before so we had this value of 0.5 and an easy way to channel reference in an existing expression is to grab the parameter that you want to use and just drop it in any of these empty parameters and just say relative channel reference and now you can copy that delete it set that back to the value that it had before and paste so that's a quick way of doing that rather than typing it all out and possibly making a mistake so that I think is it for our left arm our left hand the automatic shoulder got all our parameters got space switching I can FK blending for both the left arm and the right arm so that'll be pretty much it next up in the next section we'll be building the legs and the feet hope to see you then
Info
Channel: Houdini
Views: 2,188
Rating: 4.875 out of 5
Keywords: houdini, houdini 16.5, 16.5, H16.5, character, characters, rig, rigging, rigs, character rig, HDA, procedural, 3D, SideFX
Id: CsYHn0RCDwk
Channel Id: undefined
Length: 107min 36sec (6456 seconds)
Published: Tue Feb 26 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.