The water cycle is one of the first scientific concepts you learn about. Water evaporates from the surface of the Earth, rising, accumulating and condensing before returning to lakes and oceans in forms, such as rain, before beginning the process all over again. I don’t have to explain what rain is to you. You know rain. It’s a part of many of our daily lives, and among the most common stylistic elements in fiction. Considering its familiar nature, it’s surprising how little we know about how rain is created in videogames—and how widely these approaches can vary.
VFX artist Aaron Miller speaks to me about how Fireblade Software created the furious rainfall of naval roguelike Abandon Ship. “In Abandon Ship we wanted the weather to have a gameplay effect, which for rain was to extinguish fires. It also had to fall either straight down, or be at an angle depending on the strength of the wind.” The solution the team decided upon was to create ‘billboards’, or images of sheets of rain, in the distance of the player’s perspective, and reinforce the idea that rain is lashing your ship by spawning rain particles in cylinders attached to the game’s camera. This solution didn’t have the elusive measure of ‘thickness’ necessary to be a convincing extinguisher of in-game fires. So, Miller and company improvised. “We spawned an insanely high amount of rain particles, took screenshots of it into Photoshop, added this to the original texture and reimported it into the game. This resulted in it looking like thousands of rain particles were being spawned, when in fact it was only hundreds. This allowed us to achieve the desired result without it impacting the framerate,” Miller says. “Creating visual effects is often about taking a bunch of disparate systems and making them work in quirky ways to achieve the desired result.”
For 2D games, one of the most simple and common implementations of rain is to spawn particles above the screen, and once they reach the bottom of the screen, move them back to the top again. “For Airships: Conquer the Skies, I made a really basic 2D rain system,” says developer David Stark. “Each raindrop is a randomly placed vertical gray line. When it vanishes off the bottom of the screen, it gets moved back up to the top. There’s more intricate effects for other things, but for rain, this works fine.” The key, as always, is the end result, and how it contributes to the overall presentation of a game.
Read the Full Article here - https://www.pcgamer.com/how-developers-make-perfect-rain-in-games/