Unreal Engine 5 Tutorial | Rig a T-Rex with Control Rig

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome back to another video in this video i want to explain what is control rig why you should use it and of course we're going to go ahead and go through all the basics of control rig and primarily start from exporting our model from a 3d software such as blender and then taking that into unreal engine and then using control rig to create a animation rig that we can use to animate our t-rex so this t-rex might not look like the most beginner-friendly model to start with but i will explain every step in detail from start to finish so you don't need to worry about not knowing anything prior to watching this video all the project files will be included free however if you want to just download the completed project or the rex control rig that's already complete you can download it on my patreon or gumroad the link will be in the description below and big shout out to my patreons who support the channel i put all of my completed projects up on my patreon you can get some cool stuff on there and also support the channel so go ahead check that out link in the description below alright so without further ado let's go ahead and get right into the video so if you're watching this video and you're wondering why you should use control rig or why should learn it the main benefits of using control rig is the fact that you can animate inside of unreal engine and it's actually really easy to create a rig for your character or whatever you're making because i started out learning control rig a couple weeks ago just in a couple days i was able to create a rig for this t-rex and honestly i didn't have any sort of prior knowledge about rigging or any of that so it kind of just shows how easy or how simple it is to get started and to learn the control rig features now the main thing or the main benefit like i said is obviously animating an engine that means you don't have to go back and forth through blender or maya or whatever 3d program that you're using all the way back into unreal engine and then say you don't like that animation you have to go back and forth so it just makes the pipeline a lot faster you can also modify previous animations say you know if you get animation off the marketplace you can tweak that using control rig and i actually made a tutorial on that particular topic here on the channel but the second main benefit of using control rig is the fact that you can use it for cinematics so traditionally in whatever program that you're using to create films or whatnot say meyer blender if you're rendering out some sort of short film or short movie you know you have your timeline and you take all the controls you keyframe all that stuff you can do all the same sort of thing in arnold engine using sequencer and control rig you can keyframe all of the movements of your character and use control rig in a way that allows you to create cinematics or movies so really control rig is a powerful tool that you can use and once you learn the basics and get a handle of it it's really easy to get started and rig up any sort of model that you want in unreal engine 5. so yeah let's just go ahead and get started alright so the first thing that i want to show off here is this rex model that i actually downloaded off as sketch fab and it's a creative commons attribution license so you can use it as you wish but i'll leave a link to the artist in the description below and i'll also leave a link to the project files for this video in the description below but we're starting out here in blender first to kind of show you the step-by-step process of getting a 3d model into unreal engine 5. so first of all we have our rex mesh here and we also have all the bones i can go into pose mode here and show you that all the bones are rigged up now this model already came rigged with all the bones okay so the main thing that you want to note here in a blender is you want to have a root bone it can be named whatever i just named it root and then off of that you want to have some sort of hips bone there's actually if i move this a little bone right there in the center that is the hips control and both of those bones will come in handy for when we set up the ik for the legs so just note that in mind but other than that we can go ahead and export this model let's go ahead and select both the mesh and the rig it's not really necessary you don't have to select it but we can go to file export and dot fbx so unreal engine only uses the dot fbx file format for 3d models and the main settings that you want to pay attention here to is well you can check this selected objects if you have other objects in here and you only want to export the dyno not really necessary like i said but the main thing here is if you expand some of these other windows down here in the armature tab the main important thing to monitor is the primary bone access and the secondary bone axes so the primary bone you want to change this to x and the secondary bone you want to change this to negative y and the reason why you want to do that is in control rig it's actually a little bit picky especially when it comes to the ik which orientation your bones are facing and then you also want to uncheck the add leaf bones because that will add extra bones to your rig and you don't want any of that and if you don't want the animation you can uncheck the bake animation i don't really have any animation data on this character and we should be all good to export it i'm just going to export it to my desktop sk underscore rex and click export okay so i've created a blank project here and then i've just created a new folder in my content drawer called rex then um miscellaneous convert scene this just makes sure that the scale is all set up right and we can just go ahead and just click import okay no smoothing group information is found that's okay we can ignore that warning okay so we have our rex skeletal mesh here we also have a physics asset so that generates every time that you import a mesh and this is used mainly for you know if you're doing ragdoll for games then we have the actual skeleton so this shows all the bones and like i said i didn't rig this up myself so i didn't really name all these bones let's go ahead and set up the material for the textures okay go ahead and select all the textures i'll leave this link in the description below drag and drop them into the folder let's go ahead and open up the material here that it automatically created and then we can drag and drop the textures into our material delete that scalar parameter and we can hook up our base color texture then i believe the roughness the normal and the ambient occlusion actually i believe this is the specular so i think that looks about right go ahead and save that and we can go ahead and open up our rex here and everything looks good so now let's go ahead and talk about control rig and how you can go about making a rig for your model okay so there are two different ways to create a control rig in the content browser the first way is you can right click and click animation and scroll down till you see control rig and click control right click create and then you're going to go ahead and assign a skeleton uh we're not actually going to do it that way go ahead and delete this the faster way is to just right click on the sk rex 3d model and click create control rig and there we go we have our sk rex control rig go ahead and double click to open that up let's go ahead and dock this at the top so let's go ahead and explain the user interface of control rig you're going to find that there's a lot of similarities to things like the blueprint editor so the main thing that we have here is our viewport and the top left so we can pan around our character we have the wasd all those basic controls and we also have all of our basic viewport controls if you expand this larger we also have things like our snapping settings local and global transform gizmo that will come in handy later as well as camera speed so if you have a really small character you can turn down the camera speed that way you're not zooming around the scene okay so i'm gonna move this back like that in the middle here we have our control rig graph if you're familiar with blueprints it's pretty similar where you have you know your execution pin and these simple execution lines that connect various nodes together then over here on the right we have the details panel so if you select a particular node it will show various details on that the preview scene settings here basically if you have multiple meshes that share the same skeleton you can select a different preview mesh for that skeleton now down here compiler results basically this just shows you every time that you hit compile if you have any errors or anything like that then over here on the left we have these four different windows the main thing that you're going to be working in is in this rig hierarchy so this will show us all the different bones in our skeletal mesh then up here at the top we have our basic settings we have compile and save that's pretty much all the basics of the control rig editor so let's go ahead and get started rigging up this rex model now what we're going to create is we're going to add a basic root control that holds center mesh we're going to add some ik for the legs that way we can move the legs and animate say like a walking animation or something like that we're going to add some controls for our tail so we can move the tail around as well as the spine here and then we'll also add some controls to move the mouth open and close so we're not going to make the most complex rig but we're going to get all of the essential things that we're going to need to animate this t-rex now the main thing that you want to note here working in the rig hierarchy is that everything in here is based off of hierarchy so it's really important that you understand that one principle that means that whatever is below it is controlled by it so for example we have a root underneath our root is our hips and underneath that is a spine and so on so you want to keep that in mind that hierarchy is really important when working with control rig alright so first let's go ahead and start by adding our basic hierarchy for our controls in the rig hierarchy what we want to do is right click off of this route and you're going to see that we have a lot of different options here okay and the main thing we're going to focus on here is this new so off the new here we have three different things that we can add we can add a new bone a new control and then a new null so the main two things that we're going to be using is this control another control is basically a little gizmo that we can use to move around bones and to rotate and animate our model this new null should be called a control space i'm not sure why it's called null i think that's either a bug but let's just go ahead and create it so remember with the root selected you want to go ahead and click new and null now the null is really helpful because it actually allows our controls to be placed in other locations other than on the bones so it might not make sense at first but you will come to understand it more and more as you get more familiar with control rig now right now this null we want to go ahead right click and rename this to root control space and right now it is currently parented to this root bone so underneath the root we have the root control space so remember hierarchy is important because if we have this on say one of these tail bones or leg bones we're not going to be able to control the root bone because it is underneath it okay so now that we have our control space or our null we want to go ahead and create a control so you can see our control here is this tiny little sphere and we also have this movement gizmo so remember if we press w e or r we can toggle through our different movement tools but right now this control is super tiny and it's just a sphere object so we're going to go ahead and modify that mesh so you can see here in the details we have the control selected let's go ahead and rename the control so you can either right click and click rename here or in the details panel you can select the name and rename it let's just rename this to root control compile and save that so this will be our root control this will move the entire mesh around we're going to change this shape to a different object so down here in this shape you're going to expand this window and under the shape properties we can choose a different shape so you can see here we have arrow circle octagon let's go ahead and scale this up first so down here in this scale scale this up to five five five okay so we'll do 35 components say that now if you go ahead and rotate that 90 degrees you're going to see that whenever i hit compile it resets to its original orientation so we want to go ahead and rotate this control and we can go ahead and in the shape transform set the rotation to 90 degrees that way it is parallel to the ground and now if you were to move this control or do anything with it it's not going to do anything so if you hit compile it actually resets the control back to its original location but right now our root control isn't moving our entire rex model as it should um it's not doing anything that's because we haven't set up any sort of nodes or blueprint logic in here to hook up or to set the location of our mesh based on this control so let's go ahead and start doing that so if you click on this root control here you can drag it and drop it onto the graph and you can see here we have two different options we have we can get the control we can also set the control for this we want to go ahead and get it because we want to get the location of this control and we want to set it to our t-rex model so if we scroll up here to the top we want to set is we want to set the root bone so you'll notice you can select any of these bones and you can also drag and drop them onto the graph and then we have the two different options we can go ahead and get to the bone or we can set the bone in our case we want to set the bone and then let's go ahead and hook up the transform the orange transform pin into the set transform bone so basically what we're doing is we're getting the location rotation of our root control and setting that information to the transform of our root bone so now we can hook up the execution node to the transform bone compile and save that so now if we take this root control you see that we can move the mesh around now as you can see we're having some sort of issue where when we move the mesh around the controls are not snapped to the exact location and that issue has to do with our hierarchy here so if you scroll up here to the very top you can see we have this extra bone here this is actually a mistake i don't really need this extra skeletal bone usually you only have like one root bone but in this case we have the skeletal bone and if we expand unexpand this root you can see currently we have the root control space parented to the root what we want to do is right click and click on parent so right now the root control space is not parented to anything so now we can move our root control around and it isn't parented to our skeletal mesh and we're not getting that weird issue where when we move this control around it's not snapping to our rex model so now we have our very basic root control that allows us to move the entire mesh as a whole the next main basic control that we want to add is our hips control and this will allow us to take the rex model and do some squats because we'll set up the ik for the leg but right now we just want to set up the hips so if you scroll up here we have this hip bone so we can right click add a new control and then we can change the shape to a box thick and then we want to go ahead and scale this up a 20 by 20 by 20 might be good for now so we'll go ahead and compile and say that currently we have that parented to the hips bone what we want to do is we want to take this control and parent it to our root control because like i said the hierarchy is very important and if we were to move this hips control inside of this bones hierarchy it's not going to do what it should properly so what we can do is right click and again unparent this and now it's not parented to anything so we can go ahead and parent it here to our root control and we can go ahead and rename this to hips control so we have our root control and our hips control and we want to do the same exact thing here where we get the control and set the transform of our hips bone so select the control here go ahead and click get so we're getting the location of our hips control and then we'll scroll up here and select our bone hips and drag and drop it and click set and hook up the transform and the execution pin and hit compile and save so now we have our hips here and you can see we also can move the entire mesh just by selecting hips if you hit compile at any time it will reset it back to the default location but right now we don't have anything else set up and what we want is we want to set up a simple ik for our leg that way when we move the hips control t-rex can do a nice little squat and the leg will move procedurally with ik so we can go ahead and select all these nodes and move it around you can also select them and press c on the keyboard to add a comment and in this case we're just going to name this root and hips control okay we can move this up like so now let's go ahead and add our ik so right click in the graph and we're going to add and search for the basic ik node so type in basic ik you can see we have a lot more different options but we're going to choose here this basic ik and now this might look really intimidating with all these different plugs i know there's like probably over 20 different plugs here but we'll go and explain each and every single one of these the very first thing that wants us to plug in or to set are primarily these bone names so we want to figure out which bones that we want to set up here for the leg so we can set up an ik really helpful way that you can figure that out is obviously by selecting the bones but currently that only shows us the current selected bone so another way we could do that is by clicking this character and going to the bones and showing all hierarchy so this will show us all the bones in our 3d model and now we can select the individual bones and figure out which ones are which by looking at the names and whatnot so when setting up your basic ik you want to set item a item b and then the effector so item a is referring to the bone at the top of the ik chain so for example we have these two bones we want these two bones to bend back and forth so the f item a would be this top bone which will be right up leg 56 so go ahead and click on the name and search for that i'm just going to type in 56 you see it'll pop up and the item b will be the next bone in the chain which in this case will be right leg 57 so go ahead and search for 57 and set that like so and then the effector is typically the last bone in the chain which in this case is 58 search and set that like so so again we have a b and then the effector so now that we've set that up we also want to set up two more things here to actually control this ik and use this node so we assign the different bones here what we want to add is another one of these little controls right here right above the ankle that way we can bend the leg back and forth and that will plug you right into this effector so let's go ahead and add that control so select the right foot 58 which is our effector item and we're going to right click and add a new control and we can right click the name and rename this to right leg control and under the shape properties you want to change this to a circle thick we want to scale this up to five by five by five probably larger than that maybe 10 by 10 by 10. compile and save that you see we actually want to rotate this as well because right now it's orientated to this bone position but before we do that let's go ahead and actually unparent it because right now it's parented to this right leg and now you're probably wondering why do i always right click these bones and add a new control rather than just right clicking here in the root control and adding a new control and moving it to the bone location now the main reason why i've been adding the controls to the bones is because you get that precise location and also you have a lot harder time moving the controls to their appropriate locations if you add it to any other location so now let's right click and click on parent and what we want to do is parent the right leg control to the root control with the other root and we have the hips that is a child of the root we also have the right leg that is a child of the root as well okay now with our right leg control selected we can go ahead and rotate the shape so if you press e on the keyboard we get this little gizmo rotation gizmo and we can see this green y-axis if we rotate this about negative 80 degrees that should be good so if we go into our shape transform under the rotation we want to type in negative 80 and compile and save that so now we've set up our right leg control there and we can go ahead and plug in this control into our ik so go ahead and select the right leg control drag and drop it on the graph and click get control because we want to get the location of this control and plug it in for this effector so this is controlling the ik so right now we should be able to see the ik working in action if we go ahead and hook this execution pin up so let's go ahead and hook that up like so and now if we take this leg you can see we can move the ik around and it's starting to work let's go ahead and hide the bones and set this back to selected only so you can see we can start moving the ik control and right now we're getting some behavior that we don't want basically the leg is twisting inward but you can see that our ik is working whereas we can move the leg up and down you can see the thigh and the calf moving as well now one important thing to note is this gizmo currently it is it is in the local space and whenever you're modifying or moving around a control you actually want to move it primarily in the global space so we can set that by expanding this window if you take and drag this larger you can see here we can switch between the local and global space so currently we are in the local and you can see that by the cube we change this to the global so that allows us to have a gizmo snap to this grid rather than orientated to the orientation of the bone there's also a hotkey for this you can click control tilde on your keyboard we're going to leave this on global okay now let's go ahead and fix up what is doing with the knee basically what we want to add is we want to add another control that rotates the knee in the proper location because right now the basic ik node is trying to figure out where the knee should be rotated to we want to go ahead and add what's called a pull vector to determine where our knee should be rotated or orientated to so let's go ahead by adding that knee control so first of all i'm going to alt click to on hook that basic ik node then i'm going to go ahead and go to character mesh bones all hierarchy and what i want to do is select this right leg 57 i want to add a control here at this knee point now what we want to actually do is add a new null or a new control space and the reason why we want to do this is because whenever you're adding a control that is not snapped to a bones location that is out in the 3d space out here you want to add one of these nulls or these control spaces because it allows you to transform the control based on this control space rather than the space of the mesh now like i said that might not make a whole lot of sense right now but as you use control rig and experiment with it you're going to notice that you actually need to use these control spaces okay so we'll go ahead and right click and rename this to right knee space we also want to add a new control under that space and right click and rename this to right knee control so with the right knee space we want to right click and unparent that so it's down here and then we want to parent this to our root control compile and save that now with our right knee control selected we want to select the control or not the space we can go ahead and move this out here and we also want to scale up the control so on the scale let's set this at 10 by 10 by 10 okay that might be a little bit big let's actually set this to 6. and if we bring this out like so we could click compile you're going to see that it moves back to the original location and this is because we want to set the initial location to this current location that we have so we can do that by going over to the transform here and this is another important nuance to using control rig because whenever you hit can compile it will reset the location we want this control point to be here by default so to do that in the transform here under the current we want to select the location click copy and in initial we want to actually paste that transform compile and say that now this control point by default will be at this location so let's go ahead and plug in this control this knee control into our pole vector so select the right new control drag this and get the control and we want to plug this in for our pole vector as you can see this is a transform and the pole vector is of the type vector so if you expand the transform we can actually break the transformation we have the rotation translation and scale in our case we just want the translation and we can hook that up for our poll vector like so and now we can hook up our basic ik and let me go ahead and hide the bones so now we have our knee control so this will control the knee rotating back and forth you can see here we also have some weird twisting with the bones here and something is just not right so let's go ahead and tweak some of the ik settings so if we expand the primary access and the secondary axes this actually has to do with the settings that we set in blender so if you remember when we did the file export fbx we had primary bone axes in the secondary bone axes so we set this to x and negative y those were our settings so what we want to do is play around with these values and if you click and set the y to zero will actually go ahead and fix up that twisting issue with the bones now you might be wondering why don't we set this to negative one you can see here bone is twisted but basically what you want to do is you want to play with these primary and secondary axes values to fix up whatever issues you might have with your ik so now we should be able to move our dinosaur's leg up and down and you can see now our ik is working properly we can move the leg up and down we can also take this knee control and rotate to the knee now we can also test our hips control so if you take the hips control and move it up and down you can see that our t-rex leg and the leg ik is working properly and basically the t-rex can do some squats here we can also take the pole vector and move it back and forth so this controls the knee and if you of course hit compile or reset to the default location so we've set up our basic ik for our leg here now the other thing that we want to set up for this leg is we want to go ahead and set up another ik chain and what i mean by that is basically we can move this leg around but we can't move this foot okay so if we rotate this you can see these toes we have no control whatsoever so what we want to add is another control down here that will control the bend between this bone right here and this bone so basically another ik chain so i know that might sound a little bit complex but t-rex leg is actually one of the more complex animals that you could rig because it has basically two different ik chains so you have this ik chain up here and then another one from right here to right here okay typically you know in a human or any other animal you just have a thigh the knee the calf and then the foot would be right here but in the case with the t-rex you have a thigh calf and then this other part and then the foot right here so again it's a lot more complex but we'll just go ahead and set up another ik chain there that way we can get some more movement out of this rig okay another thing that we want to do is we want to organize our graph here so instead of hooking this basic ik up to this root and hips control let's go ahead and alt click this to unhook that and what you can do is off of the forward solve here we can drag over here and do a sequence and if you're familiar with blueprints sequence basically just gives you more execution nodes so we'll do a hook that up and then b so we'll run through the nodes and we'll basically do a b c and d and so we have our root and hips control then down here we want to add a comment so select this add a comment so be our right leg controls and we'll make this a little bit bigger because we're going to add a lot more logic here and then we're going to also add the left leg controls as well as our tail spine and mouth control okay so let's go ahead and finish up the left leg here so we're going to right click and add another basic ik we're going to go ahead and click on character bones all hierarchy so if you remember when we figured out which bones to set in our ik it's determined on where you want your ik chain to start so in our case we want it to start from this bone to this bone this is where the bending point is but for the item a we want it to be set to the bone above that chain so we have bone 57 then item b will be right foot 58 type in 58 here and then the effector will be this right ball okay so search for right ball 59 and again you can look at the way we set up the other basic ik with item a being the bone above the chain item b being the right leg and the effector being basically the right foot or the calf okay so we're doing the same thing here where we're setting the different bones for the chain now what we want to do is go ahead and add our effector as well as our pole vector which are basically our control and our knee control as well go ahead and select the effector bone which in this case is our right ball 59 i want to right click and add a control right click rename this to right foot control and we want to set the scale here to 10 by 10 by 10 and the shape will be a circle thick okay and it looks like we need to rotate this 90 degrees so in our shape transform under the rotation on the x-axis we want to rotate this 90 degrees this control is a little bit too small let's go ahead and scale it up 15 15 by 15. that's a little bit better um and we might want to scale this right leg control 1 up as well 15 15 by 15 you can play around with the control scales and adjust that to your liking so now we have that foot control we want to right click on parent that and then what we want to do is parent this to our right leg control because our right leg control when we move that we want to also move the right foot control with it okay so again this goes back to the point that the hierarchy matters because whatever is below it will get moved with it okay so we have our control here we can go ahead and drag our right foot control get the control and hook up the transform up for our effector here now what we want to do is add our pole vector or our knee control in this case we want it to be right around this location because the knee or the bending point in this case is right here so we want our pole vector or our knee control to be right around in this location so select this bone right here the bone 58 we want to add a new null or a new control space right click and rename this to right foot space and then right click and add a new control under that space and rename that to right foot poll okay for pole vector we can go ahead and right click the right foot space and unparent that and now we can parent this to our root and with the right foot pole selected we can go ahead and move this out here we want to scale this up to five by five by five and remember if we compile and save this it's going to reset the location of this control to its original location so we want to go over here to the transform to the current copy the current location go to the initial and right click and paste the location okay that way when we hit compile it doesn't reset our location now we can go ahead and select our right foot pull and get the control and expand the transform under the translation hook that up to the pole vector now we can hook up our basic ik hook that up like so and right away you can see that we're having some issues so let me go ahead and show you that so you can see that the bone is all twisted and it looks awful so again we want to go into our primary and secondary axes and go over to the y on the secondary and set that back to zero okay and you can see that looks all natural so now if we take this right foot control you can see that we have another ik chain right here so you can see we can move our right leg control and we can also move our right foot control now you might notice that this control is not moving whenever we move the foot and again that goes back to the fact of hierarchy so if you look here the right foot control is underneath the right leg control so a child cannot move the parent okay only the parent can move the child we also have our right foot pole vector so basically that moves that little rotation point and we can use that to angle that particular point to wherever we want and now we basically have a full leg control setup now what we want to do is we want to go ahead and do the same setup for our left leg so let's go ahead and start doing that start by adding the controls i'm going to move a little bit faster here so let's go ahead and show all hierarchy of our bones and select our left foot 47 right click add a new control go ahead and rename this this will be renamed left leg control set the shape to circle thick the scale will be 15 by 15 by 15 and our rotation will be about negative or 80 degrees on the y-axis compile save that we can right click on parent that and parent that to our root control okay and we also want to add our left knee control so select the left leg 47 right click add a new null or a new control space rename that to left knee space right click and add a new control under that and rename that to left knee control then right click the knee space on parent that and parent that to the root control compile and save that and then select our left knee control here i want to move this out like so and set the scale to 6 and go to the current location copy that and paste that to the initial location compile and save that so now let's go ahead and add another basic ik node and we'll go ahead and set up and hook up the controls so for the item a we want to set that to the top bone in the chain which is the left up leg 45 so search for 45 and plug that in then the first bone in the chain here 46 left leg 46 and the effector which is bone 47 compile and save that then we want to go ahead and plug in our effector and our poll vector so select your left leg control and drag and drop it and click get hook up the transform and then select your left knee control and get that expand the transform hook the translation up for the pole vector and then hook up the basic ik node compile and save that and you can see we're getting that twisting again so we'll go ahead and expand the primary secondary axis set the y to zero and that will reset that back go ahead and select this add a comment this will be a left leg controls go ahead and expand that because we're going to add the other second ik chain okay we can go ahead and test this out you can see that our ik is working properly for our left leg we can move the knee control and all that is working good let's go ahead and add our foot control so character bones all hierarchy select the left ball and add a new control set this to circle thick and for the scale we'll set it to the same scale as the other one which is 15 15 by 15 by 15 rotate this by 90 degrees on the x the name we can rename this to left foot control right click on parent that parent that to the right left leg control so it'll be parented under the left leg control okay then let's go ahead and add our pole vector so select the right foot 47 add a new null for the control space rename that to left foot space right click and add a new control and rename that to left foot pull okay unparent the space and pair that to the root then select the left pull control and set the scale to five by five by five and we can move it out to about like that go to the current location copy and paste that to the initial location compile and save that then we should be able to add in our basic ik for our item a we'll go ahead and select this left up like 47 or 46 and item b so the first bone in the chain is 47. so remember the bending point is right here so you have item a which is top bone actual bending bone right here 47 and then the effector which will be 48. okay and then we'll go ahead and get our controls so we'll go ahead and get our left knee control and then our left foot control hook up the left foot control transform to the effector and then for the left knee control expand the transform hook up the translation to the pole vector and hook up the basic ik then we want to go ahead and fix the twisting and that bone by just setting the secondary axis to zero and actually i got the wrong control here we want the left foot pull control i want to hook that up to our pole vector and then you want to set the secondary axis to zero there and hook this up and that looks like that's working fine so let's go ahead and test this out so it looks like that is working good take the right foot and move that up and down and take this pole vector move it back and forth okay so we've set up the right leg the left leg as well as the root and the hips and those are probably the most complicated ones out of all of them just setting up the ik so you can see here now we can move our rex up and down see the ik working properly and also move the route and that moves the entire rig as a whole and we have all of that set up so next up what we want to go ahead and do is set up our tail control so that we can rotate the entire tail as a whole with one control so let's go ahead and go into character show the bones here so for our tail i want to go ahead and select this bone right here bn tail 02 68 so right click and add a new null and rename this to tail control space right click the space and add a new control and we can rename this to tail control okay and let's go ahead and scale this up 10 by 10 by 10. i want to change this to a circle half circle thick okay it's still not showing so let's go ahead and scale this up to 30 by 30 by 30 and we want to rotate this 90 degrees so we'll go ahead and rotate it on x-axis 90 degrees okay so there's our tail control let's actually scale this down maybe 10 on the x and we can set this to like a blue color or something like that basically this control is going to control the entire tail the note that we're going to use here is called distribute rotation so this will allow us to add all these bones in here and distribute a rotation based on this single control so let's go ahead and add the items that we want so this is an array if you click the plus button it will add a new item in this case you can select the type and you can choose bone control or whatever in our case we want to use the bones because we want to specify each bone in the chain tail bones all these tailbones we want to add a array item per each bone so we have one two three four five six let's go ahead and add six of these so one two three four five six and the array starts at zero so technically it'll go all the way up to five but you have a total of six here okay and for the types we want to set them all to bones and then we want to set the bone names so we have tail 69 and then we have 70 71 72 73 74 compile and save that and now all we have to do is hook in and add our control so under the rotations here we want to click this plus button to add a rotation and if we get our tail control and drag and drop this and click get if you expand the transform here we have this rotation that we can use to plug in for the rotation of all these bones so let's go ahead and hook up the execution pin and i believe what's going on here is we want to set this global space to local space so we want to change this from global to local that way it will take the local transform of this control so now you can see just by selecting this one control here we can rotate it we can rotate the entire tail as a whole so we're going to rotate it back and forth we can also rotate it up and down and this is just super helpful because we can just by adding one control control a whole chain of bones now we're also going to add in individual bones or individual controls per each bone that way if you really wanted to still have that individual control over posing the tail in whatever position that you want you could still have that by adding those individual controls so we'll go ahead and add that as well so let's go ahead and add a comment here this will be our tail controls and we can go ahead and expand this a little bit larger because we're going to add in those tail controls okay now for the tail controls it's actually quite simple what we're doing is we're just adding a control per each bone and then we're setting the bone transform to that control so it's the same sort of principle that we're doing here that we did here at the top where we're getting the root control and setting it to the root bone we're basically doing the exact same thing for this entire chain of bones a real quick and easy way adding controls is to just select the tail select shift select all these bones here and right click and add a new new add controls for selected so this will batch add all these controls and actually accidentally added two so i'm just going to go ahead and delete all these but down here on the bottom you can see we've added all these controls per each bone so we have all the different controls here let's go ahead and shift select these and add a circle thick and scale this up to 10 by 10 and we want to believe rotate that 90 degrees on the y something like that so because we have all these selected we're doing them all at the same time and we might want to adjust the scale of say this control so we want to select that one individually and scale that up to 15 by 15 by 15 maybe a little bit higher maybe like 20 20. select this one this can be 18 by 18 by 18 and then this one maybe can be like 15 by 15 by 15. something like that you can also scale up the thickness of these circles so if i select all these i'm going to set the z value here on the scale to 60. you can see that adds just a little bit more thickness to the controls that way it's a little bit easier to see also uh give us a little bit of a color coding so i'm gonna do like an orange color here this one can be like a yellow this one down here can be sort of a greenish color just that way it's breaks up the color for all the different controls okay something like that and so now we have all of our different controls here the thing is we want to go ahead parent these to the right controls so right click so we want to select these and parent this to tail 69 okay so we have the tail 69 control parented to the tail bone 69 and then we want to take the 7 tail 70 control parent it to the tail 70 take the tail 71 and pair that to the 71 72 72 73 to 73 74 to 74. so basically what we're doing is we're parenting all the controls individually to each bone and again this is important because you want to remember the golden rule of control rig is to remember your hierarchy okay so now let's go ahead and set our bone locations to these controls so a neat way is you can shift select all these drag it on the graph and just click get and you'll automatically get all the controls that you want and before the bones you just shift select the bones drag and drop that and get all the bones okay so we can go ahead and select all these and actually want to set all the bones not get them so we have all these sets setters right here and then we can go ahead and plug in all of the controls so we can just put these all underneath bones then all you have to do is plug in the transforms hook up the execution pins for each of these controls and we'll go ahead and compile and save that and i might of dragged the wrong control here so 69 69 and 70 this needs to be set to 70 71 this needs to be set to 71 72 72 and 73 and 74 and 74. okay so make sure you hook up the right bones the right controls to the right bones okay so now we have these individual controls so if we select any of these controls we can rotate that particular bone and you can see it also rotates all of the controls that are below it so again remember the hierarchy because those controls are below it these controls are parented to these bones that means that they will move with the bones and everything below it will move accordingly okay we can also select our tail control and you can see that our controls still move with the bones even when we move our tail control so it's basically having the best of both worlds where you can modify the entire tail by using this one control or you can get more of a precise placement if you want to get a really precise pose of the tail and that's just simply using the get transform control and setting the transform of the bone the same exact thing that we did here for the hips and the root bones okay so that's basically all of our tail controls we're going to do sort of the exact same thing for the spine so we're going to add another one of these spine controls to add a easy one control for the spine as well as all these individual controls so that we can get a finer movement of our character's spine another thing that's been bugging me is these light controls i want to up the thickness here to say 50. and of course you guys can customize these to your liking if you don't like the circle shape you can change the shape to whatever you want and also you can change the colors and all that stuff all right so let's go ahead and work on the spine so we're going to do the same thing what we did here with the distribute rotation so very first thing is we're going to add our main control which is right here on spine one actually we can add it right here at the hips location let's right click and add first a new null and rename this to uh spine control space under that we want to add the new control and rename this to spine control and for the shape we can change this to circle thick and for the scale i'm just going to copy the same scale from our tail control so right click copy and right click paste and rotate this 90 degrees i believe we want actually the half circle thick okay and rotation 0 negative 90. there we go so we have a spine control there you could change a color now we have to go ahead and right click and distribute rotation add another one of these nodes we have one two three four five six different bones here so go ahead and add one two three four five six different array elements then we can go ahead and set these all to bones and for the first bone we're gonna do spine one underscore five spine to underscore six and then neck underscore seven like i said these are random bone names if you wanted to you could take this in a blender and rename all the bones but i'm just gonna leave it as it is okay one underscore eight and then neck two underscore nine and then head 10. okay and we add a rotation down here and we just have to select our spine control get the control expanded the transform and hook up the rotation to the rotation and then get our execution pin and plug that in okay you can see it's all messed up because we want to set the space back to local space very important and now we should be able to take the spine and rotate it up and down now one thing that you might notice is the grid snapping as well as the rotation you see it's rotating in this weird angle okay so we can disable the rotation snapping here and now we have a smoother grid snapping now if i change this to local we're kind of getting like this sort of bend in the head and either that can be due to the way that this rig is set up and i think that might be due to the fact that we added this spine control on the hips rather than the spine one so let's go ahead and right click the spine control and unparent that and let's re-parent it to the spine one let's go ahead and see if that fixes that nope okay so i'm not entirely sure why the transformation rotating in this non-uniform transformation so again it's like angled weird not entirely sure why it's doing that i guess you could rotate and adjust it by just using these rotation tools uh so there is our spine control we're going to add in the same sort of controls that we added for the tail so the individual bone controls so we can select our spine one underscore five to the head and right click new add controls for selected if we scroll down we have all the controls down here shift select all those and we want to scale this up to 10 by 10 by 10. actually maybe 15 by 15 by 15. set these to circle circle thick and rotate this 90 degrees on the z maybe on the y this individual control here we might want to rotate this maybe something like that so 90 and the x and 90 on the y reselect all these let's make them a little bit larger um 20 by 20 by 20. and we can up the thickness here to 50 and we can select the individual controls here and set the colors set this to orange yellow and green then blue darker blue and purple and you don't have to make all these controls per each individual bone like i said if you don't want to do that you don't have to it's totally up to you and we can tweak the size of this 18 by 18 just so it is a little bit more smaller okay so that should be fine for now we have all those controls down here we want to go ahead and parent the spine one all the way up to the spine one underscore five so now it is parented there and let's go ahead and collapse everything underneath now let's parent it there and we want to select spine 2 underscore 6 and parent that to spine 2 underscore six neck underscore seven control parent that to neck underscore seven neck one underscore eight parent to that you just wanna go in here and parent all these controls to their respective bones so that should be all good and set up and now we can shift select these controls and drag and click get and then we want to shift select the spine 1-5 all the way to 10 and set the bones okay i'm going to move this back like this and then drag all these controls and hook all these up so the spine one five two six next seven neck one eight neck two and nine and then the head and we're gonna start just hooking all the execution pins and transforms up here and compile and save that let's just go ahead and add a comment and this will be our spine controls so let me go ahead and unhide the bones here so we have our basic spine control that controls the entire spine chain so we can move it up you can see the controls are moving along with the bones and then we can take the individual controls and if we wanted to rotate the head to a certain rotation let's see we can rotate the head rotate the neck so you can take the individual controls and rotate them back and forth and i'm just going to do a little bit more tidying up here with the head control and scale this down a little bit and so we have the feet we have our tail and we have our spine last thing that we want to add is just a very simple uh jaw control that way we can close and open the mouth again all this will be is a simple control that we can use to rotate the jaw up and down so select jaw 11 here gonna add a new control and then go ahead and get the control and then get our jawbone and set that to the transform of that bone okay and we just need to click on our jaw control here and actually just rename this draw control in the shape we can change this to a circle and actually i just added a box here what not so you can you can really add whatever sort of controls that you want um whatever looks best i guess like i said i'm not like an expert rigging by any means but basically we have our full control setup so now what we could do is take our rex control rig and drop it into the level and it actually creates a sequencer here that we can use to animate our t-rex so you can take things and create a very basic walking animation or what you could do for fun is you can take this rex and move him over here and just add a really cool pose so we can take this foot and move it up like so move it over take the knee control and move that over move that over like so and take your tail control and rotate it whatever direction that you want then we can take the spine control and move the wrecks in like that and rotate the head and do something like that and there we go we can go ahead and hide control shapes so you can see we have a rex here pose and i know this has been quite a long video just showing you how to get this rex model set up with control rig set up all the controls and all that stuff so i think what i'm going to do is i'll make a follow-up video showing how we can go ahead and animate this and use what's called sequencer to to either create some sort of walk animation that we can use for games or we can go ahead and use sequencer to animate the rex for say a short film but yeah that's pretty much how you use control rig in regards to rigging up a 3d model or character hopefully this video helped you learn something about how to uh set up you know your ik for the legs as well as how you can go about setting up some basic controls for rotating some of the bones in your model as well as explaining sort of the hierarchy system of control rig and all the bits of information that that you might need to know such as using the control spaces and manipulating all of the little control gizmos and all that stuff but anyways let me know if you guys have any questions down in the comments down below or any suggestions or feedback or whatnot like i said if you want to download the full completed rex control rig i'll leave a link on my patreon or gumroad in the description below and you can support the channel there and it helps out a lot to keep tutorials and things like this free here on the channel anyways that's pretty much it for this video hope you guys enjoyed and i'll see you guys next one
Info
Channel: Smart Poly
Views: 87,688
Rating: undefined out of 5
Keywords: Unreal Engine 5, Unreal Engine 5 New Features, Unreal Engine 5 Next-Gen, Unreal Engine 5 Nanite, Unreal Engine 5 Lumen, UE5 Release, UE5 Next Gen, UE5, Unreal Engine 5 Open World GamesUnreal Engine 5, Unreal Engine 5 Control Rig, Unreal Engine Control Rig, Control Rig Tutorial, Unreal Engine 5 Control Rig Tutorial, UE5 Control Rig Tutorial
Id: C_vrn1n1Uq8
Channel Id: undefined
Length: 82min 35sec (4955 seconds)
Published: Fri Jun 17 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.