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

Add an option for immortal (infinite lifetime) particles #2614

Open
QbieShay opened this issue Apr 16, 2021 · 3 comments
Open

Add an option for immortal (infinite lifetime) particles #2614

QbieShay opened this issue Apr 16, 2021 · 3 comments

Comments

@QbieShay
Copy link

Describe the project you are working on

Various and VFX and technical art

Describe the problem or limitation you are having in your project

There is currently no way to have immortal particles. In particular, it is possible to use particles for things like grass and such, but it is not possible currently to change values in the CUSTOM vector and have them survive between particle resets

Describe the feature / enhancement and how it helps to overcome the problem or limitation

An option for particles with infinite lifetime.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Either a boolean on the time subsection as infinite_lifetime or setting -1 in the lifetime property.
Behind the scenes, Godot will just never kill the particle and never spawn new particles once the amount is reached.

If this enhancement will not be used often, can it be worked around with a few lines of script?

While these things could be achieved with multimeshes instead, there is a difference on where on hardware the logic executes: the computation for whatever is in instance_custom for multimeshes has to happen on CPU, while on particles it all happens on GPU instead.

Is there a reason why this should be core and not an add-on in the asset library?

There is no way to do drawing and GPU processing in the same way that particles do.

@Calinou Calinou changed the title Add an option for immortal particles Add an option for immortal (infinite lifetime) particles Apr 16, 2021
@Calinou
Copy link
Member

Calinou commented Apr 16, 2021

Either a boolean on the time subsection as infinite_lifetime or setting -1 in the lifetime property.

We tend to favor adding a separate boolean property over having a "magic" value for a property, so I'd go with infinite_lifetime.

@dalexeev
Copy link
Member

dalexeev commented Apr 16, 2021

Either a boolean on the time subsection as infinite_lifetime or setting -1 in the lifetime property.

We tend to favor adding a separate boolean property over having a "magic" value for a property, so I'd go with infinite_lifetime.

Only if Godot can influence the past, violating the principle of cause and effect (lifetime cannot be negative).

@QbieShay
Copy link
Author

QbieShay commented May 1, 2023

Note, this would make the existence of a trail node completely unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs consensus
Development

No branches or pull requests

3 participants