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

Allow optional seed specifying for particles #6226

Open
QbieShay opened this issue Feb 3, 2023 · 1 comment · May be fixed by godotengine/godot#92089
Open

Allow optional seed specifying for particles #6226

QbieShay opened this issue Feb 3, 2023 · 1 comment · May be fixed by godotengine/godot#92089

Comments

@QbieShay
Copy link

QbieShay commented Feb 3, 2023

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
Copy link
Member

Calinou commented Feb 3, 2023

Other use cases include:

  • When using Movie Maker mode several times, ensure you always get the same result every time. If performing quality comparisons, this can be important to have.
  • During replay playback (with an in-game replay system), ensure particles always behave the same way every time the replay is played. This is not strictly required, but it helps make the replay more accurate to the real gameplay sequence (provided you can get the automatically generated random seed from the node, then store it in the replay file).

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

Successfully merging a pull request may close this issue.

2 participants