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: GPUParticlesCollisionSDF3D does not work after baking until the scene is saved and reloaded #60994

Open
Tracked by #61067
Calinou opened this issue May 13, 2022 · 1 comment

Comments

@Calinou
Copy link
Member

Calinou commented May 13, 2022

Godot version

4.0.alpha8

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 510.60.02)

Issue description

Particle collision with a GPUParticlesCollisionSDF3D does not work after baking until the scene is saved and reloaded.
Also, if you clear the texture data while the scene is open, SDF collision will still work (even though it shouldn't).

This hints at a signal not being emitted or a function not being called when the GPUParticlesCollisionSDF3D's texture property changes.

I stumbled upon this while working on #60992.

Steps to reproduce

  • Add a MeshInstance3D and a GPUParticles3D node.
  • Enable collision on the GPUParticles3D's process material. Also increase the GPUParticles3D's amount to 100 and lifetime to 10. On the process material, change the emission shape to Sphere so you can see particles falling down individually.
  • Add a GPUParticlesCollisionSDF3D that covers the entire MeshInstance3D.
  • Select the GPUParticlesCollisionSDF3D node and click Bake SDF at the top of the 3D viewport.
  • Notice that the particles doesn't collide with the generated SDF.
  • Save the scene then use Scene > Reload Saved Scene in the top-left corner of the editor.
  • Notice that the particles now collide with the generated SDF.

Minimal reproduction project

test_gpuparticles3d_sdf_collision_2.zip

@and-rad
Copy link
Contributor

and-rad commented Jul 20, 2022

This issue and #53851 might be caused by the same thing. What both of these issues have in common is that they go away if you reload the scene, which means there might be something that is not properly updated at the time these resources are created and only after a scene is loaded.

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

No branches or pull requests

4 participants