Setting r.VolumetricFog.GridPixelSize == 1 causes instant crash

Hello all!

I was making a cvar preset for a production and I noticed that if I set r.VolumetricFog.GridPixelSize to 1 it will cause the engine to crash instantly.

We are trying to make volumetric lighting look less “chunky” on render, especially from a distance, here is what a frame looks like:

You will see that the volumetrics look very “Blobby” and circular, we are trying to fix that using some cvars.

We are using MegaLights for this production in UE 5.6.2.

Below is the output from UnrealEditor with that cvar in question:

LoginId:696b55df4e54ade2a29f6a947fab6921
EpicAccountId:92987e289dea41c5be9129c6414c4af2
 
Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\RHICore\Private\RHICoreTransientResourceAllocator.cpp] [Line: 676] 
Transient allocator failed to allocate Texture MegaLights.Volume.LightSamples. Extent: (2896, 552), Depth: 16, ArraySize: 1, NumMips: 1. Allocation Size: 18446744073709551615, Allocation Alignment 65536.
 
 
 
 
UnrealEditor_RHICore
UnrealEditor_D3D12RHI
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Renderer
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
kernel32
ntdll

Steps to Reproduce

  1. Create volumetric lights (several of them)
  2. move camera back to (X=12478.809433,Y=19989.409283,Z=11038.197055)
    1. Make sure that the camera is still looking at all the volumetric lights
  3. Notice the “blobby” and “Circular” look of the volumetric lights (Please see Description for an image of what it looks like)
  4. set cvar r.VolumetricFog.GridPixelSize = 1

The engine should crash shortly after applying that cvar.

Hey Frank are you talking about the yellow/gold things? Do they go away when you turn off lens flares?

The stochastic nature of Megalights might not lend itself well to what you’re trying to do. Can you share your setup for your volumetric lights or a small repro project? Are you using megalights for performance reasons?

Yes, the cone lights are volumetric and using megalights. We noticed that once we turned Megalights off, the circle artifacts disappeared. We did try using the cvar:

r.MegaLights.Volume.DownsampleFactor

and cranked it down to around 0.1-0.5 however the issue was still visible but greatly reduced. Below is a screenshot with the cvar set to 0.1, it does soften the artifacting:

One workaround that we have been utilizing is just turning off Megalights on the volumetric lights which then removes all of the render abnormalities, but they do look slightly different (to be expected).