Screen Distortion Rain

development

#1

I made a version of this over a year ago, and it got some support. Someone recently brought it back up, so I figured now is as good a time as any to remake it!

For games with rainy environments, having droplets on screen can really add immersion to the game.
My original inspiration for this was Hard Reset: Redux. It was a small feature, but it felt so good. For showcase places, it’s even better.


What does it do?

This creates small “water droplets” on the screen, using Glass material balls to give it a distortion effect.


Features:

  • Customization
local Settings	= {
	
--	Rate: How many droplets spawn per second
	Rate	= 8;
	
--	Size: How large the droplets roughly are (in studs)
	Size	= 0.1;
	
--	Tint: What color the droplets are tinted (leave as nil for a default realistic light blue)
	Tint	= Color3.fromRGB(226, 244, 255);
	
--	Fade: How long it takes for a droplet to fade
	Fade	= 1.5;
	
};
  • Droplet Formation

Using a bit of math.random(), it gives natural feeling droplet formations (not just single spheres) and gives some nice variations to the droplets.

  • Droplet "Running"

Droplets are created via a SpecialMesh, allowing them to be streched down, imitating a “running” effect.

  • Coverage Detection

If the camera goes under a roof, or tree, or any sort of cover, the raindrops will stop spawning.

  • Camera Angle Conditions

If the player looks down, thus shielding his/her eyes from the rain, the droplets stop spawning.

  • Render Settings Compatibility

Because Glass doesn’t render properly on low graphic settings, if the player lowers his/her settings below 8, it stops rendering. This way, you don’t have to worry about lower settings failing to run the game properly. They just won’t have the extra bonus immersion. :man_shrugging:

Performance:

Steady 60FPS, ~1.1% CPU Usage

Warning:

It relies on glass, and therefore brings with it all the limitations of Glass.


Files:

Example place:


Script File: (Contributions and forks are welcome!)

Roblox Library:


Making A Circular Color Palette Gui
closed #2

This topic was automatically closed after 1 minute. New replies are no longer allowed.


opened #3

#4

Thank you, thank you, THANK YOU! Was about to look for someone who could script this effect for me. You’re a life saver!


#5

Aren’t you the same person who made that one dual rendering resource for gun scopes? You’re quite the magician at work and I have got to thank you for making such a thing public.

Take the like, I’ll take the model.


#6

I been waiting for this thanks for this man you really did a good job know i can use it in games :laughing:


#7

Looks great, I only wish it was possible to make it harder to distinguish the spheres connected in droplets though.


#8

You could edit it so that the droplets are turned into a union. That should fix the effect but might make a bit of lag.


#9

You’re welcome! Enjoy!


#10

Yup, that was me! Thanks!

Enjoy!


#11

I considered that, actually, but decided that live unioning is just not a great feature yet and held off on it.


#12

Wow! This is amazing. You’re seriously incredible, you come here out of nowhere scripting some awesome things, and then you uncopylock them!

If anyone on this forum deserves to become a ”Roblox Champion”, it’s you.


#13

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


#14

Amazing!!! I’ll definitely be using this some time in the future. Thank you!!


#15

I used your first version over a year ago, really neat effect. Awesome to see how you have improved with your scripting practices in that time.


#16

This is really cool. My only suggestions would be make it less opaque since rain drops aren’t that blue. Also, if you could implement a running method that would be rather neat. One where when the camera is facing up the droplets don’t move, but if the camera is vertical(level) the droplets will run down the screen a bit. I know it’ll be a little more difficult, but it’d really help make this more realistic. Still cool regardless.


#17

I finally got what I needed! Thanks so much man. :hugs:


#18

I wanted to do something similar. In my opinion, it looks very good. Good job. I will use it in my future projects.


#19

Exactly. The best way to incorporate unions would be having a bunch of prefabs, since the real time unioning system isn’t adequate for a lot of quick real time operations yet sadly :frowning:


#20

I might consider using this with my upcoming swimming system