UE5 Lag's after adding Sun and Sky Component

Hey,

I want to create a day and night cycle in Unreal Engine 5 with the help of this tutorial

But at the very beginning, right after adding ‘Sun and Sky’ from the ‘Sun position calculation’ plugin to the level, the viewport and the game itself lags every half second or so. What could be the reason for this?

Video how it looks

1 Like

try and restart the editor

Resetting the engine does not change anything.
I also tried changing DirectX 12 to DirectX 11 but this changes nothing too.

I notice your scalability is set to low, is it possible your hardware is being pushed to it’s limit? Do you find it still happens when packaged or via PIE

Sorry, it’s on low because I was trying to optimize foliage and I was testing some settings. The Foliage is the only thing that is set to low, rest of the settings is set to high and without ‘Sun and Sky’ component in level, I have ~80 fps in viewport.

Specs:
GPU: RTX 3050M
CPU: Ryzen 5 5600H
RAM: 16,0 GB

The stutter every half second stops, when I change view in viewport to ‘Unlit’ but yep, when I hit play or set viewport to ‘Lit’ then the stutter comes back.

Important
I checked now and on Low, Medium settings this problem does not occur, but on High and up the problem occurs again… Is ‘Sun and Sky’ really that demanding for my computer?

it seems to be. are you using lumen, its quite demanding on performance

Lumen is turned off, I use Nanite on Landscape.
The game uses 256x256 textures and low poly models so Lumen would kill the look of the game a bit.

So, now I’m wondering, what does the ‘Sun position calculation’ plugin have that it slows the game down so much on my PC and yet in such a weird way? It is very strange for me, like every half of second something big happens in logic.

Edit:
I played with scalability settings, and after X times setting scalability to Low and High, the stutter disappeared, but after restarting the engine, the stutter appears again

I found a solution… Kinda.
I opened Blueprint ‘Sun and Sky’ and removed ‘Volumetric Cloud’ from it and the problem disappeared…

Can Volumetric Cloud really put a strain on my computer?

Another solution found by @ForceGameDev :

after some more testing, for me it turns out that reducing “Reflection View Sample Count Scale Value” (in VolumetricCloud Details->Cloud Tracing) to 0.05 solves the problems.

If it doesn’t help, for me, removing and adding Volumetric Clouds again manually with default values solved the problem - try what works for you.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.