godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.08k stars 69 forks source link

Allow optional seed specifying for particles #6226

Open QbieShay opened 1 year ago

QbieShay commented 1 year ago

Describe the project you are working on

Various VFX - specifically, looping flipbook generation in Godot.

Describe the problem or limitation you are having in your project

I cannot have looping simulations that also behave consistently and generate a flipbook out of it, because particles don't expose their random seed to the user.

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

Have an option to specify a seed for particles to use instead of using a random internal one, and have the option to also use a mod operation on the particle index to make the same particles from separate loops behave in the exact same way.

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

see above

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

no, it cannot. Particles don't expose their random. And for using a modulus on the indexes, it requires to make the process material as a shader, losing all the configuration and flexibility on it. Furthermore, it would be easier if it was managed by the particle node itself rather than the process shader.

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

see above.

Calinou commented 1 year ago

Other use cases include: