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

Particle positions are not continuous when the Particles node is moved at a high speed (missing interpolation) #47973

Closed
floppyhammer opened this issue Apr 17, 2021 · 10 comments

Comments

@floppyhammer
Copy link
Contributor

Godot version:
3.3rc9, 4.0

OS/device including version:
Windows 10

Issue description:
Particle positions are frame rate dependent, which causes discontinuous distribution of the particles when the particle node moves fast.

Particle2D:
particle2d

Particle3D:
image

Steps to reproduce:
Create a 2D or 3D particle node, set a high emission amount, animate the node itself to move fast, observe the particle clusters.

Minimal reproduction project:
No need.

@Calinou
Copy link
Member

Calinou commented Apr 17, 2021

I don't see a way to solve this, aside of unlocking the framerate by disabling V-Sync. Is there any literature on other engines solving or working around this problem?

Also, particle emission by distance (instead of time) will be supported in 4.0 via manual emission.

@Calinou Calinou added documentation and removed bug labels Apr 17, 2021
@mortarroad
Copy link
Contributor

When emitting, you can simply interpolate between the old and the new transform of the emitter.
This comes with the issue that "teleporting" the emitter doesn't work anymore by just setting the position. (It will cause a thin trail of particles from the old to the new position, because it is considered a very fast movement.)
This could be solved by having a dedicated "teleport" function for that.
And this can also be made into a flag to turn this behavior on and off.

@Calinou
Copy link
Member

Calinou commented Apr 17, 2021

This could be solved by having a dedicated "teleport" function for that.
And this can also be made into a flag to turn this behavior on and off.

See also godotengine/godot-proposals#671 and godotengine/godot-proposals#1936.

@Calinou Calinou changed the title Particle positions are not continuous Particle positions are not continuous when the Particles node is moved at a high speed (missing interpolation) Apr 17, 2021
@Calinou
Copy link
Member

Calinou commented Apr 17, 2021

@floppyhammer In the meantime, you may be able to hide this issue by making particles emitted over a small box area (or perhaps a sphere) rather than a single emission point. When emitted, particles will be evenly spread within the box or sphere. You can do this by changing the emission point property in the particles material. This is available in both Particles and CPUParticles, in both 3D and 2D.

@floppyhammer
Copy link
Contributor Author

@Calinou Hadn't thought of this workaround. Thanks!

@reduz
Copy link
Member

reduz commented Apr 22, 2021

There is a fixed FPS for particles, you can put it to 60 to fix this.

@floppyhammer
Copy link
Contributor Author

@reduz Setting fixed_fps to 60 has no effect when the game already runs at 60 FPS.

@Calinou
Copy link
Member

Calinou commented Apr 25, 2021

@reduz Setting fixed_fps to 60 has no effect when the game already runs at 60 FPS.

Do higher fixed_fps values such as 120 look smoother?

@floppyhammer
Copy link
Contributor Author

@Calinou No, it makes no difference when going beyond 60.

Peek 2021-04-26 11-17

@Calinou
Copy link
Member

Calinou commented Oct 12, 2023

Closing in favor of godotengine/godot-proposals#8088, as feature proposals are now tracked on the Godot proposals repository.

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

6 participants