Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Sign in to follow this  
V3ndetta

Very simple Starfield generator

Recommended Posts

This is the final version(by final I mean the version containing nothing else than the necessary features required for our own project) of my simple starfield generator. The generator does not support box shape types or custom meshes, being made to be used mainly for sphere and hemisphere(shell emission or otherwise) types. Feel free to use it as you will in your projects, commercial or otherwise. You are not required to give credit to me, but of course, if you find good use of it, it would be nice. This was created to be used generally with Unity 5's procedural skybox, to make up for a nice fantasy looking cold night in some scenes. However, since I have no shader writing knowledge good enough to do something similar(yet!), I decided to make it a particle system. So if you wish to use it on Unity's procedural skybox, make sure to include a subtle bloom effect in case you use stars with a variety of colors(set the color palette on the particle system, do not change anything else). I know most members here are probably in no need for such thing, but new members may find it useful and help them learn more about how unity works.

 

Usage:

As described, if you want to use different star colors, make sure to set the color palette/grandient in the particle system's field, you are not required to change anything else.

-If you accidentally get an unsatisfying result, re-read the first part of the post. If you have any questions I will gladly try and answer them.

 

Please login or register to see this code.

For references visit: Please login or register to see this link.

 

ScreenShots:

Please login or register to see this link.

Please login or register to see this link.

 

Warning: Do not use more than 500 000 stars count, keep it 100 000 or below for budget machines, and <10 000 for weaker machines, and try to compensate for the amount with variety of size.

Edited by V3ndetta
  • Like 1

Share this post


Link to post
Share on other sites

Super cool man! Made a quick little scene to test it out

 

 774a441fda5e9f73163589d1ac6f79fc.gif

 

Share this post


Link to post
Share on other sites

Thanks, as I mentioned, I usually post my scripts when I manage to accomplish a task even though I've never done it in code, so if you are making a space game I advise you modify the code I provided, not only because you will learn more but also because I can make mistakes that will impact performance depending on your target device/s. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...