SceneCapture2d constant hitching from Preparing Mesh Distance Field

Hi. I have a problem in my game which has world rendering disabled and the only view is via a SceneCapture2D shown in a widget.

The scene is captured manually each tick as you can’t use “capture every frame” when world rendering is disabled.

image

Each hitch in this graph is a frame in which the Mesh Distance Field is “preparing”:

image

The duration gets worse and worse as the game is running for some seconds. I have no idea what’s causing this, does anyone have any suggestions? Disabling Mesh Distance Fields for the project obviously resolves it but I want to use Lumen etc in this project that rely on it.

Thanks

After letting the game run a while this increases to nearly a full second every couple of seconds:

image

I don’t know how to proceed with debugging this - I’ve tried removing everything in turn from my scene and can’t find any culprits that would make this take longer each time it runs…

It doesn’t seem possible to resolve this with world rendering off, “capture every frame” off and “persist state” enabled on the scene capture.

Enabling capture every frame (disabling persist state), which should be equivalent to what my tick is doing, works fine. I think it works different internally. Unfortunately this means I need to do a normal scene render with a camera redundantly. I’ll point the camera at nothing to reduce the unnecessary performance impact and have to take that as my solution.