Why is "Asnyc Load Asset" Causing Massive Frame drops?

UE Insights of the Frame Drops

My marco async loading the textures

I followed this offical UE guide on Soft Object References to load assets into memory on runtime in the background.

I am using blueprints and a list of soft object references to load the textures of a volumetric video. I am loading a 6k 8-bit grayscale texture and a 3k RGBA 8-bit texture every second. I delay loading the second texture for half the animation frame time per second. In theory they should be around the same size. But the 6k 8-bit grayscale texture cause a lot more lag than the second one. The UE insights recording is from the Editor, but this happens in the build version too but it loads a bit faster.

This slow animation should be more than enough time to load the textures from an SSD in the background. I am using Async Load Assets which should run in the background and not have an effect on Frames. But as you can see Async Load Asset clearly causes frame delays until it finishes and behaves like Load Asset Blocking instead.

Disabling the Async Load Asset and just letting the rest of the script do its thing without loading textures causes no framedrop or is even visible in UE Insights. Using smaller textures reduces the loadtime and the framedrop, but they still halt the frames which is not what Async load should be doing.

Can you help me find out why Async Load Asset does not load in the background like it should? Or how I can load assets in the background without disturbing the FPS?

1 Like

Found a solution it only works in UE5. I found this by accident. It is currently not dokumented and the menu says it doesnt work. But when testing it, it clearly does. So this is how I did it:

In your 2D source texture set:

  • Enable Virtual Texture Streaming

  • Disable Never Stream

  • Load Mips and generate Mips

Generate your volume texture asset from the 2D texture with the following settings:

  • Disable Never Stream

  • Load Mips and Generate Mips

  • you cant enable Virtual Texture Streaming, but it will work anyway

  • once your created and saved your volume texture you can delete the source 2D texture asset when the editor is closes. You can’t edit the source anymore, but you have the disksize of the volume texture. The streamloading will still work.

here an Unreal insights test with 0 mips, but it looks pretty much the same in ue4. see how the streamloading causes the frame to pause and wait for the texture to load.

here with mips enabled and 2d virtual texture source deleted (you can keep the texture. it will double your disk size but you can still edit it). as you can see it loads over several frames not causing any visible lag. This only works in UE5. the same setup in UE4.27 causes lag like the previous image.

2D source texture settings. Don’t mind the green color i have Cloud Density in Red and Rain Density in Green.

Volume Texture settings. Don’t mind the green color i have Cloud Density in Red and Rain Density in Green.