Unreal Engine 5 Beginner Tutorial Part 17: Animation & Sequencer Basics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] by the end of this video you'll be able to use this sequencer which is also known as a timeline to create any animation that you want like basically activating your spaceship and animating the Stormtroopers to walk towards it look at this super cool see you guys in the video what is up beautiful people we are here at chapter 17 and we are going to talk about animation this is going to be one of the most important chapters of this Unreal Engine tutorial series so let's right get into it let's get right into that's good but do you know we actually said every chapter is the most important chapter up until now it is very important we chose the most important topic yeah but we're just trying to make sure you guys understand the importance of every chapter okay enough enough enough all right let's get right into it all right so let's go ahead and talk about animation but before we do that let's look at the Storm Troopers right after the previous chapter we closed on real engine and opened it again and that caused our console variables to reset again so what we have to do is we have to paste the same command in our console variable again so we have it here saved right we're going to leave in the description box below again so you guys can go ahead and just copy and paste now there is a way you can make sure that this doesn't reset every time you can create presets of console variables let's say like 10 of them and just have them apply every time you open the engine we're going to be talking about that in one of the final chapters which is render settings and console commands so make sure you check that one out too for now let's move into animation now animation has to do with objects in motion cuz currently if you look closely to our scene there's absolutely nothing moving so we have no animation and at the end of the day we're doing all of this cinematics because we want things to move am I right yes okay cool so if you want things to move you need to know at 0er seconds where is that specific object and at 3 seconds where is it now is it moving is it going forward is it going backwards we need to have a timeline so if you've edited videos before fire you've done it like videos before of course Da Vinci yes right so in Da Vinci you have a timeline right premere you have a timeline here we don't have a timeline you have a sequencer absolutely but a timeline and a sequencer work exactly the same way right yes so how can we go ahead and bring the sequencer or the timeline from now on we're going to refer to the timeline as a sequencer so in order to add a sequencer we are going to go to this drop down right here and then we're going to click on ADD level sequence it's going to prompt us to create a folder or save it somewhere in our content drawer and we're going to do exactly that we're going to create a new folder called it sequencer and because per level you can have multiple sequencers that's why I recommend you open up a new folder just allocate it towards sequencers so for instance you can have one sequencer one timeline for the jet door opening and you can have another one where Darth Vader is talking to the the Stormtroopers on the other side of the spaceship right just different timelines so we're going to call this spaceship door opening yeah beautiful naming opening okay cool the moment you go ahead and save your sequencer you'll notice that you'll have the sequencer docked in the bottom part of your screen and it's consisting of three parts you have these drop downs up here which control some of the settings on the left side you're going to have access to all of the objects that are going to be animated and on the right side you're going to see their animations so we're going to go ahead and start with a simple object and try to animate it f what object should we go for let's add a sphere okay and then what sort of Animation do we want to do okay let's put them beside the jet fighters and then let's shoot it all the way to the spaceship okay so can we pretend as if this is one of the droids yeah we can do that R2-D2 yeah and it's just like rolling is it it's not R2D2 what about the new one which one is the new one the new one in the new series the one that is actually spherical oh I don't know the name of that one okay anyways so this one what we want to do as farad said we want to go ahead and start on the left side and we want to go all the way to the right side so if you've ever worked in any editing software then you would know that you have to use key frames and key frames basically are snapshots in time that say at this specific second at this specific frame these are the properties of my object so first things first we need to add our object into to our sequencer there's multiple ways you can do that farad can you tell us what is one of the ways you can do it one of the ways is click that track plus button at the ADD but like the add icon and then the track yes so and then and then you could see actor to sequencer the first one so we have all of these different things that we can add for example we can add an audio track but as far said we want to go ahead and bring an actor right remember when we merged actors right your objects can also be called actors so actor to sequencer and the object that is selected will be automatically appearing on top of our list if we didn't we can search it we can search it here so sphere right which is the same one at the Top If youve notied now multiple times within on new engine 5 if you have an object selected it's going to pop into the other sections when you're trying to call it right so always try to select the objects you want to call and then at the top it's at sphere okay we're going to hit it now we got it over there now we got it over there I'm going to delete this really quickly and it's asking me do you want to delete this are you sure yes we do far what is another way can bring in the object I think you deleted the sphere oh yeah okay that's why it was asking you're sure sorry do not delete the sphere don't have the sphere selected here you just want to select it here in the sequencer and then delete it from here actually that's a good problem to have because you guys have to understand the difference sorry I had to read the error message okay F what is another way I can drag the sphere in here drag and drop absolutely so I have this sphere selected I can drag it from the outliner and drop it into my sequencer just like that so two different ways you can bring in the objects track actor to sequencer or drag and drum so once you have your character here as you notice what your actor we have the name right here called sphere and then underneath it we have transform do you remember where else we had transform in details panel absolutely so it will consist of your location rotation and scale and you can animate any of these parameters absolutely and these are not the only things we can animate the reason why the plus icons exist on the right side is because you have more options now they're kind of complicated and we're going to touch on them in a moment but for now just wanted to let you know that you can explore them later on so for now let's just go ahead and talk about location cuz we want to move the sphere so at zero frames this is in frames by the way so we're talking about zero frames and if you go all the way to the end I'm just dragging my timeline right now and just looking all the way I can go all the way up to 150 frames that's because we are 30 frames per second that's 5 Seconds absolutely so this is 150 frames that means our render stops right here if I want to go ahead and actually pull this longer I can go ahead and just drag this I think it's red I'm color blind but that marker is basically defining how long our animation will be so I can just leave it at any specific number I want um and then I can go back to the beginning of my frames which is zero by clicking this button and what I want to do is I want to say okay at zero frames I want to go ahead and key frame this EX exactly this position is going to be where I want to be at 0 seconds and zero frames so I can go ahead and hit the plus icon there's another plus icon right here as you can see beside every one of these parameters which means hit and enter a key frame the shortcut for it is enter literally as soon as you bring your mouse here click on the timeline you can hit enter to enter some key frames or alternatively contr contrl Z for undo you can go ahead and manually click any of these now if you go ahead and click the ENT on or or this button on transform it's going to create a key frame for scale rotation and location if you're changing all of those variables but in this case we're not so we're only going to be doing the key frame for location so hit this exact button right here we have the key frame we can zoom in by control scroll and zoom out by control scroll as well and if you need to move around the timeline the way you can do that is by hitting right click and dragging yourself just like in the mat seral graph do you remember that yep perfect so fire what should we do next now that we want to bring this guy over here so let's go to our final frame for example 150 is our final frame no it's not I pulled it I pulled it out so if you want to go to you can have it at 150 right if I want to have it exactly at 150 I can use this number right here so this number is defining the current frame we have our marker on so I want to go to 150 as farad said so 1 15 to be precise okay and where do I want to land and we want to move this sphere all all the way to the box right in front so now we have three ways of doing that we can well go ahead and drag this guy right here contrl Z we can go ahead and use these sliders as we learned before drag it right here or we can even do the same change Within These sequencer so I'm going to drop down my location I'll see my X Y and Z just like I do here same values and I can use these sliders and drag it across here far are we good with this yes okay so the advantage of using this ERS within the sequencer is that it automatically makes the key frame for you so you can see that I have now two key frames with a line connecting in between if I go ahead and pull my marker all the way back and press space I can see the [Music] animation now I'm going to hit space again to pause and then I'm going to hit contrl Z so that I undo if I were to use the arrow I'll have to manually enter the key frame because it still doesn't know if I'm done right or the same thing here so if you do that make sure you go ahead and hit enter on the location okay select it or you can also go to transform remember to put the key frame for everything it's up to you so at this point we have done this animation and you also notice that you can see and visualize the path upon which the sphere will travel and you can see it clearly now let's say I want to go ahead and make some more changes to my animation fire what kind of changes can we make we can maybe scale the sphere while it's go all the way to the spaceship absolutely so that's very simple right we can go all the way to the beginning and say hey I have my scale at one so let's go ahead and key frame that yeah or maybe actually this time around let's inverse it I want to start at I want to stop at one so I want my scale to be this at the very end so I'll go to my next key frame now this is actually a very good lesson there's multiple ways you can go ahead and control scroll and Eyeball where your next key frame is if you want to be exact or this is going to come in real handy these Arrow buttons beside the key frame are actually saying go to the next key frame wherever that is so right now this key frame is on my location right so I want to go to the next key frame I'm going to hit this arrow and it's going to exactly land on where I want to scale so I'm going to say I want this to be one so I'm going to go ahead and hit the key frame button on my scale and I'm going to go all the way back with this button to frame zero and I want to say I want to start at Z 0.1 0.1 okay 0.1 so I'm going to hit 0.1 for this and then I'm going to click that contrl + C and then paste it into the Y and Z as well and right now we can see our sphere is extremely small and if we hit space look at what happens wow we're scaling beautiful now that we have this specific animation we can go ahead and make more changes using a graph if you come from other 3D software you'll be familiar with this but you can imagine when you have a human walking and you want to be really precise with the way the animation is working per bone of the animation you're going to need to work with a graph and the way you access that graph is right here with this button so if you go ahead and press this we'll see now that we have the sphere and then if you click that we'll see the actual graph that is demonstrating to us the motion of the sphere now don't be intimidated by this we'll explain to you exactly how it works so first thing we're going to do is drop down a transform and then we know that we're working with location and scale right so technically if you were to click rotation look at what happens we're just seeing a flat line nothing happens nothing changes exactly so if you worked with graphs before on both scales nothing is actually happening but if you go to our location and drop it down technically we're moving in one axis right so technically two of our axes should have no changes and that should be our Z because we're not moving up and down in space and our y because we're not going left and right well left and right from where I'm looking but if you look at our X we'll actually notice the movement we're making in the x- axis so sometimes depending on how big that movement is your graph might not even the the beginning and the end might not fit so let's say that's the case you can use this button right here to go to a normalized view which is going to bring everything between 0er and one so it's going to compress all those values so that you can visualize the beginning and end of your graph so honestly this might be confusing if again if it's this is your first time but it's really not that difficult pay close attention we're saying this is our sphere okay I'm looking at it right now and this is at the very beginning this is its location in the x-axis so I'll go to the very beginning us using this button and I can now move this to change where it begins quite simply right and also I can do the same thing if I go all the way to the end and then I find my sphere so this graph is just defining where it is so I can just move this so this is just playing with these values that we key framed earlier on so you can be really precise with your movements so I can just come here and say okay I wanted to land exactly in front of the door which is right here what if I want to change the speed of the ball that's a very good question I wanted to start accelerating much faster but at the end I want it to be really really slow okay cool that's a very good question and we're going to do just that cuz right now if you take a look at our graph what this what this basically shape is telling us is that we're starting slow right we're starting flat and then we're increasing our speed over time and then as we come closer to our end we're also slowing down again we're slowing down again so farad is saying you want to speed up quickly in the beginning right you don't want to speed up or you want to start with a high speed yes okay so if you want to start with a high speed you want to go and change these points cuz right now if I were to change these points I can only drag it down which works but if I want to go ahead and make it larger or smaller I can I can make it faster sure that works but if you want to have full control over this you can select both key frames go to this Arrow right here and then change to weighted tangents these are just different ways the points can be treated so weighted tangents in Onre engine allow us to fully control these handles they work extremely similar to the rig rail of our camera if you remember how we were controlling the handles same thing here so I can say Okay I want to pull this all the way up so this is going to start real slow and then shoot real fast check this out real slow and then super fast and then stop this shape is basically showing us that or as firad said when you want to start super fast and then go slow am I right so this is precisely that so check it out I'm going to hit G to remove the overlays and I'm going to press play did you see that wow did you see that yep okay boom just like that we controlled it okay so we can go ahead and do the exact same thing with basically our scale so we're going back to our scale we change all the X Y and Z so if I'm unhappy with how small it is I can click all three and now I'm basically looking at all three I can just go ahead and drag this guy I'm not happy with how small it is I want it to be bigger and actually I'm going to zoom out control scroll this is my end this is my one right I want to bring this I want this to be bigger in the beginning so it's actually much bigger like that and then it's going to get smaller so check this out press play boom boom just like that and now we're going to go ahead and hit save and exit the graph now guys the graph itself can take an entire course and we're not trying to teach you just the graph we just wanted to teach you guys the basics so that you know how to make changes to your animation let's animate now something for real let's animate the door of the spaceship okay so when it comes to animating the door of the spaceship fad to be very honest with you this is going to be much easier because technically we're not really changing anything we're not making the animation ourself the animation's there we just have to call it so from from your experience how do we call the animation first what do we need to do first we need to bring the spaceship to our sequencer hold on did you guys know you can speed up your workflow by using poly Cam's photogrammetry instead of modeling and texturing yeah you just snap a couple of photos a voila plus your objects will automatically look photo realistic because they're actually real shout out to polyam for sponsoring this course and giving you guys 30% off the Pro Plan promo code and Link in the description so far how can I goad and add this spaceship into my sequencer it's very easy select the spaceship uhhuh click plus track actor to sequencer and you will see it up there perfect oh why do we have an animation row right above transform well the sphere didn't have it this time we do have it because first of all this is a skeletal mesh so it's bound to have an animation because it has armatures and unre engine knows that therefore we have the animation layer now all we have to do is go to the plus icon remember we told you guys the plus icons always have more compartments check it out we have the plus icon and we can already see the animation that belongs to this Armature and we're going to hit it and just like that we see a little bit of a change to our spaceship because it just went to frame zero of its animation now we can go ahead and press anywhere on our sequencer to make sure we select it it wouldn't work if we select our viewport press your sequencer and hit space to watch the magic happen but faras I want to play only the last seconds of the animation yeah it is kind of weird right now because we're starting with the wings inside the floor and so the way we can fix this as far mentioned is to just pull this back it's as simple as dragging it and bringing the animation before frame zero so we don't see it ever so we're going to go to frame zero and then just pull this back to maybe just just right here before these guys the legs the legs are in the air yes okay so here okay perfect so now if we hit space look at what happens so at the beginning of our animation we're going to see the door of the spaceship open that is beautiful amazing that is wonderful let's animate our Storm Troopers okay very cool so I'm just going to go ahead and delete this sphere cuz we don't need that anymore we have the the the the spaceship right now animated and the next thing we want to do is animate our Stormtroopers so here what do we have to do first of all we have to go ahead and bring in a stormtrooper skeletal mesh remember the ones we have in the Army right now are static Mish so we can't animate them we can't we can't have animations on their bones cuz they don't have bones we can move them but they're going to move like a statue so we're going to go to control space we're going to find our Stormtroopers and as I told you guys before as my default I always like to bring in the skeletal mesh which has no animation attached to it and once you have your skeletal mesh all you have to do is add it to your sequencer yes add it to your sequencer pay attention ption okay so we're going to drag this T animation that's the name of it into our sequencer and as soon as it's there again it's a skeletal mesh so we have the animation layer so if I click the plus button now I should see all the animation that we brought from mixo yes so the more animations you have the more choices you will have here okay and it's really as simple as just choosing the animation you want so's choose walk want walking absolutely and let's see what happens so if I just hit the sequencer and press space oh [Music] cool Okay cool so there's a couple of problems that we need to solve number one it's walking in place but that's precisely what we want if you remember but the second problem is that the animation is extremely short we need to Loop it so by default the best thing about mixo is that these animations the walking animations are loopable all you have to do is just repeat them and repeating them in onreal engine 5 is really simple all you have to do is drag the timeline of your animation so we're just going to go ahead and pull this back so we start from frame zero so it's going to snap and at frame zero we have the walking animation now all we have to do is just go ahead to our walking animation and just pull this top layer which controls the entire animation as long as we want and we're going to see the loops happen with these vertical lines but if you go over them you'll notice that there's no jittery movement there's no snapping it's looping perfectly so we can make him walk for Miles without noticing any breaks so we're going to pull this all the way until the end of our animation uh timeline and then we're going to hit space and see it but we need now our stor Trooper to move from point A to point B absolutely and that's exactly what we're going to do and it's just going to be about you eyeballing it and just knowing one trick in the sequencer which we're going to teach you right now so first thing we're going to do is we're going to go all the way back we're going to rotate this guy cuz we want him to be moving towards the spaceship right so we're going to rotate him on the Z axis for 90° and we're going to have one of these guys here I'm going to bring this guy over here and I want to duplicate this guy because I want two of them and we're going to bring this guy over here okay this guy will have no animation right now cuz he's not in the sequencer we're going to worry about him later I just wanted to have him there so starting with the first guy right he is starting from here and we want him to move to here so very similar to our sphere we need to go ahead and animate his location on the xaxis we already know that so we're going to pull down the transform and we're going to go to location and on the x-axis we're going to drop a key frame and then we're going to move all the way to here where the door has opened and then we're going to say I want you to move to the right side here so we're just going to go ahead and use maybe the arrow just so I can be precise where where I want to go and then I'm going to go ahead and hit the key frame button one more time the key frame is created and I can see the line connecting them now let's go ahead and play this back and see how it looks it's probably not going to look good press space Oh my god it feels like those escalators in the airport when you walk it feels exactly the same way so there's a couple problems number one if you notice the sliding is happening which is because the movement in the x-axis is far more than the amount that he's walking right it's not compensating for it so we need to change that but the second problem is that far I do you no this the second problem actually I think because the animation is easing in and easing out we need a uniform motion because he's walking in uniform speed actually that is true so he's not starting to walk and he's not stopping at the very end he's walking for the entire animation so which means it's weird to have him start slower and end slower and accelerate in the middle we need a constant motion and in order to do that the shortcut for it is US changing the points remember how we changed the weighted tangents in the graph Editor to basically control it well right now it's ease in and ease out which I believe the shortcut for that the name for it is auto but we want to change it to linear linear means it's going to be constant motion so we're just going to do what we did in the graph editor but instead we're going to do it here in the sequencer we're going to select both of these points right click on them and then we can see the key interpolation options so remember we had the weighted tangent over there which we can access inside there for some reason the name is not here but we can actually just read this so by default you're on cubic Auto this is your ease in and ease out we want to change it to linear if we change it to linear which is represented by that triangle we're going to see that it's changing right the shape changes and let's look at what happens to the movement it's moving at a constant speed and then it stops right it's perfect this is precisely what we want if you change it to something like constant constant means there's no motion between it's just one and zero so look at what happens constant means it's going to stay there and then at the next cre frame it just jumps to the next one boom so different key interpolations means different motions so just remember that you can play with these we're going to go back to linear and now we need to fix our sliding so as you can see it's sliding forward which means it's moving too much so I need to go ahead and maybe either pull the end back or pull the front forward and I'm going to pull the front forward cuz I want him to stop here so I'm going to have him start somewhere here and then I'm going to go ahead and press the key frame again to update the key frame at frame zero and let's see that far much better but it's still sliding still a bit okay so let's go back and let's have him start here maybe and I don't need to press the key frame cuz I use the the actual key frames in the sequencer oh much better sliding still sliding still sliding still sliding a little bit okay let's try this okay sliding still sliding yes just a bit okay now it should be perfect yes yes look at him his foot is stuck to the ground okay amazing that is fantastic now I don't like the fact that my animation is going for so long I'm going to end my animation right here when he reaches the end and when the door opens so check it out one more time from the beginning let's check it out wow wow congratulation guys you have animated the door of the spaceship and animated the Stormtrooper now F what I want to do is go ahead and do the exact same thing for the other Stormtrooper now there is a way to make this faster show me okay so we can actually go ahead and copy his motion onto this Stormtrooper so we'll go to his animation right click and we're going to hit copy and then we're going to go and bring this guy to our sequencer cuz he doesn't exist there so we can go ahead and drag him and drop him right here he has the animation layer but it has nothing so let's try to go ahead and right click and paste animation and see what happens so look at that oh can we copy the transform as well absolutely we can so right now we have already copied the motion and now we're going to go to our transform right here we're going to go ahead and right click copy and then we're going to go to our transform down here and we're going to go hit it right click and paste now if you play this look at what happens we have a slight problem and the reason that happening is because we have two transform layers we have the old one and the new one check it out we have one transform at the top here it's being blocked by this 61 items I wish I could hide it but basically there's one transform layer here and the new one that we pasted all you need to do is just go ahead and delete the old one to have the transform work correctly so delete it with backspace or delete and then if you go back and play this you're not going to notice the second Stormtrooper because he's actually hidden not hidden it's right they're all on top of each exactly they're on top of each other so what okay that sounds wrong but what we need to do is go ahead and just separate them so if you go ahead and click the second Stormtrooper technically there's no animation on the y axis so if I were to open this up in the y axis if you notice there's no key frame so all I have to do is just pull this guy to the other side amazing right I don't even need to press any key frame because I have not said change the Y AIS Conant y yeah it's just the same y so all I had to do is just pull them to the side and it's going to be the exact same animation if I play it so I'm going to go here play this and check this but this is a bit odd we never have exact animations can we have some offset on one of them yes you're absolutely right cuz they're they're precisely the same right okay so let's go ahead and do that it's very simple honestly first of all we can just go ahead and have this guy right start with a bit of a different offset on the animation so if you go ahead and look at the animation layer for this guy it starts precisely at zero just pull this animation so this guy is maybe walking with the other foot or maybe he's like somewhere in the middle something like that and then if you play it their position is the same yes now it's much more natural yes but they're walking differently yes right yes much more natural this is perfect this is so cool congratulations guys you have animated the door of the spaceship and also the Stormtroopers wow so you basically learned the basics of animation and you now know how to use the sequencer to move anything in your scene in the next chapter we are going to set up our shots the shots that are going to make our cinematics are we ready I'm absolutely ready because this is where we take everything we learned and then go ahead and pour it all to create this Dope video so see you guys in the next chapter ciao
Info
Channel: Bad Decisions Studio
Views: 19,459
Rating: undefined out of 5
Keywords: unrealengine, unreal engine 5, unreal engine, ue, ue5, Unreal Engine Tutorial, Unreal engine for beginners
Id: -EfwF0WgKbs
Channel Id: undefined
Length: 30min 21sec (1821 seconds)
Published: Thu Mar 14 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.