[Addon] Blender to UE4 : Rig Any character wth the Mannequin skeleton

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'll introduce you to our new tool that can make any blender character compatible with the unreal for mannequin and in the near future i hope to update it and make it compatible with the unreal 5 humanoid character as well i'm really happy with the workflow you just click a button and load this rig setup you align it to your character using intuitive controls then you bind and export it to unreal and it will be compatible with the mannequin skeleton even if the character has different proportions there are some things to keep in mind so please watch the whole video i'll show you the basic workflow and also advanced techniques such as attaching additional bones to the main skeleton if you want to use this tool it is part of a game rig tools add-on you can download it from gumroad the pricing is pay what you can it's free if you can't afford it but otherwise we ask you to pay a fair price once you get to the downloads you should see game rig tools unreal module the core module contains the original game rig tools functionality for creating game ready rigs you can watch my previous videos about that these modules do not depend on each other for example you can install only the unreal module although the core tools contain a lot of useful features so download this zip file by the way the developer behind game rig tools is blend boy he has a lot of useful ringing add-ons on the blender market like bonera or frame ranger so check them out and let's install the add-on here i am in blender 3.1 and the add-on also works with blender 3 and it kind of works in blender 2.93 i'll explain in a second so to install the add-on go to edit preferences add-ons click on install find the zip file that you downloaded and activate the arrow and it will appear in the 3d view site panel game rig tools you can also change the name of the tab where it appears so here i have the unreal module above it i have the game rig tools core functionality because i have installed it if i disable it i'll only have the unreal module and it will still work but i want to enable all of my game rig tools to start using the mannequin workflow you just press initiate mannequin and that will load this rig setup and i'm going to show actual usage examples in a second just a quick note about blender 2.93 i can initiate the mannequin and it will work however the widgets will seem to be missing i may try to fix this in the future but for now if you go to armature tab viewport display and disable shapes you'll see these colorful bones and you'll be able to use them to manipulate the skeleton just the same as with the widgets okay now i'm going to show you a little behind the scenes how this setup works if you don't care you can skip this part and just learn how to use the setup so in unreal 4 if you create a third person game template it comes with the default mannequin and if you right click on the skeletal mesh you can go to asset actions export and export on fbx and if you import that into blender you'll see the mannequin meshes which you can delete and then you'll be left with an armature that looks something like this so this is the mannequin's armature the reason these bones point all over the place is that blender and unreal handle bones a little bit differently especially when it comes to the bone orientations but these are the bones of the mannequin so if you could bind your character to these bones then it will be compatible with the mannequin the problem is that this is just difficult to work with it's hard to say which bone does what and it would be hard to skin the character to these bones if you import your character with a special fbx settings automatic bone orientations then your skeleton will look something like this and this makes much more sense um you can most likely work with this and skin your character to these bones however if you used this skeleton and export it back to unreal and try to play mannequin animations with it you would get something like this ouch so my solution is to constrain the actual unreal bones to these more intuitive bones and i even created a tweak armature which allows me to really quickly change the proportions or the orientation of any of these bones in this way i can easily match pretty much any humanoid character with the skeleton and make it compatible with the unreal for mannequin now let's look at a practical example i have this character mesh here you may recognize it as the zombie from miximo but it isn't rigged it is just a mesh and that is what you want in general just a simple character mesh no bones no vertex groups and then you can go to game break tools game break tools unreal module initiate mannequin and that will put you right in tweak mode so here are the main controls i have one root control which can move or scale the character there is the spine control head and neck control here is a widget that moves the clavicle and arm simultaneously this one moves only the arm and this one only the clavicle this one rotates the arm in this one the hand and all of these controls can be moved rotated or scaled freely then on the side you'll see a little ui menu so these were the main body parts there are also individual joints that you can tweak so these you can simply move around any way you like and then we have special controls for the fingers so these controls move the individual fingers and then we also have finger tweaks using which you can move the knuckles and by the way if i move one side of the rig the other will move automatically that is simply because i have x symmetry enabled you can enable and disable it from here or from tool x axis mirror okay so if you disable it you'll be able to move each side individually in this way you can align the bones to a character that is not symmetrical and that should work within reason so my usual workflow is to start with the body parts and first scale the root to match the overall size of the character so the spine looks more or less fine i'm going to scale it up a little bit the legs i can look from front view and let's enable x symmetry i'll rotate the legs to match the pose of the character then i want to move the arms a little bit from the top view a little bit forward and in the front view i'm going to create this t-pose so the default pose of the mannequin seems to be a naples and this character is in tepos and i tested this and it doesn't seem to be a problem so you can have a character in pretty much any pose but either t pose or a poles is recommended okay so from the top view i may want to rotate this arm a little bit and scale it up and then let's see the neck naked head i'm going to move them forward a little bit and scale them down and from the side view the spine doesn't look quite right so i'm going to rotate this widget a little bit and scale it down a little bit something like this now the alignment is starting to look good so next i can fine tune it using the joint tweaks the joint tweaks are these spheres that i can just drop and move freely so from the side view the ankle seems to be around here toes the knee can be a little bit higher the clavicle and upper arm can be moved separately but if you want to move them together just select both tweaks from this menu you can hide any of the skeletons so the unreal one usually gets in the way so i'm going to hide it for now so i like the alignment of the big parts next i'm going to focus on the fingers i'm going to rotate all of these fingers into place scale them down a little bit i'm just moving and scaling them until they match the fingers that i see a technique that i like is to switch the snapping to volume and now i can either enable the snapping option or keep it disabled grab the widget and hold ctrl and that will snap it to the volume of the mesh underneath my cursor okay this is looking good next i could use the finger tweaks for really fine alignment again i find using volume snapping very useful just grab a tweak move it and hold ctrl and that's the process of aligning the bones once you're happy with the bone placement you can press apply rig and that finalizes your deform rig in your unreal rig if you want to keep tweaking you can press the tweak button and the bones will become constrained again and before moving to the next step you should be fairly happy with your bone placement and press apply rig okay now i can hide the tweak amateur and i'll be working with the deform and unreal armature and my goal will be to bind the character to the unreal armature so i'll enable x-ray and as i said earlier binding directly to the unreal armature can be unintuitive and that is why we have the deformed armature so now if i just select the character shift select the deform armature and press control p and parent with automatic weights i'll be able to move this guy with the skeleton and the next step will be to switch the binding armature to the unreal one but before you do this make sure that the character is skinned correctly because this armature will be easier to work with for skinning so for example the automatic weights didn't quite catch the teeth i do recommend the voxel heat diffuse skinning add-on it produces better results generally but we can fix this i'll select the deform armature shift select the character go to weight paint mode and then control select this headphone go to tool and i can disable front faces and set falloff to project it this is my workflow for painting through the mesh i have another video about that and then symmetry enable x symmetry and options enable auto normalize and now from the side view i can just paint the whole head and it will move properly with the head bone i don't want to make this into a weight painting video i'll assume that everything else is correct go to object mode and now to bind this character mesh to the actual mannequin bones i'm going to select the character alt p and clear the parent and that will remove the parenting and also remove the armature modifier if it didn't manually remove it but it will keep the weights and now with the character selected i'm going to shift select the root armature ctrl p and choose a maturity form so that will bind the mesh to the root armature and since both rigs have bones with the exact same names this process is seamless so now if i select this root armature which is the unreal armature and go to pause mode and move the bones they'll be deforming the character and that's it this character is now skinned correctly to the mannequin skeleton and next we can move to export i'm going to show you two ways uh manual fbx and using send to unreal there are slight differences so make sure to check them out um before we do i'm going to start unreal here is the epic games launcher i'm going to start the latest version of unreal 4 and as i said i'm going to cover unreal 5 soon so look forward to that i'm going to create a new games project choose third person because it contains the mannequin i'm going to include starter content name my project and create it okay here is the default third person character project i can press play and play with the mannequin so let's see how we can change the character here so first i'm going to cover the manual fbx export settings for manual fbx i want to select the root armature and the character mesh or meshes that i want to export go to file export fbx name my character zombie and then for the fbx settings i want the selected objects only transform to default on the geometry you could switch smoothing to face on the armature disable add leaf bones and disable bake animation we don't have any animations if you're going to do this often you can create a new preset and export so then in unreal under content i'm going to create a new folder my stuff and inside another folder zombie and i'm going to drag and drop the zombie fbx into this folder for the fbx import settings keep everything to default except for the skeleton under skeleton click and choose the ue4 mannequin and then import and that imported the zombie even the materials look okay often the materials may be messed up and you may have to tweak them manually so to change the character all you need to do is go to content i'm going to show my folders and so i'm going to go to third person bp blueprints open the character blueprint and look it in here and then select mesh and under skeletal mesh click here and choose the zombie compile and play the game and the zombie will be the playable character so those are the basics and before i move on to the send to unreal workflow really quickly back in blender if i select the unreal armature and go under item you will notice that the scale is set to 0.01 and that is not a mistake it is on purpose it is the same for the deform armature and the same for the tweak one and again this is on purpose and if you are using manual fbx export please keep these settings and that will allow the seamless workflow that i just showed you okay now let's look at the send to unreal workflow sent to unreal is an add-on from epic games that allows you to send content from blender to unreal and that is what i personally use and i do recommend it because it solves some of our problems the add-on can be a little bit difficult to obtain you have to register an epic account in a github account and link them and explained that in a previous video so please watch that if you need help but i already have the add-on and i'm going to install it quickly activated and it automatically created this export folder so that is something that i changed since the last time i covered the add-on we used to have at least four different collections meant for unreal export now the add-on has become smarter and it only needs one collection and so what i need to do is select the zombie mesh and the unreal armature press m and move them in the export collection and what you need to do in unreal is to enable some plugins so go to plugins and here you want to enable the python editor script plugin and also enable editor scripting utilities and you'll need to restart unreal i'm going to save the files okay then i can close the plugins window and go to project settings and look for remote execution and make sure that remote execution is enabled okay now in blender with the root and zombie in the export collection i'm going to go to pipeline export send to unreal you may get a window like this i'll press allow access so it doesn't work right away i found that if i go to project settings remote execution and just uncheck and check back the remote execution setting then it's going to work so now i can go to a pipeline export send to unreal and it's going to complain that the root has an applied scale so if you're going to use cento unreal you're going to have to apply the scale it is nothing complicated just select the root armature press ctrl a and apply scale and then i can export and center unreal now if i go to unreal there will be a new folder untitled category untitled asset and i'll have the zombie in there so i'm going to tweak this material just a little bit so that we can distinguish between the cento and real zombie and the manual fbx one so now i have this bloody zombie and now if i go to the blueprints and try to assign this new zombie as the skeletal mesh you may not find the character in the list or in this case it is here and i'm going to select it and notice how the anim class was changed to none so if i go to the game you'll see that the character was assigned but it doesn't play any animations and that is because sent to unreal uses the default import settings which creates a whole new skeleton for the new character this can be fixed easily in two ways the first one just go to your asset right click on the skeletal mesh skeleton assign skeleton and choose the ue4 manikin accept and now if i go to the blueprint the mesh is already assigned i need to reassign the third person animation blueprint compile and i'll be able to play with the zombie okay and the second way to fix this i'll go back to blender and from the unreal pipeline export settings dialog and under import you can take launch fbx import ui and actually let me delete the data i'm going to export send to unreal and now if i go back to unreal i'll see the import options dialog i'll just select the ue4 mannequin from here import tweak the color okay and now i can apply this character and it's going to work right away because we assigned the correct skeleton during import i'm just going to move the zombie data in a new folder and then we can move on to a more interesting example so here is our second example a much more cartoony character and besides it has some additional features like a tail ears and a mouth that we may want to rig so i'm going to quickly align my unreal mannequin rig the process will be exactly the same as with the previous character and then i'll talk about some more interesting techniques like attaching additional bones okay so i've aligned the main bones and something special about this character is that it has a very long neck and of course i can grab this tweak bone and move it up to make the neck bone as long as the neck and that will work so in a second i'm going to add additional bones for the tail and ears and mouth and i want to emphasize that you can only attach additional bones to the existing ones you cannot add additional bones in between the existing hierarchy so for example it is not okay to split this neck bone into two that won't work it will make the skeleton incompatible with the mannequin so now i want to add a couple of additional bones and parent them to the existing ones and so first i'm going to apply my rig go to object mode and i'll hide the tweak amateur so we want to keep the deform armature and the mannequin armature in sync here is my workflow for attaching additional bones in the future we may add new features to the addon to automate this process but for now what i do is i add a new armature single bone go to edit mode and let's say that this is going to be my tail and i'm going to place it here at the base of the tail extrude more bones and name them in unreal style then i'll add one more bone for the mouth and one more for the ear and symmetrize it so now in object mode i can duplicate the whole armature and then with one copy selected i'm going to shift select the deform armature and press ctrl j and then i'll select the second copy and shift select the root amateur ctrl j and join them and now each armature has a copy of these bones and i need to pair on them as well i'm going to go to edit mode i'm going to parent the tail to the hips or pelvis with keep offset and mouth and ears i'm going to pair them to the head to keep offset and then i'm going to do the same for the deform armature and that will be much easier to do okay next i'm going to turn the character mesh to the deform armature with automatic weights you can see that the tail is working the mouth is also working although the weights are not good but in this case i'm not going to worry about that for a serious project obviously you want to make your weights as good as possible so next i'm going to switch the armatures alt p clear parent and shift select the mannequin armature control p armature deform okay now i want to move this character to unreal i'm going to create the export collection move the character and armature to it and export to unreal i need to apply the scale of this amateur and then send to unreal cool the character was imported as you know from the previous example i need to right click skeleton assign skeleton and assign the ue4 mannequin skeleton and it will ask me if i want to add these new bones that i created for this character and i'm going to press ok and i don't need this additional skeleton i'm going to delete it now i can go to the blueprints and assign the cartoony character as my playable character compile and now if i try to play it is going to work but the character is obviously floating in the air so this problem already existed with the zombie but because the zombie was so close to the height of the mannequin it wasn't apparent so this is extremely easy to fix i'm going to go to the character open the skeletal mesh and switch to skeleton and that will show the mannequin that is because we're using the mannequin skeleton is the skeleton for our new mesh and the preview mesh is set to the skeleton so i'll just set it to my new character and here it is and also i'll set any of the preview animations and right away we'll see the problem of the character floating above the air and fix this is easy just go to options show your target options and just switch the pelvis from animation to animation scaled then i'm going to press ctrl shift and s to save everything and now if i play the game my new character is walking on the ground and the animations are looking okay now the materials obviously are not correct but that is okay it is often the case that materials are not correctly transferred from blended to unreal and by the way if we look at the skeleton for this character and let's again switch the preview mesh to our cartoony character now if we scroll down we'll find our tail bones for example and these bones can be manipulated in the teaser video that i made for this technique i actually made the tail simulated by physics so that can be a fun topic for a future tutorial okay here is the final example the process will be more or less the same but there is something special that i'm going to do with these additional arms and also this character has four fingers rather than five so i'm going to quickly align the main balls okay here the main bones are aligned and this finger here is the ring finger so the one between these two and what i'm going to do for now is just move it to the side so it doesn't affect the weighting when we apply weights a little bit later and now i'm going to apply the rig hide the tweak rig so let's see how we can add bones to these additional arms of course we can use the same technique as in the previous example just add new bones and create a copy of these bones for each armature and that will work however the orientation of these additional bones will be different than the bones of the original arm so if you want to keep this orientation here is what you could do so for the deform armature i'm going to enable the second layer because it contains some twist bones and now i'll go to edit mode and i'm going to carefully select all of the bones that i want to copy and same on the other side and then press shift key z and move the bones down and you could approach copying the fingers in the same way that should work but it will be time consuming here i'm going to skip this step go to object mode and from here i can parent the mesh to the deformed armature with automatic weights there may be some weight painting issues that i may want to fix but once i'm happy with my weights i'm going to unpair on the character and parent it to the root avenger i'm a 34 always check if you have any unused armature modifiers they may create trouble now i can create my export collection move the export objects there i'm going to make sure to launch the fbx import ui and export to unreal of course i need to apply the scale and send to unreal okay and unreal i'm going to set the skeleton to be the mannequin skeleton and import and now in the blueprint i can change the character to be my forearms character compile and i can play with this character now there is this problem that the arms are just sticking to the sides we can go to mannequin animations and let's take the wrong animation change the preview mesh to be the forearms character and now i can grab the second upper arm and lower it a little bit same on the other side and i'm going to add keyframes for both now i'm going to apply and save this animation and if i play the arms will be pointing down during running and you can edit the other animations in the same way because this character is quite big you may need to change the position of the camera and that's it i hope you see how easily you can make any character in blender be compatible with the mannequin skeleton even crazy characters like this one enjoy and let me know if you experience any problems with this tool i'm happy to help you i do hope to update this tool with additional features one idea is to add a rigifi rig to this whole setup which will control the ue4 bones so that you can create your own animations compatible with the ue4 mannequin
Info
Channel: CGDive (Blender Rigging Tuts)
Views: 53,980
Rating: undefined out of 5
Keywords: blender3d, b3d, rigging
Id: uH52niTccLU
Channel Id: undefined
Length: 32min 29sec (1949 seconds)
Published: Thu Apr 28 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.