Hello. I am using r.TextureStreaming 0 in my project settings and I am noticing that the VRAM is not emptied between level changes.
For example I had a Main map filled with other sublevels and 30+ different MH.
That amounts to 30GB of VRAM used.
When I click on a New Level and switch to an empty level, the Texture2D usage remains the same in the empty level.
If I restart the project in the empty level and go to another level, Texture 2D is 13GB from that map. But if I open the “Main” map before and Texture2D goes to 30GB, than it remains like this for the rest of the maps opened, it only goes up by loading new assets in VRAM.
If I work with Texture Streaming 1 in the Editor, than I don’t notice this VRAM build-up.
BUT I am always rendering with Texture Streaming 0. So If I hit render just once, and than go back to my editor, things start to behave as bad as it was with streaming 0 from the start because it comes back from the render with 0 streaming and loads all the texture in VRAM and than it does not empty them even if I switch streaming 1 again.
I am using 5.3.2. Seems to be the same in 5.5.
The VRAM doesn’t get flushed in editor. I haven’t found a way to do it.
It does get purged in a packaged game. Possibly also standalone, not sure about that…
Thank you. That is a very weird behavior. I am using UE for high end rendered cinematics so I am only using it in editor.
I agree, it would be nice to have a flush buffer button. There might be a cvar, but I can’t find it. I assume it’s possible to do in CPP.
Shout out to @mihneabalta for guiding me in tracing where the issue lies:
obj refs name=/Game/MetaHumans/C1Healed01/BP_C1Healed01.BP_C1Healed01
LogReferenceChain: Display: InitialGather memory usage: 14.16
LogReferenceChain: (standalone) Blueprint /Game/MetaHumans/C1Healed01/BP_C1Healed01.BP_C1Healed01 is not currently reachable but it does have some of GARBAGE_COLLECTION_KEEPFLAGS set.
It seems that the MH blueprints are set-up to never be garbage collected - GARBAGE_COLLECTION_KEEPFLAGS set
Still investigating if there is a work-around.