4
\$\begingroup\$

If you've ever seen a picture of space, you'll most likely see that there is some kind of pretty nebula in the background. I would like to find out how I could create random, semi-realistic looking nebula, so my current background (gif below) looks less boring. The reason I want it to be random is because it wouldn't make much sense for the same nebula to appear over and over again. I've heard that shaders might be what I'm looking for, but I've never even touched a shader, so I wouldn't know.

What I currently have:

star background

\$\endgroup\$
  • \$\begingroup\$ codementor.io/c_sharp/tutorial/… Similar concepts could be applied in sfml I imagine. \$\endgroup\$ – jgallant Aug 12 '15 at 16:51
  • \$\begingroup\$ @Jon He wants them far away. In that example there is a cloud. I would recommend you to generate a bitmap for background. You need two bitmaps with size of screen when one ğoes out the screen send it back to the start of screen and regenerate it. You can use random numbers to select position of your nebulaes. \$\endgroup\$ – Arda Kara Aug 13 '15 at 8:15
  • \$\begingroup\$ If you want it to be randomly generated and never repeat as you scroll, you're going to need to implement some noise in a shader. \$\endgroup\$ – NeomerArcana Jul 23 '19 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.