[Blender 2.8/2.9 to UE4] Custom Characters #1 Rigging & Setup

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Cool & up to date , I will probably wait until all parts are released to rewatch and practice on them.

👍︎︎ 3 👤︎︎ u/BULLSEYElITe 📅︎︎ May 11 2021 🗫︎ replies
Captions
hi welcome to cg dive and the bridging the gap series in the next couple of videos i'll show you the full basic workflow that you can follow if you want to export a custom character to unreal and use it as a playable character so we'll start with an unrigged character we'll rig it then make sure that the rig is game ready we'll create some basic animations then we'll export the character and the animations and finally we'll set it up as a playable character in unreal engine 4. just a reminder that bridging the gap is one of the main topics on cg dive for 2021 and i expect the information presented here to stay relevant at least in the next couple of years it is all about creating a solid character pipeline between blender and game engines we started with a series of core knowledge videos where i covered common misunderstandings when transitioning between blender and game engines we also covered what the game rig is how it is different from the usual blender rigs and how you can create a game ready rig inside blender that is really one of the core problems that many people struggle with so make sure you watch the game ready riggs video first links will be in the video description so let's start here and the first thing that we need to address is the scene setup and for the scene setup we'll do nothing we'll just use default blender settings and some of you may be thinking then why are you even mentioning that and that is because blender and unreal have been plagued by a very annoying problem in their world unit settings if you go to the world tab here and expand units these are the default settings in blender unit system is set to metric and unit scale is set to 1 and so internally one blender unit equals 1 meter one unit in unreal engine however is equal to one centimeter and that was creating a lot of problems in the past and uh many people were solving that by setting the unit scale here to 0.01 and that solved a lot of the problems however this discrepancy between the unit size and the problems that it created has been solved and so we can keep unit scale to the default setting of one and that is a really really good thing because changing the unit scale can create different issues inside blender i'm going to talk more about this unit scale issue and how it was solved when we talk about exporting to unreal for now just keep in mind that there is no problem in keeping the default unit settings in fact you should keep the default unit settings and if you meet somebody who still says that unit scale needs to be tweaked then let them know that this problem has been solved so that they don't have to struggle with this okay great now we can actually start and to start we're going to need a 3d model a character model of course we can model one ourselves but i want to avoid that first of all i want to keep this video general enough so that if you have an existing character which is quite likely you can still use this video as a guide and i want to keep this video focused on some of the more complicated problems like creating a game ready rig and exporting it correctly so personally i'm going to use a character from the miximo library when miximo gets mentioned people usually think of animations mixamo offers a large library of motion captured animations and those can be very useful however using these animations is a completely different topic it may involve retargeting and so on and i'm probably going to make a separate video about that in the future in this video we are just going to use one of the miximo 3d characters to give us something to work with that is also nice to look at and it's complex enough to create something close to a real world character scenario anyway let's go to the miximo website mixamo is free but if you don't have an adobe account you will have to sign up for it using the sign up button i already have an account and i'm just going to log in once i log in i'll be presented with the miximo animations and now i want to choose a character so i'm going to click on the characters tab and i'm going to go with the racer model so if you want to follow along with me uh just choose this character or you can choose any of the other ones but ideally choose some of the humanoid ones that are not too complex for example if you choose this one it has some cloth over the legs and over the shoulder i'm trying to keep the complexity of this project reasonable so if you choose one of these more complex characters and you have trouble rigging it then i may not be able to help you rigging cloth is also something that i want to cover on this channel in the future so i'm going to choose the eraser then choose download and download it in the tipples a quick word about the miximo license miximo is free and you can use these characters and animations for almost any purpose including commercial use but you cannot give away or resell the models and animations themselves so the models can be used in a game for example even a commercial game but i cannot place this model on my gum road and sell it or give it away to you you have to come specifically to the miximo website and download it yourself okay the miximo character will be downloaded to your hard drive is an fbx file i'm just going to place this file in my work folder and then i'm going to import it into blender by going to file import fbx and then i'll navigate to my folder and and import the fbx with the default settings and here we have the character and right away i'm going to save this file to my work folder i'm just going to call it eraser now this character has an armature which i'm not going to use directly but i'm going to leave it here for a little while while i prepare this model for rigging and so on first of all the default pose is not too bad the only thing i don't really like is how the feet are pointing a little bit to the side so i'm going to go to pause mode and enable x-ray and i'm going to select this foot bone and rotate it very slightly on the z-axis and same on the other side and that's it other than that this pose will be perfect for what i need some people prefer the arms to be in a pose but that can be up for debate t-pose will do nicely for our project so i'm going to leave it like this okay i'm going to delete this armature very soon but before i do i want to indicate where the points of articulations are placed they already exist so i may as well use them to save some time by points of articulation i mean positions like the position of the shoulder elbow neck and so on okay i think that will be enough and now i want to delete the armature if i just delete it the scale and orientation of this model will change let's undo and open the end panel item and this is because the armature itself has some unapplied rotation and scale what we can do here is first select the character press alt p and choose clear and keep transformation that will unparent the character from the armature and it will keep its size and orientation but it will also give it these unapplied rotation and scale so now i'm going to press ctrl a and choose all transforms now i can safely remove this armature okay notice something else that i need to do so i'm going to undo first of all in pause mode this armature already had some keyframes so the rotation of the feet was not saved so i need to rotate the feet again and select them and record a rotation keyframe and then if i simply remove this armature modifier the character will jump to another default position so instead of removing it i'm going to apply it now it is okay to delete this armature i'm just going to check the delta transforms really quickly and they seem fine this is another area that you should check when you use imported or downloaded models and this step may seem a little bit specific to using the miximo character but really whether you make your character yourself or you download it or you receive it from a client always make sure that it meets a couple of requirements first make sure that it is real world size in my case this human is 1.8 meters that's looks fine also when i switch to front orthographic view i can see that my character is facing front and all of its location rotation and scale are applied always check these things regardless of how the character got into your scene this character has existing vertex groups which we don't need i'm going to create a new armature and new vertex groups for this character so i'm just going to click this arrow here and delete all groups something else about this character is that it came with some textures the textures were packed into the fbx file and when we imported them they are now packed into the blend file blender has this feature of packing image files into the blend file if we go to the shading tab and zoom into the textures you'll see this icon here and that means that the texture is packed into the blend file to unpack them we can go to file external data unpack all into files and i'm going to choose write files to current directory it is important that the blend file is saved before you do this otherwise blender doesn't know what the current directory is after that you'll see that this icon changed it means that the files are no longer packed into the file and if i go to my work directory a new folder called textures will have appeared and here i have all of the textures for this character okay with that the scene preparation and character preparation are done now we can start building our rig and as i usually do i'm going to be using rigofy if you prefer to make your own rigs or use something else like auto rig pro that's fine of course however there will be subtle differences in the way you extract the game rig which is the next step but i covered the extraction of the game rig from many different angles in the core videos so please watch those if you need more information i'm going to start by creating my meta rig and i'm just going to use the basic human meta rig because this is the basic workflow and i want to keep the complexity reasonable i'm going to enable in front for the new armature and it's a little bit too big for my character so i'm just going to scale it down in object mode and as you should know you should never have an applied scale so right away i'm going to apply the scale by pressing ctrl a and scale okay next i'm going to start adjusting the positions of the bones i'll go to edit mode and actually here i have some bones that i don't need these pelvis bones and the breastbones i won't need because this is a game character and i'm trying to make it as light as possible so i'm going to delete these bones and then i'm going to start positioning my bones first i'm going to activate x mirror which is also under tool x axis mirror and now because i already indicated where my bones should go i'll have an easier time if you're doing this for another character you'll have to consider where the actual bones should be anatomically and position them accordingly now for the knee i always want a little bit of an angle that helps rigify figure out how to bend this knee when working with the meta rig always keep in mind the first neck bone it has to be connected to the end of the spine precisely otherwise you may get an error if you disconnect it you can always select the end of the spine press shift s cursor to select it and select the beginning of the next shift s selection to cursor and then whenever you want to move them just box select over this area and then move them as one unit and now the neck should be here there are few things that i don't like about the neck and head first of all i have two neck bones which i don't need in this case so if i just select the connection between the two neck bones and press control x that will just leave me with one neck bone if i go to pause mode select this bone go to the bone tab and then to rig type i can see that the super head rig type is still applied which is what i want so everything is fine and now another thing that i don't like is that the snake bone is called spine and also the head is called spine so i'm going to select the neck bone press f2 and name it nick and then select the head f2 and name it head then i'll go back to edit mode and adjust the position of the head and neck to something like this and finally i'm going to position the arms again i want to make sure that there is a little bit of a bend in the elbow as well the clavicle can be adjusted a little bit and i believe this will do nicely for the meta rig if i go to object mode or a pause mode i'll have the generate rig button i'm going to press it and it seems to have worked nicely i'm going to hide the meta rig now and i can also get rid of these annotations and now i'm going to try to parent the character to the generated rig with automatic weights and i'm going to get the dreaded bone heat waiting error so i'm going to undo here bone heat waiting error is very common people ask me about it almost daily on the cg dive channel and it can have several causes and i'm going to make a separate video in which i'll explain different ways in which you can solve this problem but in this case the problem is disconnected geometry the algorithm behind automatic weights works best when the whole character consists of connected geometry in the case of this character the body is one mesh and then the gloves and feet are separate mesh and the helmet consists of many different meshes a little bit of mesh segmentation is usually fine but when we get to something like the helmet it usually creates problems so here's what i'm going to do i'm going to select all of these helmet parts including the ones that i can see from below and i'm going to press p and separate this selection to a new mesh or to a new object then i'm going to select my main character okay while i'm tweaking the character there is something else that i want to do and it is on the body there is a separate geometry in the center and i tested it and that won't create a problem with the automatic weights but generally having this kind of mesh is not really a good practice for game characters and also while automatic weights will work the results won't be very good so i'm going to cut myself some slack and i'm simply going to delete these vertices here because if i didn't i'll have to spend a lot of time fixing weights which is not my goal in this video and also if you look at the character with textures it looks fine even without this geometry okay now i'm going to select the body of the character shift select the the rig and ctrl p with automatic weights and now automatic weights will work however the helmet is not connected to connect the helmet i'm just going to select it shift select the armature press ctrl p and choose with empty groups that will just parent the helmet to the rig and it will create vertex groups for it now i'm going to select the helmet go to edit mode select everything and then go to the vertex groups here and look for head and just select the head vertex group and click assign and that way the helmet will be controlled 100 percent by the head bone which is exactly what we want the helmet is a solid mesh so we don't want it to deform in any way now if i move the head you'll see that the helmet moves with it and now i'll simply select the helmet shift select the body and press ctrl j and join them into one mesh okay so now we have our main rig and as you probably know if you've seen the previous videos this will be our control rig so i'm going to name it control rig the next step is creating the game rig i've already explained this in the core videos so i'm going to go a little bit faster here i'm going to press shift d and duplicate the control armature and this will become my game rig i could name it game rig but a common convention for unreal which we'll be using this time is to name the root of your armature as root when exporting to unreal the actual pivot point of the armature object becomes the root of the armature and the object name becomes the name of the root bone i'm going to explain this in more detail in the export video for wikify rigs i want to expand the data of the duplicated rig right click on animation and choose clear animation data if i switch this window to drivers you'll see that the whole rig has a bunch of drivers and i want to get rid of them this is something that i didn't notice and didn't cover in my previous videos it's not strictly necessary but i want to clean up this rig as much as possible so i'll just just press a over here and then x and delete everything on the armature tab there is a custom property for the riggify rig i'm going to delete it then i'm going to go to edit mode and then press slash for local mode and i want to select all layers except for layer 29 and then simply select everything and delete little bones there are these four bones that weren't deleted those are special bones i explained that in the previous video i need to make them selectable select them and delete them and now i'm just left with the deformation bones which i need for my game armature i'm going to go to pause mode and all of these bones have constraints i'm going to select all of them press ctrl alt and c and that will clear all constraints also under item if i activate one bone you'll see that these location rotation scale are locked i want to unlock them so i'm going to press a to select all other bones and then while holding alt i'm going to unlock all of these transform values okay next i want to fix the hierarchy of this rig and that won't be difficult to do the arms are already okay i just need to parent the arm to the clavicle with keep offset clavicle to the end of the spine and leg to the beginning of the spine and i should have activated x-axis mirror but anyway now i'm going to do the same for the other side now the hierarchy should be fine i also want to remove the bendy bones from all of my game bones i just need to make one of the bones active select all of the other ones then go to the pawn tab bendy bones make sure that the bendy bone segments are set to one and then right click and copy to select it i'm going to want to set up this game armature so that it supports squash and stretch through the offset technique i discussed this in this quotient stretch video so please watch that what i need to do is go to edit mode select all bones press alt p and choose disconnect bone not clear parent but disconnect bone and that will keep the hierarchy but also enable me to disconnect these bones and next i need to actually constrain the game bones to the control bones i'm going to use my script again and i actually improved my script so that it's more automatic or i should say my friends improved the script huge thanks to mario musov and wayne dixon they both send me improved version of the script so now all i need to do is copy my script and paste it you can type the same script lines if you want i just need to change the name of the rig in this line to the actual name of the control rate which is control trick and now if i select all bones and run the script all of them will be constrained with copy location and copy rotation to the respective bones in the control rig if any of this doesn't make sense please watch the core videos okay now i'm going to unparent the character let's hide the control rig shift select the game rig press ctrl p and choose with empty groups now my character is parented to the game rig which is controlled by the control rig and so the control rig moves everything with it that's all for this part with this uh scene and our character are ready for animation and then for export in the next video i'll show you how to prepare some custom animations for this character you
Info
Channel: CGDive
Views: 11,172
Rating: undefined out of 5
Keywords:
Id: O-5MXyKyyhc
Channel Id: undefined
Length: 24min 5sec (1445 seconds)
Published: Mon May 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.