I’m currently working on a project involving WorldPartition, Level Streaming, and Data Layers. We have a portion on the map where we swap out two data layers when the user reach a point on the map, and are experiencing big frame drops during the transition.
We have a transition zone as to let things load in and not have huge popping, but we still have those spikes.
I’ve been doing some testing with toggling the layers manually between Activated/Loaded/Unloaded, and fiddled with the multiple CVars I found related to limiting streaming to a certain numbers of actors or frame budget, but it does not eliminate the problem.
On the GPU side, our biggest culprit is UpdateDistanceFieldObjectBuffers by far (and UpdateGPUScene_Primitives in a couple of frames), so I was wondering what are the best practices to deal with that.
I saw that one way of doing it can be to disable “affect distance field lighting” on small individuals assets and PCG, but that would require a somewhat manual pass on everything we currently have on the map, so I prefer asking for advice until we commit on this.
Apologies for the delay. If a significant amount of content being added to the global distance field is small individual assets/PCG then disabling those with “affect distance field lighting” is a common approach. When facing similar issues to reduce overhead we suggest disabling things like Affect Dynamic Indirect Lighting (bAffectDynamicIndirectLighting), Visible in Ray Tracing (bVisibleInRayTracing), and Affect Distance Field Lighting (bAffectDistanceFieldLighting) on small instances (rocks, shrubs, etc). You can do this programmatically or with an Editor blueprint to find small objects by radius and set the property for you.
Did you already measure the performance benefit of these?
r.DistanceFields.ParallelUpdate 1
r.GPUScene.ParallelUpdate 1
You can also try lowering r.DistanceFields.TextureUploadLimitKBytes while Activating the Data Layers, but if it’s too low you might see some unwanted mesh transitions.
Regarding the Data Layers - assuming the primary hitch happens when you Activate a layer, how much does it help to stagger layer Activation? Are you loading the Data Layers, then waiting to Activate them?