GPU out of memory with ray tracing and virtual textures

On two different projects, we’re getting crashes with this error:

“Out of memory trying to allocate a rendering resource. Make sure your video card has the minimum required memory…”.

In both cases, we’re trying to open projects or levels with ray tracing enabled and virtual textures (16K x 16K landscape textures). In both cases we can watch the GPU RAM usage spike to use all available vRAM (11 GB on RTX 2080 ti) before the crash. I think we’re using defaults for both VT and RT with a post-process volume and the SunSky actors. If we turn off RT the scene loads normally.

Is there anything we can try to avoid this issue?


-Donald Newlands

i think its just a problem with lack of gpu memory, i get more problems and crashes when i increase the sample counts. gpus dont have virtual memory like cpus so once its full it can only crash. a 24gb titan rtx may help, or wait for new 3080 or big navi coming soon aparently, which will probably increase memory to 16gb

Hi Marcus,
I thought the same thing reading about the big vram in 3080 specs… What makes me wonder if there isn’t more we can do to manage the issue though is the way RAM use spikes with RT on load in a way that normally it would not. I’m curious to know if some materials, RT parameters or scene types have more impact than others.

The only thing you can do is reduce the amount of stuff that fills up the GPU memory, things like textures and high resolution geometry. For ray tracing you’d want to reduce the number of samples. Also, the resolution that you’re rendering at will take up memory as well.

Can you clue me in on what you mean by rendering resolution in Unreal? I thought UE used a dynamic resolution of sorts with it being a real time engine. Maybe you mena if you are doing light builds the the quality level setting ? But those light maps would go into RAM right? Not the VRAM. Maybe I am totally wrong. Thank you in advance.

Rendering Resolution in terms of the target screen resolution–that by itself uses memory but lowering it will also make raytracing perform better. However, while UE4 does support dynamic resolution which will adjust the screen percentage on the fly, it’s only supported for consoles at the moment.
For PC right now, you’d need to figure out your target resolution and make adjustments to try and maintain a good framerate at that target.

Thank you much for that response. I learned something new.

Im crashing the same way with a 24gb rtx 3090… in 4.26.2