FIX Your Crashing Renders (GPU and D3D Device Removed Crash) – UE
FIX Your Crashing Renders (GPU and D3D Device Removed Crash) – UE

FIX Your Crashing Renders (GPU and D3D Device Removed Crash) – UE

Anyone woking on Unreal long enough has had this jerk show up. It happens without fail when you’re about to wrap up a professional project you’ve been working on for months or you are in the middle of production, and you have a delivery by end of day. You think you are almost done and then …

So what do you do? Wallow in despair and self-pity? Yeah that sounds like something I would do. But after that, don’t panic there’s a lot of things you can do to remedy this problem so the first thing you’re going to want to do is narrow down the source of the problem, open up the task manager, go to the performance tab up top and click on GPU, keep an eye on dedicated GPU memory usage. In 99.9 of cases, this crash has to do with your graphics card’s memory, also known as v-ram, as an artist, you can never ever have enough v-ram, there’s a reason why cards like the RTX 3090 are so expensive, and hard to find is because that v-ram is priceless to artists.

So before you start renders in Unreal, just make sure you close any GPU intensive apps, like close all your GPU programs you’re running games in the background, if you are running two instances of Unreal, close that, you have a chrome open with 75 million tabs open? Close chrome as well. You basically close anything that is non-essential to Unreal, you want to keep your graphics card’s v-ram as much as possible to work with.

Now when it comes to time to start your render again, open up your scene, and hit that render button one more time, but this time, keep the task manager open on the second display, you’re going to want to keep an eye on the graphs of the dedicated GPU memory usage, when you start to render and if you’ve crashed before, chances are you’re really topping off your GPU v-ram, to keep an eye on that curve, and you’ll see it kind of just like creeps all the way up to the top, that’s usually a sign that hey you’re using too much v-ram. It’s causing Unreal to crash, that’s the source of your problem, like I said in 99.9 of the case that I’ve encountered this error, it’s been because of this. So what do you do, you closed all the apps in the background and Unreal is still crashing.

So first off, If you happen to be using the screen percentage console command in your render, so if you’re super sampling your renders you’ve got r.screenpercentage, set to 200 or something, you’re going to want to tone that down, so bring it back to 100, just to see if it’s renders are still crashing. And if you’re not using this console command, I recommend tone down the resolution, so let’s say you’re rendering in 4k, just render in HD, just to see what happen there. In many cases, turning down your resolution is going to get rid of this crash, what is likely happening is at lower resolutions, it’s running fine, and when you crank up the resolution something like 4k, issues start to showing up because it demands a lot of v-ram.

  • r.ScreenPercentage, 100 = current resolution
  • Render with a smaller resolution

Now how much v-ram do you actually need, the simple answer is you can never have too much. If I got a graphics card with 128 GB of v-ram, I would grab it in the heartbeat. I am running with a rtx 2060 super that has 8 GB of v-ram personally, I wouldn’t recommend anyone to work with anything less than 8. 12 is not too much, 24 is not too much. But less than 8 start being very problematic especially if you’re trying to render in 4k, I honestly don’t think you’re gonna be able to pull it off. So if you are using an older graphics card that has 4 or 6 gigs of v-ram, you might want to consider to upgrade.

Let’s say for example you kind of figured out that you are rendering in 4k with the problem, but everything is fine in hd, but for your project, you need 4k, DLSS may be the solution to your issue. Now Nvidia finally released support for dlss in Unreal Engine, dlss is essentially AI upscaling, so your scene’s actually going to be rendered in 1080p, but with the aid of machine learning, it’s going to upscale to 4k, with pretty darn good results so take this with a grain of salt, I haven’t actually tried dlss myself yet in Unreal, I don’t even know if it works with the movie render queue, so just keep that in mind. I just figured it’s worth mentioning in case you want to try it out yourself.

So I’ve had a lot of people ask me questions about this crashing issue, and a suggestion I often give them is this one: turn on virtual texturing. Virtual Texturing is a way to allow Unreal to reduce its memory usage while simultaneously allowing larger resolution textures, it’s basically magic, I am not going to get into the nitty-gritty details of it but it’s a pretty magical solution.

  • Enable Virtual Texturing

To enable virtual texturing, you are going to go to the edit tab up top, go to your project settings, in the search bar, you’re gonna type virtual, and scroll down a little bit you’ll see the enable virtual texture support, make sure this checkbox is checked, restart your engine and try rendering one more time, chances are this will solve your issue. It works for me and it works for many others I suggested this trick to.

And last, this is not really a trick, but maybe your scene is just too heavy, maybe your textures are way too big if you brought in some 8k texture from mega scans, chances are that is like way way overkill. Of course, depending on your shot, you got a hero shot an extreme close-up, you’re gonna need some higher resolution textures but for the most part anything that’s in the mid and background, 2k is often more than enough when you’re bringing in mega scan stuff, so keep that in mind, and that’s it.

That’s really all you need to do if all of those things still didn’t work, then I’m really not sure what to tell you, you may have to check your scene, there’s maybe something in your level that’s crashing your renders, it could be some corrupt blueprint or something, but these tricks here should really help you out with this error message.

[Content source: https://www.youtube.com/watch?v=CRnd513xWLk]