Unreal Engine 5 (&4): Build a Control Rig from scratch. #UE5 #UnrealEngine #ControlRig

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
goodness did you see how long this video is going to be before we dig in let me explain what it is let me give you a big picture overview to know if you even want to watch it and to also show you why you really should watch it so let's say you got this character from the marketplace which i did and i'll show you later where he is but just as a concept i have this static character and i can't do a whole lot with him i can add some animation cycles maybe but i can't really what if i want to pose him what if i want to just have him standing as a prop somewhere in a static shot if you make a control rig you can bring in that same character with the control rig controls and then you can pose this character however you want right you got all your different controls some ik some bend controls you know maybe he's supposed to be looking over here this is really handy you can do a lot with this for posing that is one half of what we're going to look at getting this part prepped so that you can pose characters but even more importantly is when you have a character that was a skeletal mesh and you had a motion capture or some kind of clip applied to them just an animation cycle like this with the canned third person right so you got that what if you want to make any changes to this if you know how to use the fk it's doable right you can right click here go to edit with fk control but that's still a little inconvenient what you're going to learn today is how to make a full control rig that has a backwards solve so that you could put your controls on this character and totally make any change you want by just doing a right click bake to control rig this is the control rig you'll be making select that bake out the keys and then now you have full control over this character throughout that animation the animation has been baked onto the control rig and you can now change whatever you want to that animation cycle you can make tweaks you can make fixes you can do all sorts of cool stuff so that is the mini commercial of what you will learn watching this video so let's get right to it i wanted to use a character that everybody could grab and follow along with if they wanted to before they have their own character so run over to the marketplace and grab this adventure character and add it to your project so down in the full folder you'll find the different versions of the character so i just uh grabbed this one for starter so this is the character that we're going to add our control rig to so get started on that by right clicking on the character in content browser go to create and choose control rig this gives you a new control rig asset and double click and let's open that up and start building our control rig bring it back over here so i'm going to go ahead and dock it here so this isn't going to be as bad as you think it might be because we're going to go through it step by step i'm going to start off slow-ish uh so we get some of the basic concepts and then i'm gonna move it a little quicker the good thing about video is you can rewind if it's going a little too quick for you but i think it'll be fine so you start with this the forward solve and this is the first of two parts of what we're going to do in this tutorial first we're going to build out just a standard control set for this particular character then we're going to add a reverse solve for adding it to existing animations it'll all make sense when we're done from here let's go to this to have the rig hierarchy so we can see the rig of this character if you want go ahead and go to character bones all hierarchy so you can see all the bones here as well so let's again start simple so we understand the concept of what we're doing and then it'll be it'll click for you you'll be like ah this makes sense so our character of course already has a skeleton and skin weights and such so we're gonna let's just start at the root that's a good place to start this is the hierarchy of the character and we need to add our controls to the character so let's uh just right click on root go to new and say new control you're going to do this a lot so got a new control so this new control got added by default as a child of the root bone we'll deal with this in a minute but let's just leave it for the moment and let's look at this root control and see what we can do with it over here on the details with it selected you go to shape properties this is where you can choose what type of shape you want for example maybe i want the root control to be a thick circle and you see there's a thick circle but it's kind of small so you can come down here to the scale i'm going to lock it and i'll make it five maybe a little bigger eight and then if you want to change the color of it let's go with green for center stuff just for kicks we'll go uh red for right blue for left and then i'll use green for stuff in the center i suppose you can do whatever standard you like doesn't matter just to color at the moment uh this is our control right so the theory is you grab this control and you move it and that should move the character with it the control works now we've got to hook it up to the root object here so again this is like the beginning of where it's all going to click for you and be like oh this all totally makes sense so this is the root bone so drag the root bone into your little work area here and this is a bone we want its position set so you want to choose set bone all right so this is going to set the bone's position and the thing we want to set the bone position is based on the root control so drag the root control in here and in this we're going to get the control values so what are the values of the control and we're going to pipe that into setting the root bone so the way you do that just grab transform here into transform there so that is connecting the position now you're going to say okay let's do it and you're like hey it's still not working so the way this works is you need this to kick it all off so this execute needs to go to that execute now if you grab this control and slide it you'll see it starts moving but it's looking a little weird right so this comes back to the child parenting kind of thing so we we don't like this concept where what's happening is because the root is the root control is a child of the root as the root moves that pushes the root control as well so it's it's a kind of a weird recursive kind of thing so we don't want the root control to be a child of the root bone or part of the hierarchy at all we want it kind of separate so quick way to do that right click and choose unparent now it is not in the hierarchy of the skeleton it's independent but it is still linked to drive the bone so as i move that that moves that in a way it's as simple as that so we just got to do a few more of these to get our character up and running put in some ik rigs here and there and uh we'll have a working character so let's take this a little bit farther actually a lot a bit farther let's go to the pelvis bone and same thing we're going to right click on the pelvis bone we're going to add new now again we'll speed this up i'll show you some tricks in a bit but let's just keep it simple to get started so we're going to do a new control again you can do control n if you like hotkeys all right and again hide that it put it uh where did it sneak that little control come here you [Music] it's hiding because of the way it defaults to be a child there it is so it's hiding here in the uh it's under the pelvis control i know already i already showed why we don't want it part of the hierarchy so i'm just going to right click and unparent that i want to re-parent as a control i do want it actually i'll leave it off for a second and show you why we don't want to keep it like this uh but first let's set it up and then you'll see why we don't come over here here's our pelvis control again i'm gonna make this one green because it's centered and i'm gonna also make this a circle thick circle i like to just go ahead and hit this huge for a minute 10. so on the scale is 10 and we'll come over here and we're like oh that that doesn't look quite right does it so we can offset that so if we take a look at the character we need it to rotate this is our y axis we need to rotate it in y 90 degrees so come down here and type 90 there so now we're good there all right so we've got it's a little bigger than i need at the moment but i'll i'm okay fine let's just say 8 just seems a little extra extra chunky so now same idea we want to get the transform from the control so we say get this control and we want to go to the pelvis bone and have it set the bone connect that to that and we want this to execute next so we drag that to that let's test it select that drag it that's moving the character select this drag it that's not moving the character anymore because we have a hierarchy issue when the pelvis bone is driving the location of the pelvis it's after this action and because the pelvis is not parented to the root it's not following along so to fix that we need to keep this as a hierarchy so just left mouse click drag drop it on the root now all is well that moves with that alright so we're going to build more of a hierarchy here so now let's pick things up a little bit save you a little bit of time now that we understand the concept we can do things a little bit quicker for the rest of the central part of the character meaning up through the spine let's open up this and grab spine spine spine not clavicle we'll deal with that later neck and head all right so we grab all of these at the same time now here's where it gets cool and quick i'm going to right click i'm going to go to new i'm going to go not to new control because this will only do one at a time i'm going to go to add controls for selected but don't just click it here read the pop-up text it says alt click for additional settings so i'm going to alt click this is where you can choose where do you want these controls to go do you want it to stay as a hierarchy as you have selected which i do or if you said list it would just be a flat list at the bottom of all these meaning without any kind of parenting but i do i know i want parenting or if i said child it would put each of these controls as children of that exact bone which we already discussed why we don't want in this situation so i'm going to go back to hierarchy and hit ok so it built the little hierarchy here and we need to make sure that it is parented underneath pelvis so i'm going to click and drag this onto this to reset that and you can multi edit here so i'm going to select all these i'm going to come over here and make them green and say okay they're also all selected i'm gonna scale them all to let's say five and see what they look like and oh yeah they're still set as spheres he's kind of funny looking with a bunch of spheres there so let's go over here and uh let's change that to we'll just stick with the circle theme for now again you can choose whatever you want really i'll say thick circles and same issue where the default alignment is not in the orientation we want so i'm going to come here and change this to 90 again for all of them and they all line up they inherit the setting of the bone that they're that they were created from which is why they're not perfectly straight you can level these out later if you want i'm just going to leave them for now let's look at now how to get those controls into our interface here this is where speed counts i'm going to shift select all those drag them all in and say get the control value and then i'm going to grab spine spine spine neck head drag all those in and set all these bones all right so that goes with that one this goes with that one so now just doing a little bit of ranging here give this other one over here come here you all right so now chain all these together to keep the flow going okay so that evaluates but then we want this to actually connect so we need to push the transforms from the individual controls to each bone so these are in order of the hierarchy right so it's going up the spine to the neck and then to the head so now this whole central part of the character we have up and running alright so now he's doing his thing anytime you move a bone if you don't have to hit a whole bunch undo's right so like see if i totally mess this gap and move them all over the place once we add the ik for the feet his feet will stick if you totally tweak it you don't have to do a bunch of undos just say compile and then that'll put everything back to where you left it all right so that is our central part of our character for now i'm also going to show how uh you know like if we look at the neck here that neck is a little huge so i'm going to go ahead and scale that back down to say maybe um let's just put it at two and you might say well it's kind of like in his skin and i'd actually want to grab it a little bit higher than where it is so what you could do is that's the the red axis you want to go up so just come over here to location and just drag drag that or type the value just move it a little bit so notice that the pivot point is not moving just the selection point so you're not changing its functionality you're changing just basically where you grab it so you don't have to go down into his neck even though that's where the control lives and if you want from the side you can do the same thing so i want to push it forward and wide just a little bit again this has no bearing on the functionality if you don't want to do this stuff that's fine same with this head control it's kind of big so this is getting into the area of just making personal tweaks so i'm not going to do this stuff much longer for you because you can adjust yours as you want we just want to make sure it's functional so it is functional so we're going to move on let's now look at an arm so we have a shoulder here and here's a cool little node because you might think man this is going to be a long string of nodes if we got to put the whole character here there is a node called sequence so right click type seek for sequence and add a sequence node the sequence node is it's really just kind of like a split so pop it in here and then this lets you kind of be able to make some forks all right so that's string a now we're going to add a b then a c then a d just so we don't have to have one huge long line of of nodes so for this shoulder let's make a shoulder control a clavicle control we'll start with the left right click same thing new control and we want to unparent that so it's down here that would be part of the that would be most uh connected to spine three so you wanna drag on to spine three that's where it splits off to the neck and the clavicle it matches you know the hierarchy up here too right so we got just to show you what i'm looking at give me so from spine three we split off to the clavicle left right and the neck so that's what we're setting up down here as well so the clavicle we're starting to get down the left side and i said i'm gonna do blue for left so i'm gonna click here set it to blue okay as far as what kind of control you want here can be whatever you want some of the controls i've seen people usually use this little uh where's that quarter circle they use this quarter circle let's pump it up pretty big to see how where it is all right so it's kind of funky down there so that means we need to rotate it in uh x 90 or minus 90 let's type in the right field and see which way it goes all right so add a 90 there so it pops up here it's still a little big so i'm gonna set it back down to two too small three all right so when you grab that that matches the shoulder but we haven't set it up yet so same thing throw that in here get the control for that go up to your actual clavicle bone and set the control connect this to this this to this give it a quick test always good to do a little test make sure turn on rotate and yeah that's working i did undo there but again if you just hit compile it's also gonna set it back to where it started now we're gonna diverge and add a new layer of information we're not gonna set up an fk for the rest of the arm we're just gonna go straight for ik again this is kind of the simplest rig we can do we're not going to even do fingers in this tutorial i'll add another one later but we're pretending maybe this is just even mocap character that you need to have control rig 4 that may not even have finger so again this is this is just getting you in the game this is just so you can get familiar with all this so we have a a node called a basic ik and go ahead and plop that down here and there's three main bones it needs to know about so you see you got a little line up here let's go to our hand clavicle left then we have upper arm goes in this first field so you can just click this little arrow here to get that or you can do the drop down and go find it but if you already have it here it's easy enough to say lower arm click to add it there and the hand to add it here so this setting up your little ik chain now the effector is going to be the end of your your ik handle which we need to make still it's going to go on the wrist here so while the hand is already selected i'm going to right click go to new go to new control and for this shape i'm going to choose a box because i want kind of easy to see the rotation and the framing of it there so it's easy to grab i'm going to make it blue blue for left and uh for the moment i think the size is actually fine that's not too bad let's also unparent it right click on parent now in this case i don't really want it it's kind of its own free character in a way but it's not so free that it i don't want to move the character and leave it behind so i do want it parented underneath the root at least so if i move the character the ik moves with it so i'm going to throw that under the root but it's not being part of this part of the hierarchy so left hand control i'm going to pull that out and i'm going to get the value from the hand controller and we want to throw the transform into the effector and you can organize this however you need just pop it under there the other thing we're going to need is a pole vector for an ik what way is the elbow going to point so let's set that first or create it based on the elbow point so i grab the lower arm i'm going to make a control and we're going to add something new here as well so i'm going to make a new control and let's spin around whoops i'm going to move it right because i need to hit commu also i'm going to unpair that while i have it selected and but put it under the root as well i'm going to push it back away from the direction of the elbow now in this case i want this to stay here all the other joints so far have matched up with the controls that we made for them in this case i do want to keep an offset here so what i do in this case is i right click and i say set offset transform from current meaning current position i don't want it i don't want to adjust it using these values because when you push it away this way the control grabber thing here the shape moves but the origin stills or the pivot still stays on the joint so in this case that's why it's a little different let's choose let's use a thin pyramid so it doesn't get in too many people's line of vision it's also the default is pointing in a direction i'd like to rotate it so i want to rotate it so it points at the elbow so i'm going to set that at the z axis 90. all right so see how it points at the elbow's location so that sets up the pull vector let's rename it before we plug it in just because this has a weird name so i'm going to call it pv underscore arm underscore left control also going to make it blue stay with the theme drag it in and we're going to get the control like we do the slight difference here is we don't need all the transform data we just need to know where it is in space so we just need its translation so i'm going to grab the translation and plug it into poll vector and i'm going to switch the poll vector kind to be location now the part that gets a little tricky is the wrong word you just got to make sure uh watch i'll show you how to fix this thing that comes up in a second so as i connect this to make it be active the arm gets a little wacky right so how do we fix this what we need to do is here it says primary and secondary axis we need to set these uh pointers properly or these vector locations so the easiest way to do this is not trial and error which might work for you but there's a much easier way to do this read the directions here it says the major axis being aligned along the item and then also the second area is the minor axis being aligned toward the pole vector so what you need to do is i'm going to go back to the main menu i'm going to go back to my character here here's here's a handy tip right click browse to asset which we know is right here then right click skeleton find the skeleton so here's the skeleton and i'm going to double click to open up the skeleton okay now you'll see technically this character has been based on the ue4 mannequin but we're not going to lean on any of the naming conventions or try and copy paste stuff because i want to show how to make it from scratch so that's what we're doing here even though a lot of this would match up with the the control rig skeleton that already exists again let's do it from scratch so you understand how to do with any character you might have with the skeleton up let's look at the that lower arm bone and switch into move mode and let's take a look what we got here the axis going along the bone is the x-axis and the one pointing towards the pole vector is the opposite of the y-axis so we got x for the primary opposite y for the secondary so let's pop over here so primary this happens to already be at the right default so x in 1 is right that means it's going along the x axis secondary axis has a 1 for y but it's actually minus y because we saw it was pointing in the opposite direction i'm gonna say minus one and now the arm is just fine so you gotta do that each time you set up these iks it's easy to just pop open the skeleton look at the direction of your axes and then put those in here where it asks for it all right so now let's check that grab the hand move it around that's working it's bending fine grab the pull vector double check that now that's up and working that wasn't that bad now was it hit compile to set him back to where he was let's do the same thing now on the right side so now let's try a little trick i was having trouble with this actually working before but let's give it a go just to show in case it does happen to work this time so we have all these controls already set on the left side how we want so let's right click go to mirror and the x-axis is what the character is aligned on right from left to right so we want x we'll leave access to flip to z we want to have the names updated as well so anything that is uh underscore l underscore that matches our three you can see in the naming convention down there we want them to be replaced with underscore r underscore so that it automatically changes the names as it mirrors across the x-axis for so hit okay and then you'll say hey check it out it mirrored all my controls for me to the right side so let's control click all those let's change the color to be red for right they're already the right or the proper shapes so in theory we can just start setting up the same nodes now we could also just copy and paste all these and swap the names let's give that a go why not let's go for speed since you already know how to do it the long way we just did it a minute ago but before we hook it up let's change these first so clavicle l is going to be clavicle r uh let's see and then the control for it is going to be clavicle r control left hand is going to be right hand oh did i put yeah i put the right one you got it pay attention sometimes you might pick the bone versus the control um and maybe you wouldn't but i sometimes do everything else looks good there then we also need to change from upper arm left to upper arm let's say let's type a u there to get a head start upper arm right lower arm type of l for a quick search oh well l o lower arm right and hand hit a h hand right and don't forget these axes that we had set up before may not be the same on the other side let's go double check our skeleton pick our bone and they are not the same this time the align axis is minus x and the pole vector is actually correct as y of one correct is very subjective so it is y of one i guess there's no right answer so our x was -1 because it's pointing away from the wrist and our y-axis is one so in theory everything should be hooking up right now i did this another time and it didn't seem to work but we'll give it a go let's see if not we'll just build it all from scratch again connect this to this and let go and see if everything explodes or if it works fine and it exploded right wow boy did it explode all right fine fine uh then i'm not sure what where goes wacky all of this should be fine it was the making of these mirrored controls that gets a little weird uh something goes weird in there uh even whether it was the z or none just something goes weird when trying to mirror if somebody knows why it should work somebody knows why let's try it one more time let's say uh he's totally messed up i'm gonna do that again i'm gonna go to mirror gonna go to underscore l underscore underscore right underscore let's set this to none it's like it gets close but not quite close enough right something's a little wacky let's go through all three of them just to see you guys like why didn't you figure this out ahead of time because i'm fine building it the long way and all right let's do this two more times just for just for fun isn't this fun underscore l i'll say underscore r oops almost missed the l nope wasn't that one either all right we have one last chance if we mirror in x i mean why will it work or is it just a bug nope none of those work so the mirroring for whatever reason this is good for you to know doesn't want to work so we will build it again quickly um i'm going to disconnect it for a second so i can build my things without it being an issue so i'm going to go to my now notice that there are some ik controls in theory in this rig but i'm going to we're using this as even for a more simple rig you don't need these i'm going the hardest way possible or the most simple way possible so let's go to our right hand actually while we're here we're going to do clavicle we need one of these so let's make a new control for that we need a hand new control for that and off the lower arm remember our pull vector we need a control for that and we need to take them out of the hierarchy so select them right click unparent and they're all already red which is nice so we'll leave them red that's just the default color we do need to put them where they need to go in here so this needs to be under spine three just like the other one these two also need to be under the root control and i need to rename didn't i rename this one earlier oh well it copied the other one i thought i renamed that to be poll vector maybe i never hit enter i have to go back and watch my own video and figure out where i didn't save the name for that all right so yeah it's named properly here weird all right yeah i'll watch my own video and see why that name wasn't the same i learn as much making these videos as you guys do but i like to leave the mistakes in because if i can learn from it so can you and let's go back to this so go to our hand right control make that a box go to our pull vector for the right arm which we still need to offset properly i'll show you a little trick for that so i'm going to remember this is an actual move not a uh a little offset of the control we actually want to move this i also made it a pyramid and also rotated it now you'll notice it's kind of hard to see but i can see on my screen it's pointing the wrong way so i want to say -90 the other 90. and i'm going to jump into the back view for a minute so that i can get these aligned the same my snapping is on again so let me turn off snapping for position just like on the left side we need to right click and set position from current okay back to perspective view alright so those two are aligned and i got all my controls in there and i still need to modify the clavicle control and we used the quarter circle thick i think let's make it big so we can see its orientation and it's often a couple axes there isn't uh we need let's make that minus 90. and then we need which other axes there hard to see uh that's the blue which is z and let's drop it back down to what was the other one three two three three all right so now those are matched so now we have all the controls in the proper place remaking them from scratch because the mirror didn't work for us in any configuration i'm still not sure why but that's the way it goes for us uh the naming of my controls is fine here i think we might be able to just plug it in and run with it click and we're good to go so grab the wrist double check it so ik is working there pull vector is working good hit compile hit save all right let's now that organization is a little messy here but that's right all right we'll put a big comment here that's all the arm stuff we're not going to deal with fingers again we're going for the most simple rig so you can get an idea of how this all even gets put together first let's now look at the legs the legs aren't too crazy it's not much different than what we did for the arms actually so we have we're ignoring all the twist stuff as well because that also is you know something a little bonus pretending we don't even have that option simplest rig we could get so we know we're going to need controls for actually we only need a control for the foot so left foot while we're here again let's go for speed let's go for the right and the left foot we're also going to need a control for the pole vector so let's grab the calf and the calf which is similar to the idea of the elbow that's basically the knee and let's right click go to new add controls for selected hold alt and click and we want this to be a list we're just going to throw it all down at the bottom and then re parent where we need to so just say make it a list and okay come down here and all of these are going to be similar to the hand and the arm pull vector let's first rename this we'll call that pv [Music] leg or knee whatever you want to call it pv leg all of these we want to be parented under the root control this is going to go a lot quicker than you think because we've done this already let's see for the feet let's go ahead and make those also boxes they're a little small so i'm gonna [Music] 1.5 sure again you can choose whatever you want and let's see our pull vectors i'm going to pull that out right click set the offset transform from current same with the other pull vector i've got to push it the other way i'll change the colors in a minute and again go to back so i can line these up exactly right click don't forget this part otherwise it'll reset itself right click set offset back to perspective uh the oops come here you uh these two need to be pyramids as well so set those to pyramids their orientation's a little different each so i need to select them one at a time we need a little rotation in the z-axis again the other z-axis i mean the other the other way select this one that's also in the z that needs rotation try 90 yup 90 works for that one okay so we got our feet now all we need to do is set up the since we got the controls we just got to set up the iks for it so let's go ahead and put in a basic whoops hit tab type base sick to get a basic ik note here i'll try to forget change my colors so selecting the left side i'm going to make the left side blue and we need to fill in these nodes so the i don't have them selected so i'll show you the other way here we need a um oh wow there's a lot to choose from maybe i will just uh it's a little easier to just come up here and then isn't it to just say thigh use the thigh calf use the calf foot use the foot so that's the bones we're controlling we need the foot control get control and we need the pull vector for the left leg get control translation for the pole vector full transform for the effector we need to double check our axes here so open those up pop over to your mannequin or yeah your mannequin skeleton technically again which this is let's go find i could try to just click it yep make sure you sometimes you might hit that twist instead so make sure you have the calf selected alright so the pole vector is the y-axis the primary is minus x totally will depend on your character so you need to double check that every time and which side from one side to the other may not be the same so i think we're fine i said minus let's double check yep and yep so the knee is pointing along the y axis to the pole vector and that's the opposite of the x axis so we're good there and so in theory we're good to go let's go grab the next and give let's grab this move it up a little bit and drag from here down to that execute all right let's check it grab the foot it's working knee pull vector is working hit compile to set it back no well i'll restart and join us in a moment okay and we're back i had to rebuild most of this leg down here because i hadn't saved but you know that'll teach me to save more often should teach you as well to save more often one thing i slipped in here before which we didn't cover was this little thing here so if you want to redirect some of your flows right so i'm going to connect that down to there but i don't like the fact it's running behind that one if you double click one of your little noodles here it'll give you a little node that you can then whoops come here grab it and then you can move it out of the way which is handy for troubleshooting because then sometimes you can just alt click to get rid of a section and then plug it back in so it's pretty handy all right so now our ik is working right so there's our little foot double check the knee the knee's working as well all right so compile that i'm going to because the logic is the same i made i made the nodes by hand just like we saw before so i didn't mess with the mirror stuff again so i'm going to control c control v because we're doing the same thing for this leg again we're not doing the twist we're not doing the reverse foot roll rigging business which you can do if you know how and you want to but again we're just trying to go at the simplest setup in this case maybe i'll make some more videos go a little more detail into fingers and foot rolling those um i'll show you another way to how to kind of rip off the epic rig so you can see how to do it yourself too let's see we need to change foot left to foot right control we need to change pv to pv right and switch our our bones here i'm going to go do it this way again click and click and right foot button and then don't forget double check your axes here go to your skeleton click that leg x is pointing down y is pointing the opposite way of the pull vector so x pointing down which means it's one y is pointing the wrong or the opposite way so i need to make a minus one so plug that into there hit save learn from my lesson there let's do a check all right legs working leg is working save compile now let's take a minute we'll we'll say for the forward solve again forward solve is the basically we're just adding controls uh to the existing skeleton so that we can move them if we need to in on our character in our level or even animate technically right we can animate now with this rig in uh in the editor let's let's see i also missed i'm going to clean this up a little bit and select all those hit c that's my arms and shoulders these are my legs this is kind of the whole central part of the body there you can of course you can name them so you could say central or you can break it into you know body versus spine versus head and neck and left leg right leg you know whatever whatever you want to do so let's see so this kind of ends the basics of part one and i'll start part two in a second talking about the reverse solve because that's where the cool stuff comes well let's take a look at what this does for us if we go into our man and uh we gotta go find where did i put that in mesh full here is our control rig so here's the non control rig character and you can't off the top do much with him other than nothing right if i can drag my control rig in there now and now i have the ability to animate my character and you know set a key down here right go a few frames set a key all right so playing all we can now animate with the control rig and that's good but we need to show how to do the reverse solve or the backward solve so that you can have this functionality added to existing animation and that's where the really cool stuff happens and it's actually really quick to set up since we've done this part already so let's jump back to the control rig and let's set that up again it's not going to take nearly as long as the foundations here it's a lot of just plugging things in now at this point so the backward solve let's start on that hit tab and type backward solve the idea is so what what's the concept of what we're doing if you have a character that already has an animation on it but doesn't have a control rig this is used to put the control rig pieces where the character already is and have it take over it'll make sense when we're done a little bit better when you actually see it in action again let's slow down and start the beginning in we want to set the position so we're creating the control rig on top of a character so that would mean we have a root control that we need to set where is the root control so we're going to say set the root so it's kind of the opposite of what we did above and then how where we want the root control to go where the existing root is on the character that doesn't have a control rig on it so we need to get that so we're going to pull in the root now what's a little bit different on the root level actually let me jump back a second here is we need might have an offset to it so we're going to hit tab and we're going to add a this is a new node for us project to new parent again this has to do with as you can see it has to do with slight offsets we're going to use this for pull vectors as well this is kind of a case of just do this and uh all will be well so what we want to get here is the root control goes in this field here so i'm going to hit this button to select it so it's easy for me to choose it a little lazy trick there and then we want to go back up here to the root bone put that in here you're going to get the initial there and don't check initial here so if you leave everything with the defaults and the easiest way to describe this is just do this so follow that example and plug that into there so you're getting that the concept is very similar you're finding the value of where the root is and using that to set the root control but in case there's offsets involved then you need to use this particular node and then you can plug that into there this is only going to run when we add a control rig for a character that has animation that doesn't have a control rig yet you'll see all right so now we just need to do the same thing for all the other bones of the and controls let's say again of the central part of the character so we'll go for speed pelvis spine spine spine neck hit pull all those in and in this case we need these to be set so set all these and we want them to be set based on the current position of whoops not root all of their corresponding bones so where the bone is move the control to that position so i'm going to drag that in here and we're getting the bone position for each of those and we're using that bone position to set the controls position just doing a little clean up here it'll take you a minute to do the same so i'm not worried about this taking a second because you're doing the same thing right now oh did i miss a head neck which one did i miss head neck pelvis oh root i don't need this one all right so then just like the forward solve it's the same we're taking the existing bone position and using that to figure out where should the control of the control rig go when we're building a control rig onto the character so just hook all these up this is kind of nice and soothing on a rainy morning okay so this takes care of the central part of our character we now have when we run a reverse solve all of those bones are going to line up fine with the with the character okay so now let's look at an arm so how do we do the arm we have the clavicle bone which has its own control so i'm gonna do the same thing we did on the top and add a sequence node so we can split the execute path here that into there and this into there so we've got a the good thing is we all the controls are already made so this isn't crazy hard it's a lot of dragging and dropping now so we want the bone we want to get the bones position and use that to set the clavicles control for the left side set the control position okay same with the hand we have the hand left control we need that to be set and we're going to set that using the existing position of the [Music] left hand bone so we got to get the bones position plug that in there now the pole vector uses that same parent thing because there's an offset right there's a offset in the position between the bone so we've got to set that up slightly different but the idea is very similar so for the pull vector of the arm left which is this one we need that to be set set control and we're going to set that but after we do that project to new parent node so tab project to new parent and again this is just because there's potential offset well we know there's offset so this first field is going to be that same vector so let me browse to that and add it here so the old parent and new parent being the elbow bone or the lower arm bone so use that in both cases this is the initial this is the new position again it's just calculating offset and plug that in here this we're going to kind of do a big gamble and set everything up before we do any testing which i think is a safe gamble we'll see okay so that takes care of the left arm we don't have too much more to do here now and we could if we want while we're here dealing with arms we could string this together control c control v set up the right side clavicle right control just make sure you're picking controls and bones properly because it can get a little uh you know like wait which is which and which is which uh clavicle right just look at it before you change it hand left control to hand right control or talk to yourself like i'm talking right now hand left to hand right pull vector left to pull vector oh double check right same one here right arm make sure you pick arms not legs or things are going to look weird and then lower arm position i'll just do this real quick i say pick it then use it all right so hypothetically oh that was a close one don't forget to hook these up and it's probably a good idea save as we know software can crash every now and then all right now really quickly there's only a few things left we need to do to get the legs up and running oh get it legs running anyway same idea basically is what we're doing right here but for the legs we don't even have a clavicle to deal with so should go pretty quick i you know technically i guess i could copy and paste these that i have set up there but i like to drag and drop things so we need just to re-emphasize this again foot we need the foot control to be set by the actual foot's position left foot get the position of that bone to set the control same with the pole vector we need the pull vector of the leg of the left we need that set we need it set with the offset from pull vector position so again we need a project to new parent to get the offset we need i'm going to go get that control put that here left side is that bone so let's go find the calf bone here and here so that's all we need for the leg we do need to plug that in there though that's the left side let's go grab this and plug it in we're nearing the end assuming it all works should work all right that's the left side ctrl c ctrl v and this is going to be the right side let's see it's the let's do this way foot left control we need a foot right control there foot left you know what actually i'm just gonna do this way foot right pull vector left leg to pull vector right leg select it add it and the left calf to the right calf select it add it okay this concludes the setup for the backward solve so let's compile save and test to make sure this is working well so i'm going to make a new level sequence to test this out so up at the content level just as good habits go i'm going to create a new folder let's call it cinematics go in here right click animation level sequence shot one all right let's open that up let's add this guy to our level sequence and let's say we will give him uh he's got a couple cycles already built in because he you know uses that mannequin skeleton so he's got a uh run or say a walk all right so he's got a little walk lined up here and i hit play and he's doing his little walk stuff but let's say that's all fine or maybe it's mocap data that i want to tweak and you know mocap cannot be perfect sometimes you want to make little adjustments it's not that fun to do it as is i could make adjustments doing a right click edit with fk control rig which is nice this exists so you can make changes but it is so much handier to be able to do this bake to control rig since i made my reverse solve this is available so you can choose this it's going to say all this stuff usually just go with the defaults if you want an exact not reducing keys and if you need to reduce keys you can mess with your tolerance but i'm going to not reduce any keys so i'm going to get a baked out key on every frame which is fine because i want to have full adjustment so hit create and now my character is fully editable with the rig that i've built for it so let's say you know uh i don't know you can do whatever you want creatively now you do need to be a little familiar with animation and keyframes and all that for that but so what you have now is keys on every frame up here you have a control picker if you want to pick it from here or you can pick it from here alright so for again all of these are keyed so even though i move it on i'm going to turn on auto key first right so i'm gonna move his leg somewhere crazy just for that one frame right so now if i he goes a little he does a weird little pop there because i moved him there but this is a way easier way to make changes and modifications to your character now after he has potentially some built-in animation if you decide you don't want this you can select the control rig delete it and then this when you put added the control rig became inactive but it's still here if you want to turn it back on right click go to properties and set it back to active and then now he's back using his animation cycle that he had from the beginning but again it's so much nicer you have so much more flexibility now that you can just right click bake the control rig choose your control rig create it now this guy has has his own rig that you can animate i'll try and create another video eventually that has what to do with fingers what to do with twist but this will get you rolling also in the meantime before i get around to making that video you can most of this information of how i figure this out is just use the actual control rig and repurpose it so this control rig came from the sample file that's you know that it's epic's control rig demo file so it's in the marketplace so if you go to uh where is it here if you grab this file this one here control rig mannequin comes with the full control rig for the mannequin and just use that to kind of reverse engineer and figure out how all of this works this character does have twist it has the reverse foot and all those and even fingers in there open this in five and have it make a copy of it and then that works fine so highly recommended that recommend that if you want to push yourself a little bit farther than a just straight basic rig and now for something totally unrelated jump down to my description look for the link for ambidextrous studios and enjoy some stop motion done by my son dexter you'll really like it and i'll really appreciate it once you've had a little break get back on that control rig and see what you can do
Info
Channel: 3D Education with JC
Views: 67,588
Rating: undefined out of 5
Keywords:
Id: VXlBqRqFwc4
Channel Id: undefined
Length: 62min 55sec (3775 seconds)
Published: Sun May 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.