clock menu more-arrow no yes mobile

Filed under:

How rain works in Starfield (and lots of other games)

You get your own personal rain cloud

a screenshot from Starfield’s photo mode of a character standing in a block of rain Image: Bethesda Game Studios/Bethesda Softworks via thelastfastbender/Reddit
Nicole Carpenter is a senior reporter specializing in investigative features about labor issues in the game industry, as well as the business and culture of games.

Starfield players realized this week that their characters have rain clouds that follow them around planets, à la The Truman Show. Rain isn’t falling all over Neon, for instance — just wherever you roam. A Starfield player posted a screenshot from the game’s photo mode to Reddit, showing a block of rain around their character, and nowhere else.

It may have been surprising for players, but the rain trick is not unique to Starfield — it’s used in most games, according to game developers. Thomas Francis, lead visual effects artist at Darkest Dungeon studio Red Hook, told Polygon that it’s a common practice in games to attach rain visual effects to the game’s camera to optimize for performance “by not rendering every rain drop, only what is important in front of the camera.”

“The technique can also be used for snow, wind, leaves falling, dust,” he added via email. “All sorts of environmental visual effects.”

That’s what you’re seeing in this screenshot, except that the grid or block of rain appears to be attached to the character and not the camera. (For transparency, two Polygon staffers were unable to reproduce the effect; when we entered Starfield’s photo mode, the rain turned off.) You can see this clearly when the camera moves back but the character you’re playing as stays in place. Karl Schecht, a 3D environment artist and the guy who reloads household items like they’re video game guns, told Polygon that games have some “clever trickery” that’s been standard for quite a while.

“Even if what’s on screen looks real, more often than not things are quite a bit different under the hood,” Schecht said in an email. “You see, everything in a videogame, whether it’s lighting, reflections, weather stuff, and scenery are all part of a built system. They’re set up to look and feel real, but also to run smoothly on your console or PC. Let’s take the rain in Starfield as an example. Whether you’re in first or third person, the rain looks solid. But switch to photo mode, zoom out, and you’ll see the rain is actually a small particle system, about 3x3 meters, that hangs out above your character.”

David Szymanski, who created Iron Lung, broke down the effect: “Basically rain is usually done with some sort of particle system, which is just a way of making a lot of similar things that all move or animate,” Szymanski wrote. “Particle systems are great at rendering a lot of things at once very cheaply, but it would still require a not insignificant amount of processing power to have hundreds of thousands of raindrops (or more) visible onscreen, especially if they’re also transparent in any way.”

Developers can size down the particle system to have as few raindrops as possible, tied to either the player or the camera, he added: “If you tweak the size and number of raindrops right, you can have a relatively small area that’s actually ‘raining’ but still looks like a torrential downpour from the player’s perspective.”

Video games are often doing a lot of things at once, so optimization is essential to prevent “unnecessary overhead” — aka CPU/GPU strain — Schecht said. That cost Szymanski mentioned isn’t a financial cost; it’s the cost of resources. “You can think of developing a game a bit like a resource management game in and of itself,” Schecht added. “Everything you add into your game is going to cost some overhead. The more stuff you have, the more difficult it will be to run the game smoothly. So you have to use tricks and tools to lower that overhead.”

He continued: “These are all things we do in the industry to make sure that the pixels we’re pushing aren’t going to make your computer melt through the floor!”

These techniques may be common knowledge to developers, but the little tricks seem to work so well that players typically don’t notice them, in Starfield or elsewhere. It’s a peek into the labor of making games that players don’t often get to see. “I think for lots of gamers yesterday, it was the first time they saw the wizard behind the curtain, so it was funny to see all the reactions,” Francis said.