CHAPTER 94: The Rain, the Smog, and the Heat (Patreon)
Content
CHAPTER 94: The Rain, the Smog, and the Heat
Los Santos was in Southern California. And Southern California almost never rained. But George was going to make it rain anyway.
The game needed it. An open world that always looked the same was an open world that felt static, predictable, like a stage set that never changed its backdrop. The day/night cycle already transformed the city every 24 minutes. The weather system would transform it in ways the player couldn't anticipate: a sunny day that suddenly clouded over, a drizzle that soaked the streets, a morning fog that dissipated with the sun, and the permanent smog of Los Santos that turned every sunset into a blaze of orange and purple.
George designed the weather system with four conditions that could combine and transition between each other:
*
The rain of Los Santos wasn't the rain of City of Tears.
In Hollow Knight, the rain was a 2D particle system with five hundred drops that fell across the screen and splashed against the ground in a controlled space. In Los Santos, the rain was three-dimensional: the drops fell from the sky dome to the ground with trajectories that varied according to the wind, splashed against the buildings and the cars and the NPCs, and covered the surfaces with a layer of moisture that changed how the light interacted with everything.
George implemented the rain in two layers.
The first layer was visual: particles. Three hundred drops on PC, a hundred on PS2, two hundred on Xbox. Fewer than the five hundred of City of Tears because in 3D each particle had three coordinates instead of two and the rendering cost was higher. The drops were born at the top edge of the camera's frustum at a random height and fell with the gravity of the physics engine, accelerated by a horizontal wind vector that gave them an inclination of up to 15 degrees. When they touched a surface, they spawned a splash of 3 particles like in Hollow Knight but in 3D: the splash particles scattered in a hemisphere over the point of impact.
The second layer was material: the wet surfaces. When it rained, the engine modified the material properties of all the exterior surfaces. The asphalt darkened 30% because wet asphalt absorbs less light. The specular of the cars multiplied by 3 because wet metal reflects more. The concrete of the sidewalks changed from light gray to dark gray. And the glass windows, which were normally semi-transparent, became partial mirrors that reflected the lampposts and the neons like distorted patches of light.
The combined effect was that a Los Santos street in the rain looked fundamentally different from the same street in the sun. The water drops were a secondary visual effect; what changed the street was how the rain altered the relationship between the light and the surfaces. A dry street was matte, opaque, with sharp shadows. A wet street was bright, reflective, with the light of the lampposts spreading across the asphalt like pools of gold.
George thought about City of Tears. Lena had created rain that fused the music with the drops. Here the rain had no music: it had the sound of water hitting metal and asphalt and glass, the noise of the cars' windshield wipers (which activated automatically when it rained, a detail George added because he remembered the original had it and that the players noticed it), and the change of tone of the traffic when the tires rolled over wet asphalt instead of dry.
And the rain affected the driving. Daniel modified the physics module so that during the rain the friction coefficient of the tires was reduced by 25%. The cars braked more slowly, skidded on tight curves, and the overall control felt more slippery. It wasn't a dramatic change: a careful driver wouldn't notice it. A driver who floored it on a curve would.
*
The smog of Los Santos was an identity.
Los Angeles had smog as a permanent condition: a layer of pollution that covered the city like a gray blanket that thickened with the midday heat and that tinted the sunsets colors that wouldn't exist without the chemistry of the polluted air. The smog of LA was ugly in reality and beautiful in memory, because memory turned pollution into aesthetics: the orange sunsets people associated with California weren't orange from the setting of the sun. They were orange from the smog.
George implemented the smog as a haze that added to the distance fog of the engine. Where the distance fog was a uniform fade that faded the distant objects toward the color of the sky, the smog was a haze that had its own color: yellowish gray in the morning, orange in the afternoon, purple at sunset. The smog thickened with the time of day following a curve that was minimal at dawn (the cold morning air keeps the pollution low), maximal at two in the afternoon (the heat lifts the particles), and decreasing at dusk (the temperature drops and the smog settles).
The effect of the smog on visibility was subtle but cumulative. At noon with maximum smog, the effective draw distance was reduced 20% because the distant buildings blurred into the haze before reaching the edge of the standard fog. The horizon stopped being a sharp line and became a smear where the buildings and the sky merged into a gradient of dirty yellow.
Marcus saw the smog working and said something George didn't expect:
"Don't take it out."
"I wasn't planning to take it out."
"No, I mean other games would have put the smog in as a negative effect. Something that activates and that the player wants to go away. The smog of Los Santos should never go away. It's part of the city. Los Angeles without smog is San Diego. Los Santos without smog is any generic city. The smog is what makes it Los Santos."
George nodded. The smog stayed. As a permanent texture of the air, as a color that tinted everything, as a constant reminder that Los Santos was a city drowning in its own success and that was beautiful precisely because of it.
*
The heat haze was the cheapest and most impactful visual effect of the weather system.
On hot days in Los Santos, the asphalt radiated heat that distorted the air above it. It was an effect anyone who had walked through a parking lot in summer knew: the air over the asphalt rippled, the images of distant objects deformed as if seen through water, and the line of the horizon trembled with a movement that was hypnotic and uncomfortable at the same time.
George implemented it as a post-process shader. After the renderer finished drawing the complete frame, a post-processing shader displaced the pixels of the lower half of the screen according to a sinusoidal function that varied with time. The displacement was 1 to 3 pixels horizontally, which produced a subtle rippling that deformed the objects near the ground without affecting the sky or the tall buildings.
The shader cost less than half a millisecond per frame on PC. On PS2, George implemented it as a reduced-resolution effect: instead of displacing individual pixels, the PS2 shader displaced blocks of 4x4 pixels, which produced a cruder effect but that at the speed of the game was indistinguishable from the PC one.
The heat haze activated automatically when the temperature of the day/night cycle exceeded 30 simulated degrees, which happened between eleven in the morning and four in the afternoon on sunny days. It deactivated during the rain (the water cooled the asphalt) and during the night (no sun, no radiated heat). It was an effect that lasted five hours of game time and that turned every Los Santos midday into a visual experience different from dawn and sunset: where dawn was clear and sunset was orange, midday was rippling, blurry, with the air trembling over the asphalt as if the city were boiling.
"The heat haze is my favorite effect," Lena said when she saw it working. "Because it's invisible. It isn't an effect the player consciously identifies but a sensation. The player feels heat when he sees the haze even though he knows it isn't hot. The eye tells the brain the air is hot and the brain believes it."
"It's synesthesia," George said.
"It's synesthesia. My specialty."
*
The four weather conditions (sunny, cloudy, rainy, clear at night) transitioned gradually, like a dial that turns instead of a switch that jumps.
George implemented a weather transition system that lasted between 2 and 5 minutes of real time. The sunny sky didn't turn rainy from one frame to the next. The clouds appeared gradually in the sky dome as semitransparent textures that thickened over time. The sunlight dimmed as the clouds covered the sky. The first drops fell when the cloud cover exceeded 70%. The rain intensified over a minute until reaching its maximum. And the surfaces got wet progressively: the asphalt didn't go from dry to wet in one frame but darkened gradually over 30 seconds of real time.
The reverse transition was just as gradual. The rain stopped. The clouds cleared. The sun broke through the gaps in the clouds creating rays of light George implemented as descending spot lights that moved with the clouds. The surfaces dried: the asphalt recovered its original color in 2 minutes, the cars lost their wet reflections in 1 minute. And the smog came back, because the smog always came back.
George programmed the weather as random within parameters: Los Santos had a 70% probability of sunny sky, 20% cloudy, and 10% rain in any 24-hour cycle. The rain never lasted more than 4 hours of game time (4 real minutes). The cloudy days could last the whole cycle. And the sunny days with smog were the most common, which was faithful to the real Los Angeles where it rained thirty days a year and was sunny the other three hundred thirty-five.
*
June. George went to lunch in Oakland for the first time in three weeks.
He had spent twenty-one nights sleeping in the Townsend Street office or getting to his apartment at midnight and leaving at seven in the morning. Margaret had called him four times. Claire had sent him two emails with the subject "YOUR MOTHER" in capital letters that meant Margaret was pressuring Claire to pressure George to come eat.
Richard opened the door. He looked at George. The Hightower inspection: deep shadows under the eyes, three-day stubble, the same T-shirt as last week.
"Your mother is going to kill you," Richard said.
"I know."
"And then she's going to feed you."
Margaret hugged him in the kitchen with the strength of a woman who hasn't seen her son in three weeks and who has decided that the hug is going to last long enough to make up for every lost day. Then she served him a plate of chili that was bigger than Richard's, which was the highest culinary honor of the Hightower house.
Lena was at the table. She hadn't missed a single Sunday. Lena came to the Hightower lunches with the regularity of someone who has adopted a family or has been adopted by one, and the distinction was irrelevant because the result was the same: a place at the table, a portion of chili, and Margaret asking her if she ate enough, which Lena always answered with "yes" and Margaret always ignored by serving more.
"How's the game going?" Richard asked, with the same intonation he would use to ask "how's the shop going?" if George were a mechanic instead of a video game designer.
"I'm making it rain," George said.
Richard looked at him.
"In the game?"
"In the game. Rain with drops that fall from the sky and wet the streets and make the cars skid."
"The cars actually skid?"
"The cars in the game. Yes. When it rains, the streets are wet and the cars brake more slowly."
Richard processed this chewing chili.
"In Oakland, when it rains, the cars brake more slowly," Richard said. "The tires lose grip. People brake late and crash. I saw it a thousand times at the shop. Cars with the front crushed from braking on wet roads."
"It's the same physics," George said. "The friction coefficient drops when the surface is wet. In the game I use the same equations."
Richard nodded. He understood that his son was replicating something he had seen a thousand times in real life, which meant the game resembled real life, which was good even though Richard couldn't explain why.
"And the smog?" Lena asked, who had heard George talk about the smog in the office for weeks.
"The smog works. It's permanent. It thickens with the heat and tinges orange at sunset."
"Does the city smell of smog?"
"The city doesn't smell of anything. It's a game."
"It should smell. If you can make it rain and the air distort with the heat and the cars skid, you should be able to make the city smell."
"We don't have smell-o-vision, Lena."
"Yet," Lena said, with the seriousness of someone who believes technology will eventually solve every sensory limitation and who plans to be there when it does.
Margaret served more chili without anyone asking. Richard talked about the shop where he no longer worked but that he kept talking about as if it were yesterday. Claire called to say she couldn't come because she was reviewing contracts with the music-licensing lawyer. Lena stayed until the afternoon, ate chili, and listened to everything Richard said about cars.
George ate two plates. He slept on his parents' couch until four in the afternoon. He woke up with a blanket Margaret had put over him and with the June sun coming through Oakland windows, and for a moment he stopped thinking about NGN, about Los Santos, about the streaming, about the impostors, about the smog. He thought about the chili and the blanket and that Richard was healthy and Margaret was happy and that Sundays existed precisely for this: to remember that the cities he built on screens were important but that the people who waited at the tables were more so.
Then he got up, gave Margaret a kiss on the forehead, squeezed Richard's shoulder, and went back to Townsend Street to program the fog system, which was the last thing the weather system needed before being complete.
End of Chapter 94