Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan: Volumetric fog without visible FogVolume nodes does not make the editor redraw until it has fully converged #62794

Open
Tracked by #69579
golddotasksquestions opened this issue Jul 6, 2022 · 8 comments · May be fixed by #93966

Comments

@golddotasksquestions
Copy link

golddotasksquestions commented Jul 6, 2022

Godot version

4.0 Alpha11

System information

Win Nvidea 765M

Issue description

I have also seen this in previous 4.0 versions, but I can't really reproduce reliably:

volumetric_fog_apha11_01.mp4

Steps to reproduce

  1. Enable VolumetricFog in the WorldEnvironment
  2. Enable Camera Preview
  3. Click on nodes in the Scene Panel

Minimal reproduction project

volumetric_fog_cam_preview_bug.zip

@Calinou
Copy link
Member

Calinou commented Jul 6, 2022

Related to #54892. This needs to be fixed in the same way, by forcing redrawing for a certain amount of frames whenever a volumetric fog parameter is changed or when a viewport is resized. The number of frames that need to be redrawn depends on the temporal reprojection amount chosen. With the default temporal reprojection amount of 0.9, you can reasonably assume that fog will be mostly fully converged after 44 frames drawn (0.9 multiplied by 0.9 44 times <= 0.01).

Alternatively, temporal reprojection could be always disabled in the editor, but this will worsen volumetric fog quality in the editor.

This is effectively the opposite issue as #54893, but it happens only when you have no visible FogVolume nodes in the scene.

@Calinou Calinou added this to the 4.0 milestone Jul 6, 2022
@Calinou Calinou changed the title Volumetric Fog Camera Preview changes as the user clicks on various nodes in the Scene Panel Vulkan: Volumetric fog does not make the editor redraw until it has fully converged Jul 6, 2022
@Calinou Calinou changed the title Vulkan: Volumetric fog does not make the editor redraw until it has fully converged Vulkan: Volumetric fog without visible FogVolume nodes does not make the editor redraw until it has fully converged Jul 6, 2022
@golddotasksquestions
Copy link
Author

golddotasksquestions commented Jul 6, 2022

@Calinou I suppose #62796 is then related to #54892 as well?

@Calinou
Copy link
Member

Calinou commented Jul 6, 2022

@Calinou I suppose #62796 is then related to #54892 as well?

Yes, #62796 is due to the same cause as this issue, so I'll close it as a duplicate.

You can work this around by enabling Update Continuously in the editor settings, but this will increase CPU/GPU usage. If you enable Show Update Spinner, you can toggle this by clicking the spinner.

@golddotasksquestions
Copy link
Author

golddotasksquestions commented Jul 6, 2022

@Calinou I suppose #62798 probably has the same cause then and can be closed as duplicate as well?

@Calinou
Copy link
Member

Calinou commented Jul 6, 2022

@Calinou I suppose #62798 then is probably has the same cause as well and can be closed as duplicate?

Indeed, these are all caused by the fog not updating when it should.

@Mantle-Core
Copy link

Related to #54892. This needs to be fixed in the same way, by forcing redrawing for a certain amount of frames whenever a volumetric fog parameter is changed or when a viewport is resized. The number of frames that need to be redrawn depends on the temporal reprojection amount chosen. With the default temporal reprojection amount of 0.9, you can reasonably assume that fog will be mostly fully converged after 44 frames drawn (0.9 multiplied by 0.9 44 times <= 0.01).

Alternatively, temporal reprojection could be always disabled in the editor, but this will worsen volumetric fog quality in the editor.

This is effectively the opposite issue as #54893, but it happens only when you have no visible FogVolume nodes in the scene.

@Calinou I took a shot at this issue. Would this be the expected output? At the moment this fix is for viewport resize.

Volume.Fog.mp4

@Calinou
Copy link
Member

Calinou commented Jul 1, 2024

@Mantle-Core Looks good, but make sure the editor isn't redrawing constantly for no reason after fog is updated. Enable Show Update Spinner in the Editor Settings and look at the top-right corner of the editor. The spinner should stop spinning when fog has fully converged.

To avoid flashes when resizing the viewport, a different solution is needed: #63739
Both can be implemented independently of each other.

@Mantle-Core
Copy link

The spinner stops after fully converging. I implemented it to force a redraw for N frames based on the Temporal Reprojection Amount. Afterwards, it stops redrawing.

Mantle-Core added a commit to Mantle-Core/godot that referenced this issue Jul 5, 2024
Issue: godotengine#62794

This fix calculates the number of frames needed, based on the temporal reprojection amount, to redraw until the volumetric fog fully converges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants