Better Night Sky

It’s simple, it’s a script that implements a better (visually) night sky.

Right now it supports a few more things compared to the current roblox night sky such as:

  • Falling Stars
  • Nebulas (They aren’t anything too special)
  • Optional Day Night States (Stars can be left visible at day too, not only night.)

Pretty much everything about it can be customized inside the local script at the ShaderData module script. Sorry this does not have some fancy menu to change its settings.
Almost every value should have its own comment in the ShaderData module, here’s a few basic things you can change in it as an example:

  • Star Amount
  • Size of stars
  • Distance of stars
  • How many can and cannot flicker
  • Amount of falling stars appearing
  • Amount of nebulas appearing
  • Color (Can choose whenever or not to use a single color or to use a random color selected from between two other colors, applies to all objects)
  • If the stars follow the moon or not (If they follow the moon they can give the effect of planetary rotation, looks cool)
  • And many more that you’ll find in the ShaderData module

You may also notice that it’s somewhat to very laggy, you can try setting method 1 to false and set method 2 to true, this will make it so the stars are rendered as gui rather than spheres in the workspace. This should help with performance a lot however may look slightly to noticeably worse. Also with method 2 the script will no longer generate any falling star.
Also you can use all 3 methods at once.
They might also not show up if your graphical settings are set too low or if Atmosphere Density is set too high along with fog.


To set it up you just put the NightSkyShader script in any place you want (that can actually execute them) and put the Modules folder (not the one inside the NightSkyShader script) in ReplicatedStorage.


I know this is not very professional but i guess it is what it is. Let me know if something is broken or if you have some suggestions for it, i might try updating/improving it in the future.
Oh yeah in the future I may try to upload some pretty fancy reflection system (it’s not “RTX” or things like that), so if you want, you can stay tuned for that.


The File:
Distro_1.1.rbxm (23.0 KB)

52 Likes

maybe link a test place bcuz people are lazy and dont want to drop files into studio
(me, I’m lazy; please link a test place)

1 Like

NightSky Shader.rbxl (243.6 KB)
Here, also has a Day Night cycle system i took from one of my projects, so you may find some random stuff in ServerScriptService and ServerStorage that have nothing to do with the actual night sky script

5 Likes

Is there a way we can change to make it less “cartoony” as visualised in your thumbnail? Like changing the colours, added less stuff etc.

You can actually change everything youve said under the script, in the ShaderData module script. The thumbnails themselves are just exaggerated a bit just to properly visualize all its capabilities. Each property in the ShaderData module script should have its own little comment indicating what that feature does, however if you’re still unsure then feel free to ask!

1 Like

Hey!

For some reason, i implemented this and its extremely laggy when I turn my camera with it for some reason. (even on method 3)

I think it might be because of the falling stars (you might have those set to be very frequent and in large amounts, and those things can be yet another source of decent lag if aggressively used)

My problem with this is that it is not optimized at all, I get like 40 frames on a baseplate on graphics 1 and I have a good PC, maybe it’s just me but I don’t know

Yeah very sorry about the current performance issues. The two main factors in performance loses would be using Method 1 and falling stars.

Are you planning on improving it? I’d really love to use this in a large game I’m working on.

Got a video? If yes, I would appreciate it.

I am actually planning to make a new version however when i will do it is something im not too sure about sadly…

Here’s one clip i got from a bit ago.

1 Like

Not bad, but i think you could optimize the module a bit more, It is nearly impossible to use this module without lag on mobile.

1 Like