Export Animation from Blender to UE4


Welcome back in this video we’re going
to take this animation that we created in the previous parts of this series and
take it to Unreal Engine 4. But to do that we have to take care of a few
things. Well first of all this animation is 24 frames and it’s running at 24 fps
but we don’t really want that now I’ve only been successful at getting
animations exported from blender to Unreal Engine at 30 fps and 30 fps is what
Unreal Engine takes as the default for sampling the curves anyway so what we
really want to do, is convert this to 30fps. I’m going to go to the animation
panel and well this is our dope sheet and that’s a graph editor but let’s flip
this around. So this can be the dope sheet and that will be our graph editor
just so we can have a larger view and I’m going to use the mouse wheel to get
our range into the middle like so just so we can see the whole thing and then
here I can select all of these controls and view the whole thing at once now
what’s happening here. Our start frame is here right so this is frame number 1 and
you can see the range that we have from 1 to 24 and this is frame 24 and we have
one extra frame after that. That’s the repeating contact
pose ok so this frame and the first frame are exact copies but we want to
keep this last bit outside of our range so what this means is that 24
needs to be the new 30 so we’re just going to move that over here so all of
these frames need to slide up over here for the entire animation so I’m just
going to select the first frame and then ok I’ll keep an eye on this
key here so that represents the frame that I need to be on 30
and then I will do ‘S’ to scale and then just move this forward so it is on 30
right so there we go so this was the key that we were moving forward and
now it’s on 30 and the entire animation has been moved forward now this is going
to cause a new problem if you go back into layout and well let’s just update
the end to be 30 so I guess that’s the length of our animation
now but we have a new problem that the whole thing has become slower that’s
because the frame rate is still 24 FPS but now we have more frames so the
whole thing just becomes slower so we also need to go here and update the new
frame rate to be 30 so now we can play the animation and it is back to being
normal except that now it is at 30 fps and 30 frames in length to
export the animation first thing I have to do is rename the Rig to “Armature” and
this is required for it to work with Unreal Engine 4 if it’s called anything
other than armature this is not going to work okay now in animation we want to go
to the dope sheet action editor and make sure that the name of our animation is
selected in this drop-down then back in layout we could go to object mode select
the mesh shift select the armature and then do file export FBX and then select
the name of our export file now we want to do only selected objects so this is
needed in case you have cameras or lights or other things in the scene that
are not part of the final exported character. we want to export only
selected objects, in armature we don’t want to add any leaf bones we only
want to add the deform bone so this will exclude all the control bones that we’ve
been manipulating in blender so we want only the deform bones. In
animation we don’t want all actions we just want that one action that was
selected in the dopesheet action editor we don’t want any NLA strips unless that’s what you’ve been working for and we want to
bake the animation baking the animation means that every frame is going to
have its own keys okay so we just select the file name export FBX then in the
engine we could do import find the file open and then just import it as it is so
this will get a new character into Unreal Engine with a new skeleton so
let’s open the mesh and there’s our new character now we could go to the
skeleton for this character and this is where it might diverge for you based on
whether or not you have Uefy Script now if you have the Uefy Script
your bone hierarchy is going to look like this in other words it is going to
match the Epic Skeleton exactly but if you don’t have it if you just used
rigify then this is going to be different so it is still going to work
but you’re going to … it won’t be so easy to retarget animations onto this back
and forth but it’s still going to work but if you have to Uefy Script well
then things are considerably easier you get a root bone and IK Bones and
well it’s just easier that way now in animation well there’s our animation
that we made in blender and well it’s not and the best animation ever made
admittedly but you know making animations takes a long time this was
this is basically what you’ve seen in the video so a final product might take
days or even weeks of work depending on how well you know this stuff if you have
the Uefy Script you can also export this character with Unreal Engine 4
based joint rolls but to do that we can’t export the animation itself so you have
to go to the action editor cancel the action so there is no animation selected
then back in layout we can go into pose mode and can just select all the
controls and do Alt + R G S to cancel everything so it’s back to the
rest pose and then we can go into object mode go to scripting open the Uefy Script so let’s just give it a minute and then
scroll to the end run the script back in layout make sure the rig is called
armature and then in the armature data properties we can we have to make sure
that the characters armature object is selected here and at the very bottom in
the Uefy Script Panel, this the panel we get for running the Uefy Script. Right at
the bottom there is Set Original Bone Rolls so just click that once and if you
click this it basically breaks blender so we can no longer animate with this
character but we can still export it in a way that is compatible with Unreal
Engine 4 so select the mesh then shift select the armature do the same thing
export FBX this time in a different file selected objects armature no leaf
bones only the deform bone same as before we don’t have any animation now
so none of this really matter so just export this now then in Unreal Engine we
can just do import find the new file do open this time we’re going to select the
skeleton for the original Unreal Engine 4 mannequin so this is the one that
comes with the third person template and then do import and we will just give
this a minute to finish. Now do note that there is no new skeleton created this
time if we open the mesh we can see that our mesh is now in the engine and if we
click on skeleton we will see the original mannequin now we can change this to be
our newly imported character or any of the other characters that
have been similarly rigged with the Epic Skeleton using Uefy Script in blender. You have one mannequin and then it’ll work for any of these meshes and
the same is true for all of the animations so we can have an animation
like this and we just change the mesh to be whatever characters that we have rigged
and it’ll just work like that now if we want to get our own animation onto this
thing we can simply find the animation that was imported with the blender based
joint rolls and then retarget it on to our newly imported character for the
original Unreal Engine mannequin. Thats all for this video if you want to see
more videos on creating animation for games like running and jumping and other
stuff do hit the subscribe and like buttons and thanks for watching

7 thoughts on “Export Animation from Blender to UE4

  1. thanks btw i subbed and liked doing some stuff and learning ….guys like you make it far easier for all of us…

  2. My animation is just blank when imported into unreal engine 4. Still has the right timings (60 frames), but it doesnt show the model playing the animation.

  3. Holy shit, nvm just figured it out. Apparently Unreal Engine 4 doesnt like it when you name it "Armature" so i just called it "Skeleton" instead and for some reason that seemed to fix it… (also made smoothing to edges)

  4. Very very important & impressive tutorial sir. Many many thanks. Lots of love n respect from India . I'm highly benefited from your tutorials.

  5. Great! i'm considering to buy your uefy script, it's really useful. I have a question, Is possible to import in blender an animation from UE4 and modify in it retargeting the animation into the generete rig from uefy script?

Leave a Reply

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