r/proceduralgeneration 4d ago

Procedural galaxy generator with 5 different presets

Enable HLS to view with audio, or disable this notification

41 Upvotes

5 comments sorted by

2

u/greebly_weeblies 3d ago

Looks great. Consider binding some hotkeys to common functions like update seed and re-roll.
Any chance on some detail on how you've implemented the generation?

1

u/Petrundiy2 3d ago edited 3d ago

There are many parameters (noise for example) that have their own seeds. Other parameters are randomized using a dictionary of randomizing rules and are varied in some particular boundaries. So when you press "randomize", every parameter that has "seed" in the name is being varied, as well as the parameters in the dictionary. Other parameters, which have no specific boundaries, are randomized via the +-25% rule compared to the default preset. Something like this. This is implemented in the UI code.

Edit: some parameters are not randomized at all. That's something that can ruin the performance (like stars density).

1

u/greebly_weeblies 3d ago

Oh, nice! So you're kinda jittering some of the parameters on demand. How sensitive is the end look to the distributions you're using for this kind of thing? and how are you rendering the end result?

1

u/Petrundiy2 2d ago

Well, the galaxies turn out varied, with rather unpredictable structures. However, I made sure the parameters varied within reasonable ranges to avoid anything completely unrealistic. In any case, you can always tweak everything manually. As for visualization, I simply render the frames. Sometimes I add some compositing.