Making a Vehicle Animation In Unreal Engine With Rush Hour

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hey, today I'm gonna walk you through creating an animation just like this, using Rush Hour. Along the way, I'm gonna share tips and tricks on how to improve your workflow, as well as some tips that I've learned about how to do better camera work. We're going to be using Rush Hour Vehicle Animator plugin, and we're also going to use the MAWI Burned Dead Trees Forest Biome. Jae from JSFILMZ recommended this environment to me, and it really does stand out. It even comes with an on-fire version, which creates a really dramatic scene to drive through. In Unreal, I've actually gone ahead and already moved a lot more fire around, placed a lot more fire just to create a more exciting track. And as we move through it, we've got embers and this is just gonna create a really great dynamic environment for us to work in. So to begin, we just wanna make sure that we've got Rush Hour enabled. Go up to edit plugins and type in Rush and make sure that Rush Hour is enabled. If it's not, press this button here and it will come up down in the bottom right, asking you to restart Unreal. Go ahead and do that, and we'll be come back to the editor. So now Rush Hour is enabled. Let's start by creating a path. So if we come up to this plus button up here, we can go to all classes and type in vehicle and we can see that we've got this vehicle animation path. So let's just click and drag that in and we can see that it's starting here and ending here. So we'll just quickly rotate that so it looks along the road a bit more. And we might actually just move it a little bit further up this path. So come back to the move mode and drag it up and rotate again. So now one trick I like to do when placing it is it can be kind of annoying to do this in the 3D view port. So I come up to perspective and go to the top down view port, and if you zoom out, we can actually see where the road is along this map. So we'll scroll in to where we've placed a path so we can see the path up here. So we can see that there's these two points on the path. If I click on the one that has the stop sign, we can see that we've got the manipulator for this control point. So if we zoom out, zoom out a little bit, we can hold T and drag off this point and we can see that it's left that original point there. But it's created this new point and the stop action has moved with this new viewpoint. So what we're gonna do is we're just gonna go right along this path, and we're just gonna drag out, keep creating this vehicle path along this road, and we'll just quickly get that done. Every time that you do this, you wanna hold alt drag to the new point and then release alt. In the process of doing this, if you notice the path becomes a bit twisted or a bit tangled, that just means you've dragged the mouse back as you've done it. So if you can either click on the new control point and press delete, or you can press control Z, and it will undo that point, and just make sure that when you are dragging the new point that you drag away from the existing path. Okay, so we've now finished placing the path. I'm pretty happy with how it looks at the moment, but there is a few strange kinks and bends that are gonna impact the animation. But what we'll do is we'll play through, watch the vehicle perform, and we'll make any adjustments to make that look a little bit better. So we'll come back up to the top button up here and go to perspective again, and we're back to where we were looking at the vehicle path. So make sure you've got the vehicle path selected. And we're gonna scroll down to the vehicle animation path section here. So there's a few things we wanna do here. First, we're gonna change to the racer profile. We want this to be a fast, energetic animation. So Racer is going to be fairly controlled, but also quite fast. Whereas frantic will be a little bit less controlled and Sunday driver will be a bit slower. At the moment we wanna just stick with Racer. For the vehicle type, we are just going to choose the BP_Sedan_RH, which is the sedan that ships with Rush Hour and also the path defaults to 100 miles per hour. So we'll just come down to this reset speed and type in 200 and then we'll come up and press reset Path Speed. And that goes through every single control point along the path and sets the speed. Otherwise, you could click on an individual point and expand out the selected points part and go to the vehicle path, and you could change, uh, speed at any of the individual control points. This setting down here, this reset speed, allows us to quickly reset the whole path to a consistent speed, so that just sets the target speed. The AI will automatically slow down at corners according to its training. One more thing we'll do is we'll just make sure that we are using the correct game mode. So Rush Hour comes with a few different game modes, which, uh, allow us to have a few debug cameras to quickly see our animation while we do it. So if we just come up to window and come down to world settings, you'll see this world settings tab pop up down near this details panel. And under game mode override, we just wanna sh choose BP_RushHour_Spectator_Gamemode. So we've set the speed on the road, we've selected the car. There's one more thing we need to do. We need to press a line to ground, and that will just make sure that the path now doesn't hover too far over the ground. It'll sit about half a meter to a meter off the ground, so that aligned to ground function. Just make sure that the path now follows the road and will allow the AI to sense the elevation of the road and so on. So if you scroll along the path, you can just see that it's now got elevation to the path rather than all sitting at one level. So that's fine. And if we come back to the beginning of the path, we'll just hit play. So now when we click into the view port, we can press C to change camera around the car. This all comes from the game, game mode. And as we look at this car, we can see that there's a few funny corners. It'll probably collide with one of these poles. Yeah. Okay. So there's a few issues with this path, which we can quickly change up. So if we press escape, let's come back, uh, along this path. And yeah, so this corner looked a bit funny, so we'll drag that point a little bit around. That's a bit of a funny point there. So we'll click on this control point and rotate that. Maybe shift it out a little bit. That's also a bit funny, so obviously the car's cutting the corner a little bit here, so we can just shift this point out a little bit. Not too happy about that kink. If we just delete that control point that looks a little bit better, that might be just a better racing line. Let's see how that goes. Let's go back to hitting play. One thing I forgot to do there is I didn't press a line to ground again in this case, I haven't adjusted the points too much, but realistically, every time you adjust the path you should press that align to PA around align to ground button again. So, yeah, we'll just watch this car. That's all looking a little bit better. It's playing it a little bit safe at the moment, so we can change that pretty easily. So we'll press escape again. So if we select the vehicle animation path again in the details panel on the right, once again, make sure you press a line to ground. But also the vehicle was playing it very safe Just then, so we've got the driver profile, but we've also got this profile strength, so we can give hints to the driver to exaggerate how well it follows a particular driver profile. Path zero would account to it always going to the default driver. One would be fully acting like the selected profile, so if you wanted to make it less like a racer, you could make it like 0.8. Or in this case, we actually want it to act more like a racing car driver, so we can actually exaggerate that. So if we were to type in say, 1.4, that might be a bit extreme, but let's see how it goes. Let's hit play. So we'll change camera again to watch it from behind. Yeah, so the car's sliding a little bit more. But it's looking pretty good, so we'll just have to adjust a few of those points a little bit more. So here, I think it overshot just a little bit. So what we'll do is we'll drag that over here a little bit. Once again, aligned to ground up here was a little bit, a little bit too close to that corner for my liking. Let's try that. So a line to ground again, and let's, let's hit play. So we'll press C to watch it from behind again, and we'll just watch it perform. We're not gonna worry too much about whether the cast seems fast or not at the moment. We're just looking for a good, nice natural motion here. We can see that it's performing a little bit better. That came quite close to that pole, but it didn't hit, so that's good. So that's looking good. So the animation's starting to look a little bit better now. A lot of the sense of speed and momentum from this vehicle is gonna come from good camera choices, which we'll cover in a little bit at the moment. As I said before, we're just looking for a nice natural motion on the car and getting the broad strokes in that we want from the car so we can see that it's pushing those corners a little bit faster. We can see that, uh, it's got a, it's got a quite a weight behind the car. We can see that it's sliding a little bit. That's gonna all look good, I think at times the wheels even locked up a little bit. These are all nice things that are gonna be nice to show off in the animation. So now what we'll do is we'll actually record this animation. So we'll come up and we'll go to plugins again. We're just gonna make sure that we've got movie render cue enabled, which we don't. So we'll tick that. And also we'll make sure that we've got tape recorder enabled. So take recorder is enabled. So we're just gonna restart the editor now that those plugins are enabled and we'll come back and we'll record this vehicle. So now the editors restarted and those plugins are enabled. We'll come up to window cinematics and open up tape recorder. So this is open. Two new tabs, sequencer, and take recorder. Let's come across the take recorder. So within Take Recorder, we'll change it to record at the desired fps. I think it's generally better to match your final output FPS. But it will interpolate what you choose. So you could even record at 60 FPS or at different FPS value. But I think in general it's better to record at your desired fps. So we'll choose 30 fps there. And one more thing. When I'm recording a vehicle, I really like to avoid any hitches or low low performance in the editor. I really want to record the best vehicle I can. So what I'll do is I'll come up to settings up here and I'll change engine scalability settings, and I come down to low. It doesn't matter what computer I'm on, it just means that as many resources as possible are dedicated to making the animation smooth. This is especially important if you are struggling for FPS in your view port, or if you're seeing a lot of hitches. We really just want this as smooth as possible. So if we come up, we'll hit play and we'll immediately pause again. So now the vehicle's paused and we can start adding it to the take recorder. So if within take recorder, if we come down to source, And hit plus and go from actor and choose the vehicle that just spawned in. In this case, it's BP_Sedan_RH0. And then one more thing we wanna do is expand this out. Come down to BP_Sedan_RH in the sources part. Scroll down and make sure that we uncheck remove route animation. Without that, some of the vehicle attachments like the windows will not be in the correct place, so make sure that's disabled. Now we can hit record. And press play again. So now that's recorded. Press escape. Now you can go back to your preferred viewport settings. So settings, engine scalability, high. And now we can start mucking around in sequencer. The first thing we need to do is turn off simulate physics on one of the measures that was recorded. This is the same process as recording a vehicle that you've driven with a game pad. I have covered this in my documentation and in a previous video, so I'm going to gloss over it a little bit now, but if you want a little bit more in depth on how to do it, make sure to check out those other videos. But what we'll do is come into cinematics, takes today's date, and choose the scene. And we can see that it's actually got this other scene in here, this BP_Sedan_RH_1_01. So double click that and this opens up. We need to unlock this animation so we can make changes to it. And on the actor here, we can see all its different components that it's recorded. If we scroll down, we're looking for the skeletal mesh. In this case it's called vehicle mesh. And now we can see these details on the right and come down and make sure you disable, simulate physics. Press save on the sequencer, and now we can close sequencer and that sequence is right to use how we want. What we'll do now is we'll create a new level sequence. We'll come into cinematics and we'll go tutorial, and what we're going to do is we're going to first add the car back in. So we're gonna add a shot, track shot, and we're going to look for this BP_Sedan_RH0. Scene 1 0 1. So now that we've added this shot track, what we can do is we can just move around. We'll look at the path, and if we put our scrubber somewhere here and drag this path along, we can see that the vehicle is recorded. And now if we scrub along, we can see the vehicle's moving. So the best thing to do now is work out roughly what we're gonna do with the camera. So I've got a few general guiding principles that I use when working with the camera to try and emphasize the feeling of speed or momentum with the car. You don't have to apply all these principles at once. Some work well together. Some are completely opposite. So these are just general tips that you can just think about when working with your camera. The first tip is to use a wide field of view or a short lens. This will make things on the outside of the frame mo look like they're moving much faster. The second tip is to have a lot of foreground objects moving in the frame. So if you can get a tree whizzing past a, any rocks on the ground and so on, that all makes the camera look like it's moving a bit faster. The next thing is to keep the camera low to the ground. Overhead shots and so on are great from providing perspective, but they do miss some of that momentum. Going low to the ground makes it feel faster and more energetic. Another tip is to use counter movement on your camera when you do need to provide that wider shot to provide more context to the scene if the car is moving along the path like it is now, if the camera were to move in the opposite direction to the car and rotate like this, You can see that the fire objects in the background look like they're moving faster. Plus also the car would be moving essentially double the speed on the frame. This can help keep the momentum of the scene up for the viewer. In this case though, we're just gonna be following the first three principles, uh, short lens, lots of foreground objects, and having it quite low to the ground. So with that in mind, we'll start the car roughly where it is, and this camera, we'll probably place a roundabout here. And what it will do is this camera will move along around here, staying on this side of the road, and we'll just track the car. Even though we're tracking the car, which can make the car appear slower, there's gonna be lots and lots of things moving in the frame, which will keep up that sense of momentum. So if we start from about here, we'll start, go to the start of our shot. And we'll drag this along. So we'll start the car about here. We'll frame it up and we'll press this, create new camera here. So we've now got this new Sydney camera. The camera defaults to 35 millimeters. If we were to change that to say a 15 millimeter lens, that's a very, very short lens. So it's got quite a wide field of view, so that's gonna allow us to see a lot of this stuff in the foreground. Moving very, very quickly. And what we'll do is we'll move quite low and we'll start, we'll start it here. So if we expand our sequencer, we'll just make sure on transform, we add a key point and we'll move along. We'll probably track the car to roughly where it is. We'll choose our last point, and we'll set another transform there. So these key points, by default, Are in cubic, which means that when we play this through, the camera starts off slow, moves really fast, and then slows down. Again. That's not what we want, especially not for the first key frames. So we'll change these key frames to linear, and if we move that along, we can see the camera moved at a steady pace there. But we also don't want it to move through the forest too much like that. So we'll come back into here. And we'll frame up our car like so. And if we press tra add key frame for this transform here, that's also added as linear. I don't generally like this look cuz it does this sort of weird snap. So I will change the ones inside to be cubic, which will smooth out a lot of that movement within the, within the path. We can see that one still moved. A little bit strange around about here. So what we'll do is add another key frame like this that's also added as linear so it enhance that snap. So if we come back to Cubic Auto there and play this, that's looking a little bit better. So that's all looking pretty good. I tend to watch the animation through a few times and just sort of pick up on anything that I might wanna improve. So I'm relatively happy with how that's looking. Normally at this part of the track around about here, I'd probably push the camera in a bit more, but I actually like how the trees are coming through, so I'm actually gonna leave that animation as it is. I think the last thing we need to do to this is just add a bit of camera shake, which will add a little bit more life to that camera. We can do this if we go over to content browser and just in the cinematics folder, we're just gonna right click and go Blueprint class. And if we search for all classes and search for camera shake. We can come down and go to camera shake base. So we'll choose that one and select, and we'll just call this BP_CameraShakeCarFollow, and double click that, and then it comes up with this full size blueprint window. We'll close it again and double click it again, and we just want this reduced blueprint window, so we'll just shrink this a little bit more. And under the root shake pattern, if we choose Perlin noise, that's generally a good noise to use for this. So now you've chosen that you can expand this out. We've got a few different fields we wanna change here. First we'll turn off any blend time and we'll change duration to zero. That will mean this will just endlessly continue, which means we can control it through sequence a better. The way you control this is you control the amplitude or the amount to move by and how quickly it moves. So the frequency is how quickly it sort of oscillates or moves. So you can do that for both location and rotation. It's easier to do this when you're looking at it. So we'll go back to the sequencer, add this in, and then we'll try all it out. So back in sequencer if you find your camera component and hit plus on the track and choose camera shake. And then we can choose the new camera shake we just chose. We just created. And we can just drag that down and move it back over here. And if we look at it, it's pretty subtle as it is. So if we change the location amplitude to say 10, that'll move it by 10 centimeters. And the frequency, we might do it. Let's say, let's just start with four, see how it looks. I think the amount of movement is okay, but it just seems to be a very slow oscillation. So why don't we bump that up to say more like 12. Okay. That's the right amount of frequency, I think, but I think the amplitude's a little bit too high. So let's change that down to say five. It's still a bit much, you can just play around with these and until you find a setting, you sort of like. You can also change around the rotation amplitude slightly, so I might add a little bit of rotation amplitude to, it might change the location frequency down, but to 10 rotation frequency might make that more like five. And this feels pretty energetic I'd. I'd dial this in a little bit more, but I think that's good enough for this tutorial. I think that's pretty good looking for now. So just hit compile and then save on that camera shake, and then close that off. Now the last thing we need to do on this sequence is we need to add. A camera cut track. So if we come back into the track and add a new camera cut track, we'll move that above shots just by clicking and dragging. And on the plus camera, we will choose our C camera actor. The best thing to do is make sure that the camera cut starts before the start of your sequence. This ensures that movie render cue can warm up properly with this camera. And sometimes it's also good to just start your camera movement one frame early. So now that the camera. Starts moving one frame early. We'll just come back to camera cuts and press this, uh, this little camera here, which means we'll see what the, what the camera's meant to be looking at. And we'll hit play. So the framing's still good, and now we're ready to render it in movie Render queue. Make sure you say that sequence and then we'll move on. We'll move to movie render queue now, but just before we do, we just wanna make sure that when. Movie render queue starts rendering, it actually starts simulating the level. So that will mean the original vehicle path that we created will actually spawn a new vehicle and it will interfere with our render. So we wanna make sure that we turn that off for when we're rendering. So we'll close sequencer for now and we'll scroll down and look for our vehicle animation path. So we've got it here and we just wanna turn off auto start and press save. So that'll mean now when we hit play, the vehicle won't spawn, but it also won't spawn when we are creating avid video with movie render queue. So now we can go up to Windows Cinematics movie render queue, and in this we'll hit plus render and we'll choose our tutorial level sequence. So on settings, we'll just click settings. There's some great videos on YouTube, which I'll link below. About how to choose the best render settings. For this example, I'm gonna stick mostly with the default settings, which will just render things a lot quicker than a full high quality render. But I'll walk you through some of the settings you could change, which would improve the quality of the render. So the main thing is gonna be around anti-aliasing. So if you go up to plus setting and then go anti-aliasing in here, we've got a few different things. First on override anti-aliasing. Enable that and make sure that the anti-aliasing method is none. And then up here we're gonna use the spatial sample count as one, and we're gonna set the temporal sample to four. The difference between spatial and temporal sample counts is a little bit nuanced. The main difference is that spatial sample count will take many frames from a very, very similar camera position, microscopic amounts of camera movement, and it will combine those to create a high quality static frame. But temporal sample count, if you have a frame with a lot of motion blur, it will take many intermediate frames on that, along that little camera path for that one particular frame, and it will blend those together, which will create a very high quality motion blur. So in this case, we don't really have a static camera, but we do have a fair bit of motion blur. So we're gonna turn up the temporal sample count. On another example video I've done in this environment, I had to bump the temporal sample count up to like 60 to ensure that these little fire ember. Particle effects rendered correctly. Otherwise, they were just little dots. Most elements in your scene should render pretty good with a lower temporal sample count, but I couldn't get particle effects to work correctly unless I really bumped up that temporal sample count with the camera moving so fast. So for this, we'll see a few little streaks not looking quite right, it will render correctly. When we bump that temporal sample count right up, we can see down here that it's giving us a small warning. The default temporal anti-aliasing uses eight samples. So the way these combine is it's spatial sample count times, the temporal sample count. So in this case, we're only gonna have four samples, so we might bump that up to more like eight, and that will get us closer to what temporal anti aliasing would look like. Two more settings we wanna change in here are use camera cut for warmup and render warmup frames. You'll remember in the sequence that we extended the camera cut out a little bit before the start of our sequence. That's so that the camera can warm up, the motion blur can warm up, and most importantly, the particle systems can all start emitting their particles and getting ready, ready for the first frame. That's why it's also important that we tick on render warmup frames. That means they all get submitted to the G P U, which initializes these particle systems. Next, we wanna make sure we've got game overrides. If it's not there, go up to Settings Plus and go game overrides. It should be up here somewhere. And then in here, we wanna make sure that cinematic quality settings is enabled and texture streaming is disabled. Now it can hit, accept, and let's render local. So it's now finished rendering and it's outputted to our project folder. So in your project folder, go to saved movie renders. And we can see we've got a whole bunch of J jpeg files here. So now we can see that the motion blur on the car's pretty good. The motion blur on the environment's pretty good. The embers are doing that weird streaky thing I was talking about. That can be improved just by upping your temporal sample count. But if you scroll through, we can see that it's got the camera shake, all the tires are moving correctly, and it looks pretty good. Here's that render Now as a movie. This is only rendered at 1080p with the 16 samples as we showed before. If you wanted to take this render even further, what you could do is export this movie as a series of EXR files, and then take that into Davinci Resolve. Here's something I did quickly in Davinci Resolve for this. I did actually end up going back and re-render this. I rendered this at 4K using EXR and using 60 temporal samples. I've increased the contrast. I shifted the colors a little bit. I added a bit of a halation effect, which increases that bloom a little bit more, and then I've added a vignette. I'm not the best colorist. There's a lot more you could do and you could make this look even better. But yeah, this is just something I've done really quickly. EXR files contain more color data, so it means you can do even more in Davinci Resolve than just using JPEGs or PNG files. In the description, I've added a few links to videos which discuss the Unreal to Davinci workflow. There's a lot of tips and tricks in those videos about how to best preserve the color detail. Preserving that extra color allows you to do even more and have it look even better. In Davinci Resolve. This would be enhanced even more if we added a little bit of music or a few engine sounds to it. In a follow-up video, I'll show off a few other camera techniques using the same animation.
Info
Channel: GDCorner
Views: 8,885
Rating: undefined out of 5
Keywords:
Id: H2gtUBgdvyE
Channel Id: undefined
Length: 28min 35sec (1715 seconds)
Published: Tue Jul 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.