Particle Systems

The big focus of the atmosphere of the project is the rain, and the biggest part of the rain is the particles. Early on, I was looking into a different way to handle it, maybe using scrolling Render Textures, but any alternative proved either way more complex or way more processing intensive. So particle system it was, but it’s not just one particle system at play. There are multiple particle systems working in conjunction with each other to achieve the full effect, and I want to highlight each of them.

Rain Systems

The obvious star is the rain system. It spawns the big rain particles that fall to the ground and is controlled by the arrow keys. A cool note is that shifting the direction of the wind shifts both the horizontal velocity of the drops and the position of the emitter, ensuring that every particle generated gets its full value and screen time.

There are also two layers of rain, a main and foreground layer. The main layer interacts with areas of contact, destroying rain particles if they interact with cover or umbrellas. The balance between the foreground and main system’s levels was a tough balance as I wanted rain to feel consistent, but not unlinked from the scene elements entirely.

Impact Systems

Next, I needed to add particles for drops hitting the ground. I looked into having this linked to the previous system, having each drop spawn their own impact particle, but it proved to be too processing intensive and unnecessary, as spawning them randomly achieved the same effect at a fraction of the cost. I programmed them to increase in frequency as the rain got heavier and also programmed them to emit in relation to their scale. Originally they would spawn the same amount no matter the size of the spawn area, now everything is proportional to size. I also made it work with rectangular areas, so angled areas like the awning could have layered impacts.

Puddle Systems

This was largely similar to the impact systems, adding more ripple like animations to the puddle to represent impacts with falling drops. I experimented with doing more warping and such with the particles, but the end result read more muddy and unclear than I had hoped. At such a small resolution, readability trumps “realism”.

Drip Systems

Next, I wanted to achieve the effect where drips accumulate and fall in drops under places like scaffolding. The system works by spawning a pixel that slowly gets more and more solid. When that particle gets to the end of its lifetime, it spawns a new drop particle which falls to the ground. I also made them stick around longer than the rain to represent the last drops falling long after a storm. I’m actually most proud of these effects. I really like how they look and what they add to the project.

Window Systems

Lastly, I made special systems for the cars to capture that speckled look cars get in rain. Speaking honestly, I don’t think I quite hit the mark. At this scale, single pixels hold a lot more weight than those drops realistically would. Still, I gave it my best shot. There are two systems, one static and one dynamic. The static particles stay in place, fading in and out. The dynamic systems fall with gravity, picking up speed to simulate picking up more drops as they fall. There’s no way to make particles collide with each other, so just simulating it was as close as I could get. They are definitely a positive addition, their inclusion makes the project better, but they don’t quite hit the mark for me.

Conclusion

Overall, the particle system really worked well to make the rain real and tangible. They were an invaluable aspect of this project and I am super happy with what I was able to accomplish with them.

Next
Next

Environment Iteration