Unreal Engine Masterclass: Animate Environments The Easy Way

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I think a lot of people misunderstand why Unreal Engine is so powerful for visual effects in filmmaking look there is no reason to use Unreal Engine if you're just gonna render out still images the biggest advantage of using Unreal is that you can render entire sequences in minutes when the same thing would take you hours or days in a different 3D software and there's been some incredible environment art coming out of unreal five but when you see sequences there's nothing moving inside of it and if you want to use unreal to make movies just like I do you need to make your images move so if you want to transform your renders from still images and static scenes into something with life animation and movement then stick around to the end because I'm going to go over eight different techniques that are simple and repeatable in all your projects going forward what's up my name is Josh TuneIn and for the last eight years I've been working as an artist and supervisor on Hollywood films and I've been using Unreal Engine on set and to make movies of my own and right now filmmaking is still really hard and complicated and unreal but I want to take what I've learned over the last year and a half and make it as simple as possible so let's just jump right into it so starting off we got this awesome scene this was actually created by Justin coulon who was someone I worked with over in the vad department at pixamundo and we were part of the team building the underground Temple environment for Led walls he made this as a personal piece and was kind enough to let me use it as an example for this lesson so shout outs to him so if we wanted to start animating an outdoor scene usually you'd start with blowing grass or trees something moving in the wind but because everything in the scene is hard surface we have to start getting creative right away so what can we add movement and animation to inside our scene well the first thing that I can see are the ships in the background we can have those flying through the air next we have our character here which characters can be kind of daunting but I'll show you a really simple way to add animation to our character we can also animate our camera so we can add a little bit of camera shake and a simple dolly in but by giving it some handheld movement it'll really ground our shot in reality the next thing we can do is add movement to the clouds just so everything in the scene is moving and it's Dynamic and stick around if you want to learn some some of my best tricks with Niagara particle systems so we can create some steam elements that we can populate throughout our scene where we can take one Master System and give it a couple user parameters so we can change the size and speed as we populate it around first off let's create a new level sequence and we'll call this LS animation and now I'm just going to add my camera into the level sequence so you can do that and if there isn't a camera already it'll automatically create a camera cut track as well that way we can view this camera without worrying about moving it when we click this little camera icon here otherwise you can use the shift C hotkey so the first thing that we can see here is the two ships flying in the distance so let's start off by animating those flying through the air so I'm just going to select one of the ships and I'm going to press the F key so that I'll teleport towards these objects we can see that there's two different objects here they're not grouped together they're not the same mesh so one thing I'm going to do right off the bat is I'm going to create an empty actor and I'm just going to drag it on top of our ship here now I want to take the two objects that create the ship and just parent them to our actor so I'm just going to click and drag them in the outliner you can see it won't let me do it at first because they're set to static so I'm just going to change these objects to movable empty actors are movable by default and then we'll just do the same for the other ship and we'll just call these ship one and ship two now if I click on the camera cut we'll see our original camera angle now let's add our empty actors into sequencer so I'm going to select these in the outliner and hit the add track button to the sequence and then hit add current selection so now that we have these in our timeline let's talk about how sequencer works every object in an unreal scene has so much data all these different variables and parameters Associated to each one so to change anything in sequencer we have to manually tell it to Define and expose a certain parameter before we can change it so let's create a simple flying animation let's click the plus icon to create a keyframe on our first frame and then let's jump to frame 150. we'll actually want to set our sequence to 24 frames a second and we also want to press this snapping button this makes it so wherever I drag in the scene I'm snapping to a frame as opposed to the subframes that would exist in a game engine so I want both of these ships to move forward at the same exact speed so if I select my empty actor I can see they're moving in the positive x-axis because the red arrow of the transformation Gizmo is pointing forward there so in sequencer let's add plus 40 000 units and set a new keyframe so I want to do the same thing to ship two and because it's so much further away even though we'll add the same amount of distance it should appear to be moving slower which will help the scene feel bigger but when we play this one problem that we have is the ship's ease in and ease out at the beginning and end of our shot because by default unreal creates Auto bezier keyframes so in order for these to animate perfectly straight like a ship would we just need to convert these to linear keyframe and we can do this by selecting our keyframes and pressing the four key now when I look in the curve editor you can see we have a perfectly straight animation awesome now we have our ships moving next up let's add some movement to our character but one thing that we can see here is that our character here is a static mesh it's not a skeletal mesh and in order to apply animation it has to be a skeletal mesh we do have a skeletal mesh version of our character here but we don't have any animations and I go more in depth about character animation in my last video so make sure to check that out if you want to learn more and in that video I took a model that already existed from mixamo.com and imported that into unreal but here we have a character that has a rig but it doesn't have the same rig as miximo so we could just import our character into miximo it'll create a brand new rig and then apply that animation to the rig or we can retarget that animation to our existing skeleton so I'm gonna very briefly show you how to do that and what I'm gonna do is right click it go to asset actions and I'm going to export this as an fbx I like creating a round trip folder if I'm going in and out of unreal and unselect level of detail we don't need Collision or morph targets or anything and in fact we're going to lose all of our rig data so what I'm going to do is I'm just going to import our worker rig into blender and I'm going to remove that rig so we have our worker rig dot fbx we're going to import this and because it's blender this will be brought in as an Armature so we'll just take our worker rig we'll just drag it off and then we want to just delete our our mature modifier and now we can just export this again as an fbx now we'll have our mesh that we can import right into mixamo.com so we're going to select our rig list version of it and because we've removed our rig we're going to have a new auto rigger that we'll need to add to our character so now it's going to compute and we'll have a rigged version of our asset that we can now apply any mixable animation to all right now this is complete and I know there's a couple animations where we can have our guys standing and doing some keep alive animation we want to export this with skin at 24 frames a second so now we can hop right back into unreal let's import this as a brand new skeleton in a brand new skeletal mesh so we're gonna select skeletal mesh import the mesh leave the skeleton blank so unreal knows to create a brand new one and we're going to change the material import method to do not create materials and import all and now you can see we already have an animation applied to our character we can add our skeletal mesh into the scene by just clicking and dragging or rotate him into place and now that he's a skeletal mesh instead of a static mesh we can add him into our sequencer so add actor to sequencer and then it'll know to create an animation track so from here you can see we already have our animation assigned because it'll automatically generate that list and now when we press play we have our character animated inside the scene and now you can see it's looping and very quickly we already have our character animated we have these ships animated but now let's add different environmental effects like the clouds moving birds and smoke and atmosphere in the easiest way possible so to start adding Cloud movement into our scene this using a plugin called Ultra Dynamic Sky which I also used on that samurai sword fight can't recommend it enough it's a great sun and Sky system it has some really awesome features it can be pretty complicated but a lot of the basic settings are up here at the top and we don't want to do animate time of day we want to animate our clouds only so if we go to Cloud Movement we can very quickly set this to one and by default this randomized cloud formation on Ron is checked to true we want to set this to false so every time when we preview our animation it'll start at the same exact spot so a really important note here we're going to render through movie render queue in order to get an accurate understanding of what unreal is going to render you actually need to play or simulate your game this causes a lot of issues when rendering but this is what's happening under the hood if you're simulating and you're trying to dial in your settings I'm adjusting the ultra Dynamic sky and if you right click here you can keep your simulation changes or just press K as a hotkey and this means when I press stop here it's going to keep that cloud speed that I changed while simulating so now I want to briefly go over Niagara particles systems and the different ways that we can create smoke so I'm not going to go through and create these smoke elements from scratch but I want to cover the techniques that you can apply to any Niagara system that will still keep them very simple and lightweight but allow you to move them around and customize them so you can have these Dynamic elements that you can move around so there's two different techniques going on here and both of them are using Sprite sheets one of the biggest limitations of real-time render engines are the texture memory so a lot of times it can be difficult to bring in raw video into a game engine so typically you have to find some way to optimize them and bake these things down into images and that's where Sprite sheets come into place so what's going on in this system here is every particle that's spawning is randomly picking one of these images we have a 4x4 grid here so we have 16 total images and because our smoke is spawning so quickly you don't perceive that we're just picking random Sprites out of this content attack sheet so in our Niagara editor all that we're using to drive this is this sub image index and we're setting a random value per particle between 0 and 15 or between 1 and 16. we're just starting at zero instead of one and then if we go into our Master material to see how this works the specific thing that we need to use here is this particle sub UV so this looks just like a texture sample except it's a specific node used to talk to our Niagara particle system so if I type in particle sub UV you can see it's under the particles menu which also could just be known as Niagara and because we're using this node here in our material graph Niagara knows to look for this and knows that it can modify this data where it can't do that from a texture sample alone so we're just taking this texture sample and then bringing that into Niagara we're setting the sub image index between 0 and 16 and then lastly in our Sprite renderer we're setting our sub image size to four by four and with these four things in a row you need every single one of them but when they're working together we get this pretty natural feeling particle system and now we can use these to dress them throughout our scene the other method is to have animated Sprites so this is a similar idea but the execution is just a little bit different so instead of picking a single random image out of a Sprite sheet I've actually converted a video clip into an 8x8 Sprite sheet and instead of picking a random image per particle it's actually animating through here and playing it back so each particle is animating they are the same exact Sprite but because they're evolving and they're moving and getting bigger over time you don't quite see where one particle starts and the other one finishes and the only difference here is we have our sub image size set to eight by eight and instead of using the sub image index there's another particle update node that we can use called sub UV animation and this will tell it not to pick a random image but to animate through the entire Sprite sheet in a row so it'll emulate the idea of video playback but when it comes to texture memory this is still just a 2K image so we're not overloading our GPU we're not loading in a 2K image for every single frame we're loading in one single 2K image and then we can populate this anywhere in our scene and there's almost no limit to how many particles we can have in our scene now because we've prepared it in this way and now that we have these prepared it's very easy for us to drag these around anywhere in our scene and start to add different clouds and steam and smoke and depending on how fast and large the size of the smoke is it'll give us a sense of scale in our scene so the next thing that we can add are birds but birds are a great thing in any naturalistic scene which will just give you a sense of scale the smaller the birds are in the frame the larger your scene is going to look so we have these These are from the Legacy system you can get packs like these from the marketplace or build your own but essentially they're just swarming particles with a simple Bird model that's just flapping its wings and you can see here it's a it's a small thing but you can now drag these around inside your scene and I'm just going to change their color to Black here so they really start to cut out against the sky and we can even slow these down so I wouldn't recommend trying to dig in and learn the Legacy particle system Cascade definitely just focus on Niagara it's just much better so now by populating these around throughout the sea now our sky is already feeling extremely active compared to where it was just a few minutes ago and now if we want to take that steam system one step further we can actually parent this to our ship actors we're going to drag this in so it's by our ship we'll probably have to make these a lot bigger and one last I'll call it a secret with Niagara just because I haven't seen it too much but it's by far the most useful feature is setting up different user parameters so there's this little user parameter section in every Niagara system where you can add in custom variables most of them just are float variables which is just any number and then you can set up you know things like opacity size spawn rate and link them up anywhere here by just dragging down here and typing in any user variable that you've created and one thing that we can do is change the lifetime but I don't have a custom parameter set up here so all you would have to do is we'll create a new float we'll call this lifetime and in initialize particle is where the lifetime settings are so you can see right now it's set to 16 so I'm going to set this to 16 by default so it doesn't mess up any of my other existing smoke systems and now I'll set this to Lifetime so now the lifetime variable is linked here we know it's 16 by default but now if I hit save and I go back into my scene we have this we have the smoke emitter here we'll now have this new variable call Lifetime and let's change this to something way different like 35. so now all of our other systems are exactly as they were before but now we can have custom variables for this one single system now let's parent this to our ship actor all right well this is looking cool we have a lot more movement and life inside of our scene but the one thing that isn't moving is our camera so let's go through how to set up camera shake for our cameras so unreal does include a camera Shake system so if I want to add a camera Shake track you can see that's here but there's nothing created by default so this can kind of be hidden at first but it's just a couple clicks here all we have to do to create a camera Shake blueprint is we want to create a new blueprint class and then we don't want any of these common ones we want to type in camera shake and we'll scroll down here to default camera Shake base so let's call this VP camera Shake medium and now when you open this up you'll see that we have this purlin noise camera Shake pattern if this doesn't show up sometimes when you first open it it'll look like this and it's a little confusing because you're thinking where are all the settings they're just under this little tab here essentially what we have is we have location and rotation settings so let's add this camera check blueprint into our sequencer so we can start seeing the results now in our sequencer let's add a camera Shake track we can see now we do have this blueprint class and if we expand here we'll see by default it comes in really short this is just because the timing the duration is set to one and this is set in seconds not in frames so you can just set this to a very long time like 150 seconds and now if we click on this little camera in our camera cut section now we're previewing the camera we can see there's still not much movement but if I change this location amplitude to something cubed like 20 we can see that you know what actually our camera is moving it's just our scene is so big that we're not really seeing that move in so it's nice to have a little bit of location movement but the big thing that people associate with camera Shake is actually rotation so if I set this to even one rotation is a lot more sensitive than location because it's one degree of rotation our camera is already a lot more bouncy if I set this to five we'd have this in five degrees and we're getting some intense Shake here and then frequency is what it sounds like it's the speed if I set it higher it will go faster if I set it lower to 0.1 it'll go slower so now we're at 10 percent of our speed if we're at 0.1 as opposed to the default of one the biggest thing you should be aware of and what makes the camera shake the most distracting is the amount of rolls so the role if you think of a plane doing a barrel roll do a barrel roll twirling around typically this is what's going to make you feel most uneasy this is still very intense obviously but just by removing that at least everything is framed up as it was before so let me set this back down to one I'm going to change the frequency to 0.5 so we have a bit of floatiness but it's nothing too crazy and now you can see we already have some pretty naturalistic movement it's very easy to go overboard here but if you don't get any depth and Parallax by translating your camera through the scene it's still going to feel pretty static like right now it's just a person standing here with maybe a shoulder rig a handheld camera but the camera itself isn't adding any depth into the scene so what we can do here is just set some transformation keyframes so I'll just set a location and rotation and then I'll go to the last frame and instead of looking through our camera cut if I click the camera icon next to the actor in the scene this will make it so we can pilot our camera and now if I right click in the viewport and I move slowly through the scene we can start to reframe our camera in a way that still looks good and makes sense and a quick tip you can increase or decrease the speed of your camera through the mouse wheel going up or down or you can use the camera speed on the top right of your viewport and then lastly we'll just create one more keyframe for location and rotation and now we have a nice simple but believable camera movement and then one last thing I would do here just to give us a little something extra it's always nice to have something extremely close to the camera we don't have anything in between our character and the camera so as a last step I'm just going to take some smoke let's duplicate that and move it close to camera especially if it's something that we can kind of pass through and if you scrub you can see exactly what that camera is going to do which will also help us reframe where we want that smoke to be and now we just have a little bit of extra movement and life in our extreme foreground nice and subtle but believable so let's do one last check just by simulating our game and seeing how it looks and everything seems to be working as intended as you can see this the smoke particles take some time to boot up so let's go into movie render queue and set up our final render settings so the way you'll normally do this is you would go and click this Clapper board if you don't see movie render queue and you just see movie scene capture it's because we need to enable the plugin so just go to the plugins menu and type in movie render queue and let's turn on both of these and then just save your project and reboot it so now with movie render queue enabled let's press our Clapper board and let's go into our config settings for most situations especially just getting started we can just render this as a PNG sequence otherwise you would be rendering this as an exr sequence but I think for most people this is going to be the most common way to do this and then we can override our anti-aliasing and set this to temporal super resolution you typically want to change your temporal sample count to something like 8 or 16. but one thing worth noting with our camera shake that we've added camera Shake happens on every tick that movie render queue is going to render so what that means is is that if we're rendering 16 samples for every one frame our camera Shake is actually going to go crazy it's going to play 16 times faster than what we would expect so if you do want to use that as your render settings you just need to open up the camera Shake and you'll just want to change the frequency of everything so if you just do one divided by 16 this is how fast you'd want that playback to go and the one thing we want to do is we want to include some warm-up frames so in our case we just need our engine warm-up count so our ships require quite a bit so I'm going to change this to a high number like 512. anything in the engine warm-up count it's not actually rendering these frames so it's fairly quick we'll just take a few extra seconds and a lot of times I'll just add this game override so that we force cinematic quality settings and then from here all we have to do is hit render local and we're set and here's a look at the final renders for these shots so leave a like if you learned something new And subscribe if you want to stick around because I'm breaking down the entire behind the scenes of the animated film I made for tesseract's music video for war of being with over 5 minutes of Animation completely made inside of unreal I'll see you next time
Info
Channel: Josh Toonen
Views: 51,039
Rating: undefined out of 5
Keywords:
Id: 4-_mXW1Vwuo
Channel Id: undefined
Length: 22min 52sec (1372 seconds)
Published: Thu May 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.