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: GPUParticles3D/2D flicker when explosiveness is close to 1 #56691

Closed
Tracked by #61067
Whimfoome opened this issue Jan 11, 2022 · 21 comments · Fixed by #70418
Closed
Tracked by #61067

Vulkan: GPUParticles3D/2D flicker when explosiveness is close to 1 #56691

Whimfoome opened this issue Jan 11, 2022 · 21 comments · Fixed by #70418

Comments

@Whimfoome
Copy link

Whimfoome commented Jan 11, 2022


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

v4.0.dev.mono.custom_build.54d89f227

System information

Windows 10; Driver - Radeon 21.5.2; GPU - AMD R9 280X

Issue description

When emitting particles that have high explosiveness (close to 1, or 1), strange flickering occurs. Doesn't happen always, but most of the times. Seems like the more materials there are in a scene, the more it occurs.

Happens with both Vulkan Mobile and Vulkan Clustered.
I provided a small example project, but in it I could reproduce the bug only in editor, not in-game, probably because there aren't enough materials?

Every time the flickering is slightly different:
GodotFlicker1
GodotFlicker2

Here is how it looks in my game Warning: flashing light

Don't know if it's an issue with my GPU, Driver or Godot itself.
(Don't know if it can be seen in the gifs, but the flicker occurs at only 1 frame (out of 60))

Steps to reproduce

  1. Create GPUParticles3D
  2. In Draw Pass as Quad
  3. In Geometry Material add StandartMaterial with - Transparency Alpha, Unshaded, Diffuse Lambert, Specular Disabled, Use Vertex as Albedo, Particle Billboard, and set some texture as Albedo.
  4. In Time set Explosiveness to 1
  5. Create new Process Particle Material and do whatever you want there.
  6. Emit from editor, or game, preferably when more materials are present in the scene.
  • To get the above results from the minimal reproduction project, I set the autoplay to false and emit manually from the editor. If the bug doesn't occur, I restart the editor and try again, it's really hit and miss.
  • But in my game project it happens always in-game and it's really annoying and hurts my eyes.

Minimal reproduction project

ParticleFlicker.zip

@Calinou
Copy link
Member

Calinou commented Jan 11, 2022

Can you reproduce this if you disable Interpolation and set Fixed Fps to 0 in GPUParticles3D?

@Whimfoome
Copy link
Author

Whimfoome commented Jan 11, 2022

Can you reproduce this if you disable Interpolation and set Fixed Fps to 0 in GPUParticles3D?

Still happens, but it's rarer, and harder to capture on video. I feel like it may be a driver bug, will try with Linux built-in drivers later.

Epilepsy warning (flashing light)

GodotFlicker5

@Whimfoome
Copy link
Author

Happens on Linux too, also I feel like we should add epilepsy warning for the whole issue

@RandomCatDude
Copy link
Contributor

I have something very similar in my own project, with a projectile (scene instance) trail effect. The visual bug happens sometimes when the projectile is created. Its explosiveness is set to 0, so I don't think this bug is related to that property at all.

@Pandaqi
Copy link

Pandaqi commented Feb 28, 2022

Had the same issue on previous alpha versions.

Also happened with explosiveness set to 0, although less frequently than with a higher explosiveness. Calinou's suggestions also made it less frequent, but still not rare enough to be "usable". Only happened in-game, never in editor. (Windows 10, Vulkan API 1.1.0 - Using Vulkan Device #0: NVIDIA - Quadro K610M)

But it hasn't happened for me at all on Godot 4 Alpha 3, even after spending some time trying to reproduce it!

So, is this issue officially fixed?

@Whimfoome
Copy link
Author

I can still reproduce it (Arch, Godot Engine v4.0.alpha.mono.custom_build.536868b7f, Vulkan API 1.2.203 - Using Vulkan Device #0: AMD - AMD RADV TAHITI)

2022-03-01_11-55-03.mp4

@stryker313
Copy link

stryker313 commented Mar 30, 2022

1 thing that helps immensely with this is setting the transparency of the shader to 1 initially, then set the track to discrete, and set a value at 0.

So
0 seconds - 1
0.3 seconds - 0

This allows the particle to glitch out, but only in the first few moments, while hiding it from sight.

This will add an initial "delay", but the flickering is reduced to roughly 98% success.

Also, the tips by Caillou help.

@Calinou Calinou changed the title Particle Flicker when explosiveness close to 1 Vulkan: Particle Flicker when explosiveness close to 1 May 15, 2022
@Calinou Calinou changed the title Vulkan: Particle Flicker when explosiveness close to 1 Vulkan: GPUParticles3D flicker when explosiveness is close to 1 May 15, 2022
@Chaosus Chaosus changed the title Vulkan: GPUParticles3D flicker when explosiveness is close to 1 Vulkan: GPUParticles3D/2D flicker when explosiveness is close to 1 Jun 8, 2022
@WuotanStudios
Copy link

Greetings,

i also can confirm similar "issues" in Godot v4.0.alpha10.official [4bbe7f0]
see my tweets: https://twitter.com/WuotanStudios/status/1539905582077018114?s=20&t=aFLlQVQFDqu-kha9CUrAXQ
It happens if the particle gets spawned with a higher frequency, and spawned "outdoor".

Indoor it happens less, or just can't be seen. There are just some weird white fragments from time to time.
see this tweet:
https://twitter.com/WuotanStudios/status/1539910904980152323?s=20&t=aFLlQVQFDqu-kha9CUrAXQ

I don't have any small reproduction file (again) for you guys.
I just want to confirm that there is an issue.

@Zireael07
Copy link
Contributor

Still an issue on alpha 10 and alpha 13.

@AdaLollA
Copy link

Still an issue on v4.0.beta1.official [20d6672]

@LennDG
Copy link

LennDG commented Oct 5, 2022

Still an issue in v4.0beta2: #66921

Update: Still issue in v4.0beta3

@lukamilosevic
Copy link

it might help, similar thing happens to me on 2d gpu particles, v4beta3 when I change position/restart, workaround is to disable emitting before moving, but then there's a very distinct flicker that occurs, easiest way to explain the flicker is "the last frame of the particles before disabling emitting", they show up for a split second before restarting

@iRedAngel
Copy link

The same thing seems to be happening to my project. I'm using Godot 4 beta 6 and GPUParticle2D. For me it is happening only in forward_plus and mobile rendering methods, gl_compatibility doesn't seem to have this problem.

Mysterious.Flicker.GPUParticle2D.mp4

@Regrad
Copy link

Regrad commented Jul 30, 2023

Godot 4.1, GPUParticles, bug still here.

@clayjohn
Copy link
Member

@Regrad have you tested 4.1.1? There were further fixes to a similar issue that didn't make it in time for 4.1

@Regrad
Copy link

Regrad commented Jul 30, 2023

I'm doing some testing right now in 4.1.1. So far I don't see a problem.

@Faey2222
Copy link

Faey2222 commented Aug 1, 2023

Seeing the same issue in the current version available on steam (v4.1.stable.official [9704596])

@Calinou
Copy link
Member

Calinou commented Aug 1, 2023

Seeing the same issue in the current version available on steam (v4.1.stable.official [9704596])

See the above comment. This should be fixed in 4.1.1, which isn't on Steam yet as its maintainer was on vacation until today.

@Zireael07
Copy link
Contributor

If said maintainer is Akien, this vacation was a rare and well-deserved event <3

@GeminiSquishGames
Copy link

GeminiSquishGames commented Feb 13, 2024

I have a similar glitch but it's with 2D CPU particles, so I'm not sure if it's related but it looks very much the same, using 4.2.1 mono. It's odd that it just started happening, the only thing I can do is start removing things and adding them back to see what might be doing it as the particles and how I'm using them was implemented weeks before it started doing this glitch.

Edit: Changing each CPU Particle to GPU type particles seems to not glitch, for now? ¯_(ツ)_/¯

@kbhau
Copy link

kbhau commented Oct 6, 2024

Still present in 4.3, AMD hardware, CPU particles. GPU particles seem okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.