Rigging UE4 Mannequin with Blender 2.8 Rigify + Uefy


okay to start with you want to go to
edit preferences and have this window pop-up then in add-ons make sure that
FBX is enabled and rigify is enabled so both these boxes need to be ticked and
in interface you might want to turn off auto perspective and might also want to
bump up the scale a little but that’s just a personal preference and then you
can save these preferences and that’s all you need to do there with the cursor in
the main scene hit the A key to select everything and the X key and delete all
next we set the unit scale in units all right you have to click on this little
icon here and then in units set the unit scale to 0.01 you might be tempted to
set the length to centimeters because that’s supposed to be the same thing but
it does not work and it’ll just cause a lot of problems now with the cursor in
the main scene again I’m going to use the mouse wheel to pull back a little and
you can see that our grid is being cut off and I bring in a model that’s large
enough even the model will get cut off because the camera can’t see far enough
so I will use the N key to bring this this view up and set the end to 50
meters don’t forget the M at the end and that
gives our grid back next we go to file import FBX go to wherever the mannequin is and select the file I’m going to leave all of these options as they
are and then in armatures we have to select automatic bone
orientation now just to show you what happens if you don’t do this I’m just
going to import it as is and you can see all the bones are sticking straight out
of the mannequins mesh and we don’t want that to happen we want them to
point at each other so I’m going to hit control Z to undo that go back to file
import FBX picked the mannequin again armatures automatic
bone orientation okay and now this is what we want to have okay if
you’re looking on these icons here you have to select this one that represents
the armature then if we go into display we can hit in front so we can see all of
the bones through the mesh and we can hit names to see what they were called
also now you can see they are properly pointing at each other and that’s what
we want but there is still a problem and you can see this foot bone if I just
turn the names on foot_l does not match does not point at the toes and the
toes don’t really stick out either but we can fix that
but the rest of the skeleton comes in exactly like we need it to be all right
now you see this highlight this orange color and the yellow color yellow means
it’s selected but if you see an orange color it means that multiple objects are
selected or one of them is called the active object but that’s really just
another discussion for another day what we want to do is fix this bone so it
points properly I’m going to select the armature with the left mouse button
click and that actually selected the mesh instead so try that again and now
we have the armature then I will go here and go to edit mode and you can also use
the tab key to switch between object and edit modes now I will select Alt + A to
deselect everything then I will click on this large bone here left mouse button
to select it and hit the H key all right so that hides it then I can bring I can
bring it back with Alt + H but for now I just want it out of the way so
highlight it H to hide you can do that with any of these bones now I will
hit 5 on the numpad to go into orthographic view I just find this
easier to work with and I will I will click on this little icon here
ok that’s the toolbar for whatever current mode you’re in or whatever
current operations you can do and I will just turn on X-mirror so when we work on
this side of the armature the other side gets auto automatically updated click on
the circular end with the left mouse button to select it and Shift + S to
bring up this pie menu cursor to selected all right that brings your
cursor down to the to the bone select the other bones pointy end or circular
end and then Shift + S and go Selection To Cursor that moves that kind of connects
these bones then I will select the foot bone itself and set the roll to minus
ten now how do I know it’s minus ten because I’ve done this many times and I
kind of figured it out it was minus 10 so that’s what it always is now it’s
like the toe bone and I will change this drop down to 3d cursor okay this selects
the point of rotation origin around which the rotation will occur so but
because our 3d cursor is over here and that’s what we want to rotate the bone
from then I will hit the R key to rotate and then without doing anything
else directly hit the X key to lock the axis
and I will hit minus 9 0 right and if you see on this corner of the top
left side of the screen you can see what value you have entered and along which
axis the rotation is occurring then I will hit the enter key to finalize
everything one more thing we can do is click on this and hit the G key to grab
it then the Y key to lock the y axis and just move it back over so it’s more
reasonable placed I can look around the scene with the middle mouse button clicked
just click and drag and you can look around and the mouse wheel itself will
pull back and pull in I will hit Alt + A to deselect everything and then go back
to object mode and that brings back to all the hidden bones all basically our
feet are fixed now you might notice the armature is still selected even though
we hit Alt + A to deselect everything that’s because that was in edit mode
this is now in object mode so I’m going to hit Alt + A to deselect everything
again I’ll take and then if I if we come down here you can see that the cursor is
still on the toe bone so I’m going to hit Shift + S and then Cursor to
world origin because we’re going to bring in the new metarig and want it to spawn
at the correct point now before we bring in the meta rig I want to click on this
scene collection right click new and create a new collection now you can
treat these collections just as folders so in the back end there of quite
literally python collections you can treat them as folders so I’m going to select
this new collection make sure it’s highlighted bring the cursor back into
seeing Shift + A armature and then human metarig now nothing seems to have
happened that’s because at the start of the video we set the unit scale to 0.01
so the metarig is right now just tiny tiny little speck so I’m going to hit
the S key and then 1 0 0 and you can see again in this top left corner what was
typed in and then I will hit the enter key and set the scale like so whatever
object is currently selected will be listed here and you can see it’s details
on in this panel now we know that the metarig is selected you can see that
it is scaled at a hundred in each direction so we don’t want that to
happen so what we’re going to do is bring the cursor into the scene go
Control + A and then apply the scale now the scale
is 1 1 1 rotations are all 0 and the location is also at the world origin so these
values are kind of important to us to make this work properly for basically
all of our objects now we have to match the metarig’s pose to that of the the
mannequin and normally that would involve a lot of going into edit mode
and rotating scaling grabbing moving but we’re not going to do any of that
ok I’m going to go to scripting in this top layer panel open go to Uefy
Script open the text block then I’ll I’ll put the cursor on this bar use the
mouse wheel to scroll to the end and then just hit Run Script then I can go
back to layout now what this does is to add a new panel to this armature
information armature tab ok so again click on this running icon to go to the
armature data and then use the mouse wheel to scroll down and you’ll see this
Uefy Script panel now what these options are we can get into more detail
for now just know that you can select root here or what is root? root is
the name of the armature for the mannequin that is what it was
called when we imported it in and the other object that we have is the metarig so set both of these to root and set this to metarig it should already be
and then what we need to do is to pre-process
the mannequin’s bones so this script will understand what it has to do so just
make sure that the type is epic skeleton and hit this set up character bone names
now you’ll see something happened here and what happened is that names of all of
the armature bones have been changed so we do this so the script will understand
what it can do with the armature after that is easy just
hit pose metarig and you’ll see that the meta rig has disappeared only it has
not disappeared if I go here and click on this little eye icon to hide the
mannequin you’ll see that the bones are now matching the mannequin exactly I’ll
bring back just body and then I will go to I’ll select the metarig go to the
armature panel scroll up put it in front and you’ll see that the bones are
perfectly aligned so this is the epic A-pose for the limbs only that’s important
to to know okay I’m going to hit the 1 key (numpad) to go into the front view and
you’ll see that the limbs are perfectly placed from the shoulder to
the fingertip and on the legs to the toes now the spine you have to do this
manually and that’s really easy to fix I’m going to hide the body of the
mannequin like so and bring back its armature then with the
cursor in the scene I will hit Alt + A to deselect everything
and then hit A again to reselect everything on the screen with both
objects selected I will go into edit mode like so and hit Alt + A again to
deselect everything in edit mode now with both these objects in edit mode I
can select bones in in either of them I will hit the 1 key on a numpad go to the
front view pull back a little with the mouse wheel and then I will hit the B
key to box select everything and I’ll just drag a box like so
and the H key to hide that and then box select everything again and again drag another box like so H
key to hide that select this bone left click and then hide that and now you’re
left with just the two spines I will select the metarig here and turn
names on for this thing as well so we can see names of both these spines
now we can’t just take bones from the metarig and put them directly on on
bones from the original armature Rigify requires the spine to be connected
if it’s not the rig will fail right so if you see here see this bone going here
it’s not connected that bone and this one is on that bone and these two are
also not starting and stopping at the same point this is the original armature
whereas this here is the metarig and every bone starts where the last bone ends
right and so we need to maintain that now well what we can do is just place
things approximately in the correct location and it actually works out
really well now I’m going to put the cursor on one of these bones and hit the
L key to select everything and I like the 3 key on a numpad to see the
side view and then I’ll hit G key to grab everything and just use the mouse to
move now I’m going to match the base of the neck to the base of the neck or the
original armature and then I will hit left-click to finalize that now we just
need to match up these we need to match the head of bones to roughly their
counterparts location so the head is basically where bone will start and the
tail is where it ends so you can see these location values if you want
numbers not just a visual approximation I will select this bone all right just
just a circular end not the whole bone G key and then the Z key to lock the z
axis and then just move it up to roughly be equal to this right now you’ll see
that the other end other end of the bone is does not really match the other end of the bone in the
original armature that doesn’t matter the transform is calculated at the
head so just match them up roughly G key Z move it up and move this up and
you know this yeah this doesn’t this doesn’t really matter because the spine
for the spine things are inverted for the spine what matters is tail and not
the head now what we’re looking for here is really just sorry hit the three key
on the numpad to bring this back what we’re looking for
it’s just well basically the straightest spine possible because that’s what rigify
works with best maybe not a completely straight spine but straight
as it can be with a little bend so let’s just try to get a better position for
this grab this and yeah I’m just going to use the mouse and move this there
and move this there move it underneath you know it needs to really
.. this one’s a tough one I think grab this and just move this over there move this again like so and make sure it’s not you’re not messing around with the
original armature so an eye on these labels here we want just the metarig
grab and well alright to be perfectly honest you’re going to have to figure
this one out for yourself this is experiment with it and you’ll see what
you need to do Alt + A to deselect but the good news is that the metarig is reusable it has a non-destructive workflow and we’ll look
at that more some time later now I’m going to select the head bone and just grab the
whole thing make it match this and then grab the top G lock the access to Z and
just move it down somewhat okay so yeah close enough right Alt + H bring everything
back Alt + A to deselect everything go back into object mode Alt + A deselect
everything again right bring back the body click on this little eye icon and
hide the armature and okay we missed one little bit here hit the one key to come
to the front view zoom in here going to select the armature first this is the
matter rig and edit key edit mode select this bone go to the tool panel here
you might need to use the scroll mouse scroll up to bring this into view and
then hit the x-axis mirror so we can work on both of these bones I’m going to
use the G key grab it and put it there put this grab this and put it over there
like so and this end put it over there like so this needs to be the size of the
foot essentially right select this and I’m just going to zero these values
manually zero this and zero that unfortunately it seems that if I was to editing these values directly doesn’t
seem to work with X mirror so go to the other bone select this bit and one is
zero this again and zero that now I will hit the 3 key to get into side view
and then I’ll just select this bone G key
grab it lock it to the y-axis move it back to the end
and then just the circular bit grab y-axis lock it and then just move it
back into place now what you want to do is put this bone grab Y right on the
point of impact okay I’m just going to move it out the way for a second here
there you go see this this bit here where it meets
the ground that’s the point of impact of it this was a female character if it was
a heel or something this point might be further right so where you place this
bone doesn’t depend anything on any other bone just where the actual mesh
will connect with with the ground all right so grab Y put it right over there
and one key see that everything is in place and you know seems fine and I
think we are done with the metarig Alt + A to deselect go back into object mode
now we need to disconnect the mannequin from its armature so I will select the
mannequin’s mesh go to the modifiers tab one panel and apply the armature
modifier then I will select the object panel this icon and go into relations
and disconnect it from its parent armature right so now the mesh is
basically freestanding and I can just drag this over here but I could drag it
over there anyway but now it is truly disconnected and we don’t need any of
this anymore so just the mesh and the metarig with the metarig selected
and then select this armature panel right metarig object and scroll down
and just hit generate rig now this button is from rigify itself it might
take a moment to build the rig but not too long usually and and there is our
rig okay so we can now hide the metarig but do not delete it because we’re
going to need it later and we can go into pose mode and with the with the rig
selected then we can also put it in front and we’ve even enable names or
maybe not it’s a bit too much alright now we go into object mode and I
will select the mesh left click on it and then I will shift left click on the
rig itself right this is the rig not the metarig we turn that invisible
for now then I will hit Ctrl + P and select armature deform not with
automatic weights or not that empty groups just simple armature deform this is going to
parent the mesh to the rig but if we go into pose mode you’ll see that still it
doesn’t do anything just yet and before we pose the rig or interact with it in any
way you want to scroll down here and select individual origins so in the
armature panel to scroll down to the bottom do Build Unreal Skeleton give it
a moment and then hit weight paint once alright now
since this character was imported and it already had weight painting those weights have
now been transferred to the rig so we don’t have to manually
repaint anything so this rig should be functional now I’m going to hit ..
select this control here hit the G key and you can see we can move the
character around now rigify has quite a lot of controls on it and we can check
that out in another video but basically that’s the whole process now let’s take
this to the engine I will going back into object mode I will select the rig
and then rename this to Armature and you have to do this to export it
properly for ue4 okay now I will select the mesh and then shift left
click on the rig to have both these objects selected and then you just go
export FBX set file name and for main you want to do selected objects right
you may have to click on this and then in armature you want to turn off add
leaf bones and want to turn on add deform bones and we just hit export FBX
so let’s take this up in the engine now import find the file open import it as it
is don’t change any of the options and now we can confirm that the skeleton
is in fact exactly what we wanted to be and not the mess that rigify would output on its own now we can just retarget this retarget
manager select a humanoid rig and because we
chose our names well Uefy built the skeleton in a way that most of this
should already be set right except for maybe one thing the head is called head_01 and show advanced and everything here should be properly set including
the IKs and what you can do now is set the preview mesh pose apply it to
asset and what if … we don’t need to modify the pose. save everything close
this close that save all of this then in character find the original that
came with Unreal Engine and set a Select Rig to humanoid save
this close that find its animations let’s see if we can retarget these to our
new character right pose will match automatically nothing to do here assets uem. can
we make a new folder okay? we can and Anim and okay and we target so now we
have these retargeted animations and everything is going to work just fine right now the difference between having
this and just the originals are that we have we have a rigged character in
blender now so if there is some missing pose or something that I want to do.. now
basically if I want to improve my animations or add more animations I now
have that option whereas previously I was just stuck with whatever was
available and you know the only other option I had was spending thousands of
dollars on something like Maya that I really can’t afford so you know it opens up a
lot of options and whats more this process will work on any of the
animations in the Unreal Engine marketplace or for the Epic Skeleton
plus you can now use rigify to create and then retarget to the original very
accurately new animations that can possibly also go in the marketplace so
now it’s really good to have that option Uefy Script is available for sale
on my website. There will be a link in the description. The script can save you hours of time per character
and if you’re not talking the whole while the actual time from import to a
fully rigged character ready for taking back to the engine is something like two
minutes at most now I don’t have a patreon or something
but I would ask that consider purchasing this script to support its continued
development and we’re not done now this is there is a lot more than we have
talked about here if like me you’re using FuseCC or Mixamo animations
you’re going to want to watch my other video where I will rig a fuse character
with the same script and there’s a whole lot of other things we haven’t talked about
yet so there are more videos on that so be sure to subscribe this
channel and thanks for watching

23 thoughts on “Rigging UE4 Mannequin with Blender 2.8 Rigify + Uefy

  • This is pretty amazing and I actually was hoping someone would come up with a much better way to use the Rigify rigging tool on Blender. Mainly the hands editing and Facerig is very tough. I have a question, can you use that script on other FBX file types from other 3D software? If so that would be awesome! I think I heard you mention Mixamo Fuse and another 3D character generator tool. If it's doable I will surely do my best to learn this method of using Rigify.

  • Hi! I'd like to buy this script but I just wanted to know if this includes the IK controllers for attaching weapons/props like it does via ART – I believe there's 2 IK handles and a weapon bone

  • So, to be clear, with this script I will be able to make a custom character and rig it with rigify or mixamo, then use the script to give it a skeleton that will work in Unreal Engine?

  • UPDATE: New version Uefy Script 1.2 released with many improvements. You can now export original mannequin bone rolls in addition to the Epic Skeleton bone hierarchy using Blender 2.8. Custom mapping for MakeHuman added and new video to rig any kind of character. https://youtu.be/kuqeG6oGQJM

  • Hi, how did you fix hand and feet problem when importing to UE ? I just purchased the script and everything works nicely – beside those two issues.

  • Some tips for those who may be struggling with the tutorial:

    If "Generate Rig" doesn't work, you may have accidentally screwed with the spine during the phase where you line the spine up.

    If "Generate Unreal skeleton" is missing, it might be because you closed and re-opened the project and Blender 2.8 doesn't like that you're automatically opening a python file with your project. You may have to re-add it again and hit "run script".

  • I missed an important step in this video. After you import the character to unreal. You might see wrist is stretched and toe is slightly misplaced. You can fix this by updating bone translation retargeting as show in this video at the given time https://youtu.be/2xVF9QFu-Bw?t=2786

  • Great. Now I can export the Mannequin, re-create his skeleton in the exact same way, and then re-import him. Sorry, what's the point of this?

  • It's great that we can rig a character that's already been rigged, but if I make a model in blender, starting with no bones or anything, can i use this to set it up so that it matches the epic skeleton exactly? We don't want to actually retarget..what we want to do is rig characters in blender so that on import you can just set them to the epic skeleton and they can use existing animations/bluperints/etc without being retargeted.

  • UPDATE: New version Uefy Script 1.3 release with better support for rigging static meshes. You can check the ue4 forum post for more details. https://youtu.be/MRhDDbU0zdE

  • I got this to work 99% of the way. My only problem is that when I retarget the custom animation onto the default UE4 mannequin, the hip joints come out stretched up into the torso. Any idea what would have caused that, and how to fix it?

  • At 26:25 you can see that the characters right arm is not aligned properly with the forearm and its toes are also not aligned. I followed the steps and the same issue appears in my attempt as well, would be nice if there would be a fix.

  • This is a massive game changer dude. I already bought your script! Keep up the good work! I'm on your latest script version, and pretty much everything you needed to fix here is already fixed on the newer version 🙂 works perfect inside unreal too!

Leave a Reply

Your email address will not be published. Required fields are marked *