Video memory has been exhausted

Is this a bug?

I have been working in UE5 for a few months building an environment… recently this error message pops up on my screen and says:

Video Memory Exhausted (#### MB over budget). Expect extremely poor performance.

fps is still relatively good, 50fps. I can still move around the environment with ease and no lag.

It seems no amount of performance optimization is actually making this go away.

It’s very annoying to look at.

16 Likes

Hi @nanonansy,
To find the problem open Windows Task Manager → Performance. Scroll down to GPU and have a look at how much Dedicated GPU Memory. Mine is 0.3/2.0 GB as it is an Nvidia GeForce GTX 1050 below Recommended 4GB, or like the RTX2030 8GB.
I believe someone messed around with the UE5 code to change this ie, stopped the message displaying, but Nanite offloads work to the GPU in UE5

2 Likes

Hi @Jimbohalo10 ,

Thanks so much for your reply!

My dedicated GPU Memory is currently at 7.1/8 GB
image

I think this message popped up after I started using Nanite. Hmmm, maybe I should just revert back for now since I got rid of all the nanite meshes in my scene.

Any idea how I can get rid of the message otherwise? It’s just so annoying seeing it there all the time.

Thanks again :slight_smile:

2 Likes

Well, I found the Source code for the message section. Assuming you have built and run your code comment out the lines. 3189 and 3190 of
Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp

It’s too complex to work out why. Here is the code

4 Likes

When you create an asset for the GPU, this typically gets populated from the cpu, a second buffer for the GPU is created. It gets sent to render a frame, In 3-4 frames we will see it. The GPU copy cannot be freed or modified until those 4 frames have passed. If you have static images geometry, then the same asset is used each from on the GPU. When you start creating and detroying assets then you end up with 4 copies in memory. Each one represents THAT SINGLE frame of dynamic data waiting to be consumed on the GPU.

One thing that exacerbates this is resizing the output buffer size. EI: doing a render at 1080p, then another one at 640. Each time the renderer changes the outbut buffer size, those buffers get locked for the frame of the GPU its used on. Then the next frame, the buffer is resized to 1080p again, but it cant re-use the 640 buffer, and it forgot about the previous 1080p buffer, so then we are consuming even more GPU memory than ever.

This is about the worst case. Dynamic geometry, with varible number of verts. Dynamic textures that are all different sizes.

If you absolutely must by dynamic then standardize your capture size so you can re-use the off screen buffers. Dig into the engine, and tell it to start reusing buffers of the proper size, but from a previous frame. This is the work that has been done on several UE4 projects to keep the memory down, remove this issue, and still maintain a high level of fidelity and qaulity.

4 Likes

use virtual texture convert every image texture in your material

2 Likes

Hi @nanonansy ,
I think I may have found a reason my memory is used up see
How to Improve Texture Streaming GPU performance in UE5 over 20% increase on GPU memory [Solved] -

1 Like

I have also run into this unacceptable problem, and since I have a Ryzen Threadripper with 64 cores, 512 gig of ram, and dual RTX3060s, I am pretty sure the problem is due to awful programming, not with my computer. It is also unacceptable that it is the user who is forced to resolve these issues, when in fact the program, if it was produced with better stability, should work flawlessly. I have problems rendering videos, which are lacking actors I have already placed in the scenes. I don’t even want to start on the Nodes system in UE, I will simply say it’s an abomination. I’ve been using UA5 for a month now, and I am so sick of how buggy it is. Yes, there is a positive side to UE5, when it works. I think the kids at Epic have some work to do.

9 Likes

Just a friendly reminder that UE5 is in “Early Access”. In software development at such stage is not expected to be fully optimized, fully debugged and you can say is far from what the final product will behave. With that in mind cheer up that you can put your hands on it before the release.

4 Likes

Im struggling with the “Video Memory Has Been exhausted” message in UE5.

I tried what was suggested in the above link ‘How to Imporve Texture Streaming…’.
I have also tried changing to “r.ReflectionCaptureResolution=512” changed down from 2048 in the DefaultEngine.ini file.

My PC is quite capable:
AMD Ryzen 9
RTX 3070 Vision OC 8G
64GB RAM
SSD Storage

I am reasonably new to Unreal and cant resolve this issue.

Can someone suggest a solution please?

Dean

Hey Dean, I am still dealing with the same issue. Very annoying and frustrating. Sometimes if I open the engine with nothing else running that message seems to disappear. I remember the moment it began happening to me was when I introduced some Nanite meshes and used a bunch of decals in my scene… but I also tried to remove all those things and it still popped up! I’m at a loss so I just continue working and try to ignore it, but I know I will have to address it at some point… anyways I’m following for responses…

1 Like

I’ve worked on massive scenes in UE5 with tons of actors, nanite meshes, lighting, and multiple cameras. I started a project today on a 1024x1024 landscape with 2 texture blends and only about 4 meshes loaded in. As soon as I added a CineCameraActor to frame up a shot, my Video Memory showed as exhausted by upwards of 3GB!!! Wtf. This has never happened before. My scene is empty as hell. Hoping for some fix soon.

6 Likes

I have tried so many fixes to stop this ‘video memory has been exhausted’ message. It makes my scene run at about 3 fps and makes it impossible to work in. I’ve been waiting on a fix for this for months. I’ve had this problem since August 2021 and it’s January 2022 now. Really hoping for a fix. My scene should be able to run perfectly with my specs.

The “video memory has been exhausted” error, I think is quite literally what it sounds like: you have no more free VRAM, and your GPU is maxed out.

I’ve found that even with all “new” features disabled (lumen, nanite, virtual shadow maps, temporal super sampling, etc.) UE5 EA consumes significantly more VRAM (3+GB) than older versions of the engine even on completely blank projects.

What’s more is that, if you populate a map with a lot of expensive assets and then delete them all and re-start the engine…that empty level will also consume more VRAM than a level that had not been populated at all (even though both are identical in their contents). Perhaps there’s a technical reason for this that is beyond me (as I’m an artist, not a programmer).

7 Likes

Hello,
It seems that this issue occurs due to a bug using DX12 (DirectX 12) with “lumen” which is the default “Dynamic Global Illumination Method” (in the the projects DefaultEngine.ini we have DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 and r.DynamicGlobalIlluminationMethod=1). Hence, you need to either change your RHI settings or your dynamic GI method.

Changing RHI settings
You can either make DefaultGraphicsRHI=DefaultGraphicsRHI_DX11 in DefaultEngine.ini (to use Direct X 11 rather than 12) or go to “Edit → Project settings → Platforms → Windows → Default RHI” and select DirectX 11 or Vulkan (I didn’t test it yet) .

See an example below:
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
DefaultGraphicsRHI=DefaultGraphicsRHI_DX11

Changing the Dynamic GI method
You can change the default DynamicGlobalIlluminationMethod to “None” (or any other method) directly in DefaultEngine.ini , i.e " r.DynamicGlobalIlluminationMethod=0", or from “Edit → Project settings → Engine → Rendering-> Global Illumination → Dynamic Global Illumination Method” and select your preferred method (None, lumen, Screen Space, Standalone Ray Traced (Deprecated) ). These methods correspond to 0, 1, 2, 3 respectively.

You can change the default behavior by going to the config folder in your UE5 project then open DefaultEngine.ini. Under [/Script/Engine.RendererSettings], set r.DynamicGlobalIlluminationMethod to 0.

See an example below:
[/Script/Engine.RendererSettings]
r.ReflectionMethod=1
r.GenerateMeshDistanceFields=True
;r.DynamicGlobalIlluminationMethod=1
r.DynamicGlobalIlluminationMethod=0
r.Lumen.TraceMeshSDFs=0
r.Shadow.Virtual.Enable=1
r.Mobile.EnableNoPrecomputedLightingCSMShader=1

Shabayek

11 Likes

Same issue.Once change RHI setting back to DX11,turn off nanite,then everything was okay!I can render it through movie render queue.However with DX12,video memory easily got exhausted,and render crashed down!

1 Like

Same issue here, coming from UE5 EA we had no problem, with the official release we’re constantly having the video memory message. Going back to DX11 did work but you need DX12 to use Nanite now, so we’re stuck with this problem.

3 Likes

Now UE5 has been released, the problem is still there.
“Early Access”, “Preview”, “Beta”, “Experimental feature” don’t really mean anything with Unreal Engine. Every version is an “early access” of the next version and introduce “experimental features” which only means “new feature”.

2 Likes

I have Unreal Engine 5 now, and I am still facing this problem. I was hoping that the full release would fix this but it didn’t. I would love it if someone came up with a solution.

Hi @Shabayek841, Thank you for the work you have done on this. It would appear that the use of Directx 12 (SM6, Experimental) by itself fixes this problem for me I have attached a picture. In this picture, I have unticked Direct X11 &12 (SM5) and left the Default RHI as Default.
UPDATE: this appears to load DirectX DX11 by default and NOT DX12, force Directx 12 and you get the same problems

(upload://fwUYQWZ66oEzMtyZ0BluaSuqeAT.jpeg)
My Graphics card is well below spec it’s an Nvidia GTX 1050 with Max FPS unlocked. By default, NVidia 3D set this to 30FPS.
My setting are

This has all been carried out and tested on the BINARY 5.0 Release version from Epic Launcher.

For those of you who want to load this FREE Demo in Epic UE MarketPlace see
Elemental Demo in - UE Marketplace (unrealengine.com)
UPDATE
[BUG Verified Please vote to get this fixed]

UE5.0 Binary Release Build Texture Streaming Crashes UE Editor in Epic Elemental Demo from Marketplace Bug Tracker (UE-144029)

2 Likes