Open Miziziziz opened 3 years ago
This is expected in 3.x
, since the radiance map needs to be regenerated every time a sky property is changed. In 4.0, you can set the sky update mode to Real-Time which makes changes apply much faster.
In the meantime, you can add a MeshInstance with a large SphereMesh that's parented to the camera. The sphere's size should be slightly smaller than your camera's Far distance. Add a material with the cull mode set to Front, and texture it accordingly. This sphere won't be reflected in the radiance map, but you'll be able to rotate the mesh and update its texture at no cost.
@clayjohn Should we add a boolean property to temporarily freeze radiance map updates in 3.x
? This would let people update the sky in a smoother fashion, at the cost of reflections being incorrect until you unfreeze the radiance map updates.
@Calinou: Nice trick, can it get documented somewhere?
Godot version
3.3.mono.stable and v3.4.rc2.mono.official
System information
Windows 10
Issue description
If you try modifying the horizon or top color of a ProceduralSky in a WorldEnvironment node you get random lag spikes. This happens both when modifying through scripts and animations. I would expect this to not cause issues as I want to change sky color for weather effects or day/night cycles
Steps to reproduce
create a scene with a WorldEnvironment and a ProceduralSky, then have a script that runs this code:
run the profiler and you'll see lag spikes
Minimal reproduction project
AnimatedSkyLagTest.zip