Skip to content

Allowing for manual setting of RandomSeed#1592

Merged
cameronwhite merged 8 commits into
PintaProject:masterfrom
Lehonti:feature/improved_reseed_dialog
Jul 6, 2025
Merged

Allowing for manual setting of RandomSeed#1592
cameronwhite merged 8 commits into
PintaProject:masterfrom
Lehonti:feature/improved_reseed_dialog

Conversation

@Lehonti
Copy link
Copy Markdown
Contributor

@Lehonti Lehonti commented Jul 4, 2025

As mentioned in #1591

image

@cameronwhite
Copy link
Copy Markdown
Member

cameronwhite commented Jul 5, 2025

I agree being able to control the random seed is great 👍

I wonder if the Reseed button is still needed though with this change? I'm not sure how useful it is to generate a new random value to use as the seed, vs just changing the value directly until you find something that looks good. (Having a slider widget instead might be nice to make it easier to adjust interactively)

@Lehonti
Copy link
Copy Markdown
Contributor Author

Lehonti commented Jul 5, 2025

@cameronwhite I think it's really useful to have the reseed button anyway. Any number that the user might type is not necessarily of the same quality as a generated one, just like if I'm asked to type a 'random' string of letters I might write "asdfasdfasdfasdf" every time instead of something truly unique. This change is mostly about reproducibility and exploration (like being able to go back to the number that is immediately lower or higher).

As for the slider, it could be fun, but something to consider is that there are way more possible values of int than there could be pixels in any given row of a screen, so maybe each position (pixel) corresponds to a certain number after dividing and rounding? i would need to investigate how GTK handles sliders when the range is so wide. I think if we implemented this it should be in addition to what we have, without replacing it.

If we add the slider, though, I have the idea that, on each side, we could add buttons that allow jumping large values (+10^6, -10^6) or scale the chosen value (x2, /2)

@cameronwhite
Copy link
Copy Markdown
Member

I don't think there should be a quality difference in this case though - this number is just the seed for the random number generator, so as long as we're using a good quality generator then there shouldn't be any correlation in the resulting random sequences between having a seed of 1 versus 2, versus a seed of 115885232

@Lehonti
Copy link
Copy Markdown
Contributor Author

Lehonti commented Jul 5, 2025

@cameronwhite I understand that the seeds 0, 1, 2, ... are no different from something like 115_885_232 in terms of the quality of the results obtained from using them, and that is a great point.

However, I also mean that with the spin button the user will be limited to exploring the numbers neighboring the initial seed and the seed values they can think of typing. In different sessions where they use the application they might obtain similar results, but with the "Reseed" button they can let the computer choose some other number neighborhood.

I'm usually not that insistent, but in this case I think I clearly see the benefit of keeping the button :)

The argument is also about allowing the user to do things in different ways and enabling them to choose what is most convenient for them — which is also why I don't object to the idea of the slider.

@cameronwhite
Copy link
Copy Markdown
Member

I don't mind keeping the button - was mainly looking to see whether the dialog's UI could be simplified.

Should this button go first if we still want users to be using it primarily? I also think we should use the word Seed more consistently in the labels to make sure it's clear what the value actually means

e.g.
Screenshot 2025-07-05 at 11 35 54 PM

@Lehonti
Copy link
Copy Markdown
Contributor Author

Lehonti commented Jul 6, 2025

That is not a problem @cameronwhite :) I just moved the button to the left, and also changed the caption in CloudsEffect to "Random Noise Seed". Is this what you had in mind?

@cameronwhite
Copy link
Copy Markdown
Member

Thanks, yeah I think that looks good - could you also just update Frosted Glass with the same?

@Lehonti
Copy link
Copy Markdown
Contributor Author

Lehonti commented Jul 6, 2025

Sure! I just did

@cameronwhite cameronwhite merged commit cea9369 into PintaProject:master Jul 6, 2025
6 checks passed
@Lehonti Lehonti deleted the feature/improved_reseed_dialog branch July 6, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancing seed control in SimpleEffectDialog, showing the seed and allowing for its manual setting

2 participants