Create First Person Animations in Unreal Engine 5! (TUTORIAL)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome back to another video in this video i want to show you how you can create first person animations using control rig right inside unreal engine 5. control rig is a very powerful tool that will allow you to create any animation that you'd like for your characters and we will focus on creating first person animations whether that be for a first person shooter survival game you will learn how easy it is to to animate and export your animations so that they can be game already so without further ado let's go ahead and jump right into the video now before we start off the video i just want to give a quick shout out to my patreon sponsors patreon is a great way to support all the free content that i produce here on the channel and you can also get some of the completed projects as a download up on my patreon and again thank you to my patreon supporters for making this video possible so the very first thing that you want to do is create a blank project you want to create a games under the games tab we're going to select the third person character because the third person character comes with a character that has all of the control rig controls already set up so we're just going to leave the settings as this and then i'll just name this to first person shooter and animations and create the project all right once we're in here we can go ahead and go into our content drawer here i'm just gonna dock this in layout but if you head over to the characters under the content folder you'll have this mannequins folder and inside of there we have this folder for rigs so this has all the control rigs already set up for the mannequin character so i want to give it a second here to load and once that's done loading i'm going to take this control rig mannequin underscore body and just drag and drop it into our level and what that actually did is it created a brand new sequence with our control rig right here and it added this timeline that we can actually start animating so if you don't know anything about control rig and animations you don't really have to worry i'll explain this to the best of my ability all right and i'll take a second here to explain everything so down here is your sequencer so if you don't know what a sequence is it's basically what you'd use to create either cinematics animations any sort of movement inside of your level project you're going to use this timeline the sequencer timeline to keyframe certain events or certain movements in our case we want to keyframe when we move part of the character's arms and part of the controls we want to keyframe it here on this timeline now there's two different ways that you can create the sequence as you saw we can just drag and drop this control rig mannequin body and it will automatically create that another way is you can click this little sequence icon at the top and just click add a level sequence once you have done that for example if i were to delete this mannequin body all you'd have to do is once you've created your sequence you would just have to drag in your control rig here and it will add to that sequence another way you can do that is if you go to your outliner you can select your control rig and drag it onto your sequence so there's a couple different ways that you can get your character here onto the sequence anyways now that we've talked about that let's actually talk about how to set up this character to start animating and creating a first person animation so the very first thing that we want to do is we want to add a camera to our character's head here that way we can see what it's like in the first person and we can preview the animation so i'm going to go to the cube plus icon and create a all classes and over here just search for a camera i'm going to take this camera actor drag and drop it in the scene then all we have to do is take this camera actor and drag and drop this onto our cr underscore mannequin now it's going to pop down here to ask us to choose a socket or bone and we want to attach the camera to the head so let's click the head and now the camera is attached to the head so we want to go in the details panel here and if i expand this we want to reset the location and all we have to do is click e and rotate this 90 degrees okay so we now have the camera attached to the head and what we want to do next is we want to actually preview what this camera is seeing so one way i'm going to do that is if you head over to this three lines button here at the top of your viewport we can go down to layouts here and we're going to change this to from from the one pane to the two pane okay so now we can zoom in over here and on this other pane we're going to change this from the top view all the way down to this place camera camera actor okay so right now what we're seeing is what this camera is seeing right here okay you can switch between your main view and your first person camera by just clicking this button here at the top right right now that should be good for now one thing to note is that if you scroll in this viewport it will move the camera so i'm not sure if there's a way to lock this specific viewport um if there is a way comment down below but just note if you're scrolling in here just make sure that you reset your view back to normal okay all right so now we should be able to start animating or creating a first person animation so if we take part of the hand here take some of these controls you'll notice we can move it up and down we can start to rotate the arm around okay now what i actually want to do is i want to switch the current controls from what it currently has right now it is set to fk so fk basically means that we can only rotate we can only rotate each bones okay which you know you might want to use for certain certain things but in my case i want to switch this to ik so i want to switch it to the ik control that way it will be a lot easier to actually animate our characters first person arms so to switch from fk to ik you want to go over to your sequence and expand here the control ring mannequin body under the global control here if you expand that we have some check boxes down here so these check boxes allow us to switch from fk to ik in the arms so we'll go ahead and click both of these check boxes right here and you'll see here in the viewport we now have these boxes on the characters hands that we can select and now if we move the arm around or if we move the hand around you can see that the arm moves with the hands motions okay so this is what's called ik and this will help us a lot when animating because then we don't have to rotate each part of the arm to animate it now a couple more settings before we go ahead and create an animation first thing that you can do is you can disable grid snapping so you get a more smoother movement when animating you can also disable rotation snapping so when you rotate get more smoother rotation if you click this arrow icon here i'm going to change the camera speed down to one so that will make our lives a lot easier when navigating in this viewport rather than having to deal with fast camera speed so now if we take part of our character's arms here and rotate it around we can start to animate our character's hands now one thing i forgot to do is we want to actually change this from real time off to real time on okay that way we can actually see what we're doing so we can take our character's hand right here we can also take the elbow here and move it up and we can sort of position our character's hand like so i'm just moving both of the characters arms by selecting the controls and moving them around rotating them and what i'm basically trying to accomplish here is just to get our characters hands in front of the screen that way we can start work start working on a first person animation okay so you can take the elbow controls here and move them out and we can take these hand controls and rotate them and position them like so now if at any point you want to hide the controls if you head over to this animation tab and under the animation settings we can see we have some check boxes here so if we want to hide the controls all we have to do is click this hide control shapes and then we can see what our first person view would look like without any of the controls another neat button inside of here is to only select control rate controls so this setting right here will make sure that we don't select anything else in the world that way we only select the control rig controls so that way we don't select a cube or something other than our characters control rig so that will make animating a lot easier so now that we've have sort of like this bass pose let's actually start working on creating maybe sort of an idle animation okay so down here in our sequencer you can scroll up and down here and we're gonna start adding key frames to create a very basic animation so with our current control selected our hand control here if we if we scroll down we're going to see the current control that we have selected in this case our hand left ik control and there are two different ways you can add a keyframe you can click this little circle icon right here that will add a keyframe you can also click this keyframe icon right here and what this will do is it will automatically create a keyframe whenever you make any sort of movement or changes so for example i'm going to keyframe this hand arm okay and our hand left hand control so both of these controls are currently keyframed i'm going to move this timeline over to maybe about 20 seconds and then if you take the control and move it around you can see that it automatically creates a keyframe so whenever you modify or move around a control if you have this key icon selected it will automatically add a keyframe for whenever you move a control around so this is really handy that way if you forget to click this little circle icon whenever you modify the control it'll automatically keyframe it for you so we currently just added a little bit of an animation there you can see we moved we keyframed the initial pose of our hands right here and then about 20 seconds in all i did was move the hands down took these controls moved them down and then had made sure that i marked those keyframes one for the right hand and one for the left hand okay so what we have here is basically really simple [Music] hands are moving down now what i'm going to do is you can actually select keyframes and copy them so i'm going to left click and drag and select both the left hand and the right hand keyframe at frame 0 control c then if we move this over to say about 40 seconds control v you can paste that frame so right now we have a very simple idle animation so you can see we go from our initial pose hands move down and move back up now this is probably a bit too fast so what we can do is we can select these keys and you can click on them and move them like so okay so i'm going to move these center keys to the middle i'm going to move these to about the end like so now if we hit spacebar play see that our character has this very simple idle animation and maybe i want to space this out a little bit more move that to about the center and then we're going to take these frames and move it to the very end like so so if we hit play we have this very basic idle animation and of course if you want to hide the controls you can click the high control shapes you can see what it looks like here in the first person now you might notice that the arms kind of look weird from the third person and it's really up to you how you animate or position the arms it really it depends on your game whether or not you're actually going to have like a third person in your game or if it's just for first person if it is just first person you really only have to animate the arms in fact what you could do is you could just delete the rest of the mesh other than just the arms but like i said it's up to how you want your game designed if it's multiplayer and whatnot so right now i think this is a pretty good animation pretty good idle animation what we're going to do now is we're going to go ahead and export this animation so that we can use it in our animation blueprint as well as our animation blend space so let's go ahead and if you scroll to the very top here if you select your control rig mannequin and body we can right click and we have this menu that pops up what we want to do is you want to bake animation sequence okay so click bake animation sequence and now it's going to ask for a location to bake that animation to and i'm just going to select my content folder and we can just rename this to idle animation click ok and then if you expand this export you have some settings here i'm going to leave all the settings as a default and just click export to animation now you can see it was completed so we go in our content drawer we have here this idle animation and it will pop open the window of our idle animation okay so if we were to go into first person here you can see the hands here animating and of course this isn't the greatest example because our characters heads in the way so what you'd want to do is you want to go ahead and take the mesh that you're using into blender and just delete everything other than the arms but as you can see if you were to go into first person here we have just a very basic very basic idle animation that you can use you can re-target for your different character models and you can use to set up a first person character so i hope this is a decent amount of information to get you started on creating your own first person animations for your games i will likely make a follow-up tutorial detailing how to do more advanced things such as animates say your character holding a rifle as well as setting up the rifle so that you can actually animate things like reloading the clip anyways if you guys enjoyed the video make sure you leave a like and subscribe also check out my patreon link in the description below and as always i'll see you guys in the next one
Info
Channel: Smart Poly
Views: 122,329
Rating: undefined out of 5
Keywords: Unreal Engine 5, Unreal Engine 5 Release, Unreal Engine 5 New Features, Unreal Engine 5 Next-Gen, Unreal Engine 5 Nanite, Unreal Engine 5 Lumen, UE5 Release, UE5 Next Gen, UE5, Lyra Starter Game, Unreal Engine 5 Lyra Game Tutorial, UE5 Lyra Tutorial, Unreal Engine 5 Open World Tutorial, Unreal Engine 5 Open World GamesUnreal Engine 5, Unreal Engine 5 Open World Games
Id: d6MEHGJWbKk
Channel Id: undefined
Length: 18min 55sec (1135 seconds)
Published: Wed Jul 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.