How to Create Blender Animation for Unreal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] welcome everybody today i'm going to talk about blender to unreal engine and specifically i'm going to talk about creating a model with an animation um you may have experienced a problem where your animations look really tiny and i'm going to show you how to fix that so let's just get right into this i'm going to create a very simple model with an animation and we're going to import it into unreal so the first thing that you want to do when you open up blender is you want to go to the scene tab and you want to go to units and under units this is where you set the scaling for your models what i do is i change it to centimeters and you also want to change the unit scale here to .01 this is really important that you do this if you don't change it to 0.01 your animations will not import correctly into unreal so first thing we're going to do is you see now that we've changed our unit scale the model itself has gotten a lot smaller so what i'm going to do is i want to create a model which is roughly four feet tall uh in in game and so that translates to about 120 centimeters so because i'm currently at two centimeters i'm gonna scale this by 60. so i hit s and then i hit six zero four sixty okay and now that i've done that you see my model's gotten a lot bigger so i'm gonna zoom out a little bit you can also do uh view frame selected or numpad zero so now that i have my model i'm going to create a simple pyramid i'm just going to do some very quick modeling things here again i'm going to go to frame selected we're going to select the top vertices and then now that i have these selected i'm going to go to mesh and i'm going to go to merge at center so that takes the four vertices merges them down i'm then going to add a little bit of additional geometry to this mesh so that we can animate it and it will move correctly so i'm going to go into x-ray mode i'm going to select the um i'm going to select the three edges or four edges right click i'm going to do subdivide open this up and go to 10 so now i have some extra geometry in here that we can actually animate now that that's complete i go back to layout mode our uh our model looks pretty good now and what i'm going to do is i'm going to go to view front view and i'm going to raise this up a bit okay so we raise this up now you see that there's a couple things here you'll notice our our z location is offset um we don't have any rotation but our scale is set to 60. so what we want to do here is we want to do a couple things we want to apply all of our transforms to set them to zero at least on the location so if we go to trans or sorry if you go to object apply all transforms so that sets our location to zero rotation and it resets our scale back to one rather than 60 and that's important the other thing we're going to do is we're going to set our origin of our mesh to um the 3d cursor okay awesome so now that that is done we need to add an armature so i'm going to go to frame selected here and this is where we're going to add the skeleton to our simple mesh so what i do is i'm going to go to add armature at this point you really can't see it very well so what i'm going to do is go down here to the uh skeleton and you go to viewport display and do in front now you'll notice that you still can't see it and the reason is that the armature is still scaled down very small so i'm going to scale it up just like i did our mesh i'm going to do s 6 and then 0. hit enter and now we see we have our first bone for our armature what i'm going to do is i'm going to add two more bones so i select my armature i go into modeling mode i'm going to do viewport front okay and then i'm going to select the top edge of our bone i'm going to drag this down just a little bit and i'm going to hit e for extrude and then z i'm going to move that up a bit so this extrudes out another bone i'm going to hit e and extrude another bone and do one more okay now that we have our three bones if you look at um so if you look at the object so if you select your mesh again you see our scale is one if you select the armature you'll see that the scale is 60 and that will mess things up on your animations uh when you try to import it into unreal so what i'm gonna do is i'm gonna do two things i'm going to object apply scale so that resets our scale down to 1 and i'm also going to move this bone up just a little bit just like that the next thing you need to do is parent your um i'm going to save this real quick so i'm going to do save and i'll just call it uh let's see we'll just call it uh triangle or we'll just call it try just as a temporary thing okay save that the next thing you need to do is parent your mesh to your skeleton or your armature so what you do is you select your uh mesh and then you select shift select the armature so now you have both selected in that order you right click and you want to do parent and i'm going to use automatic weights and what this is going to do is now if you select your mesh if you go to object weight paint mode you'll see that it has weighted the different bones to the armature and that's what you want okay so now we have our our mesh uh a pat attached to the armature it's weight painted so when we move the bones it will actually move the mesh and that's what we want so we're gonna go to the animation tab i'm gonna do uh frame all here so that we can see our uh our pyramid the first thing i'm going to do let me see what's over here yeah i think i can do view frame all here yeah same thing um so the first thing i'm going to do is i'm going to select my armature i'm going to go into pose mode i'm going to select all of my bones here and the first thing i usually do is i go into the skeleton and i do pose library and i add an initial pose so that i have the starting position then what you can do is you can select auto keying and if you come back to your pose library and hit apply library pose it will key all of those items those bone positions then what i do is i go to the very end of my animation like to 240 frames in and i just select apply my pose again so this will allow the animation to loop without having like a snapping effect so just to make this uh very simple i'm gonna go and just add a couple simple animations here so i move it to frame 60 i select this bone if you don't see your tools you can hit the t shortcut and that'll pull up your um movement and rotation and things so i select rotation and what i'm going to do is just rotate this of my uh bone and you see now that it's deforming the mesh and so that's good we automatically created our keys that's good so i'm gonna go to another another um frame and so now we have just a very simple animation right if i play this it's going to loop so your animation is um you know following your keyframes and then looping all the way back to the beginning that's perfect so now what i need to do is this part's always a little weird so i think i'm going to select all of my bones instead of the dope sheet i'm going to go to the action editor and i think right now it's set to armature action you can create new animations but i'll leave that for you to dig into i think what you do is just rename it here we'll go ahead and try it i might have to play around with this but we'll just call this idle so if you're creating like an idle animation so you type in that you hit enter i know from past experience it's best if you hit um fake user so this makes sure that your animation doesn't get deleted and so now you see that we have an idle animation and our pose library that was from the pose that we created okay so i'm gonna go ahead and save this and at this point i think we're pretty good we have our mesh we added some geometry we created a skeleton we attached the mesh to the skeleton with automatic waiting and now we've created an animation and so all in all this looks great and all we need to do is export it to the unreal engine so what i'm going to do is i'm going to go to file export fbx i'm just going to select armature and i'm also going to select mesh so shift select so i only need these two things the armature and the mesh i'm going to change my my uh forward to the x vector and the up to the z so x forward and z up i have a uh just a path that i'm going to save my xp fbx to hit export and now if we switch over to unreal so here is just a test project that i have what i'm going to do is i'm going to drag give me one second so what i'm going to do is i'm going to drag my try.fbx over here and drop it and when i do that popped up the window on a different uh different monitor it's going to ask you to import and i'm going to say import our skeletal mesh import the mesh itself so this is going to create a new skeleton and the mesh and it's also going to import the animation so i say import and if we look at what got imported we have our skeletal mesh so here is the skeletal mesh itself um we have our idle animation we have our pose library animation the physics asset which gets automatically created and ultimately the skeleton that we created for our our simple model here so again it's like really simple we have the root bone and the two other bones so these are the three bones that we created in blender and i think when imported it automatically creates an end bone yeah i believe that is how actually maybe it creates the root bone i think the root bone gets created by either blender or um or unreal when you import it but in either case let's go back here and i'm going to show you that if we pull up our idle animation you see that here it is and it looks like it's functioning correctly i'm going to go to browse here and i'm going to drag this into our scene so let me move that up and if i hit play here you see let me eject from here so i can move around but i think you can see that here is our model that we created um and it's got a very simple animation that we applied to our skeletal mesh and everything is scaled correctly and working great um if you don't follow the the process that i just went through when you import your uh when you import your skeletal mesh in your animation what you'll see is you'll see the skeletal mesh here but then your animations you won't see the model at all and the reason is you don't see it is because it's scaled down extremely small so this is how you get around that i hope you enjoyed today's uh quick tutorial and i hope you find this helpful if you like this kind of content please hit subscribe and like the video have a great day and a safe day thanks [Music] bye you
Info
Channel: Gordon Vart
Views: 27,444
Rating: undefined out of 5
Keywords: ue4, tutorial
Id: AEmz-1RQDoQ
Channel Id: undefined
Length: 16min 17sec (977 seconds)
Published: Sun Dec 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.