Windshield Rain Simulation

Hey guys!

It’s been a really long time since I posted, but I’ve been working on something I thought would be cool to show.

I’ve been developing a simulation of how rain interacts with windshields and windshield wipers as an element of the driving simulator in my game.


(This is the displacement map generated by the simulation being rendered on a debug texture)

Simulation

The way it all works is a bit clever. It uses a custom, but rudimentary, rule-based fluid simulation. It randomly creates droplets at random locations and sizes, and decides if one should start falling or not.

Windshield Wiper

The windshield wiper is simply an object that moves with a sine wave and uses the “Move [object] away from [object]” action to push the droplets. Whenever a droplet collides with the wiper, it’s given a trail, to simulate the smearing of water that gets beneath the wiper in real life.

Droplets

The actual droplet itself is black, but it uses an effect to give it an inner glow, so droplets can visually combine. It uses a glow so that the edges “reflect” light stronger, because after that, it’s fed into a displacement map.

I don’t… really expect any of this to be performant. I just did it because I’m over the top and… bored.

If you’re curious, this is what the driving simulator looks like (yeah, the simulation is probably too realistic for its actual art style).

(And yes, that’s all real 3D! Let me know if you want to see more of this).

Alright, that’s all I have to show today.
Cheers! :yellow_heart:

2 Likes

how can I use it @DesmonDev ??lol

1 Like

Yes please, I would love to see more, it’s so creative and beautiful.

1 Like

LOVE IT! :heart:
It looks so good!

2 Likes