Understanding GPU VRAM usage and how to optimise

Hi,

I’ve tried searching for this but I’m coming up quite dry. I’m working on large projects bringing them in via Datasmith from Max, with a VERY short turnaround - We aren’t packaging anything, just exporting 4k cinematics.

The issue is I’m using up just shy of 100% of my VRAM - 10GB. I want to find a breakdown of how and why that much VRAM is being used, something that will point to something tangible that I can change in my project to reduce the overhead on the VRAM. Does anyone have any ideas? I was able to bruteforce most things in UE4, not so much in UE5 anymore.

Thanks

The most straightforward / brute force way to reduce VRAM usage would be:
bulk-edit your imported textures and increase the LOD bias.
The question is, whether in the editor itself you’d get the full memory benefits… it’s a bit unclear according to this very old post: Need confirmation on LOD bias for textures

Another thing to consider is, are you actually getting lower framerate when the VRAM is slightly over-used? I’m perpetually in the same situation and somehow it doesn’t actually seem to affect my framerate in the editor?

Thanks for the response.

When the memory usage is high, I get no performance drops. When it touches 100%, even briefly, perfomance drops like a stone.

I’ve forced half res for all my normal maps (and there’s a lot of them) and noticed no difference in VRAM usage so far. What does have a very noticable effect is reducing the screen percentage in the viewport options tab. This immediately clears out a lot of VRAM, I can see it drop in real time, and performance is back to being great again.

The issue is that Datasmith spits out so, so many assets that without something to point the way to the problem assets I’ve no realistic way of finding what’s causing the high usage.

How have you dealt with this issue?

Got a card with double the VRAM. That’s legit the only way if you don’t have time to optimise.

I just upgraded from 3g card to the 8g one just for ue5 lmao. Well thx for the answer

if you go to - Tools - Audit - Statistics - textures you can view all the textures your scene is using and a bunch of details to go with them including Max Dimension, Current memory and Fully loaded memory. if you click on the column for Current memory you can see what files are taking up the most resources. the same can be done for geometry if you go to primitive stats instead of textures. if you click on the assets name in the statistics window it will take you to the asset and you can do whatever optimisations you need. then go back to statistics window and refresh and you can see the new stats for that asset in the scene.

Optimization for my project right now is a bit of a goliath as I’m using unreal for cinematics. using thousands of high poly assets and then running about a hundred niagara particle sims rending flying vehicles along splines. I’m looking in to ways I can use world partition data layers to hopefully reduce some of my vram usage as I have had numerous crashes and ridiculous render times in path tracer for test shots. like 11 hours for 120 frames seems mad especially when i need to render an hour long movie. full render time on my 4080 would take around 6 months.