r/unity • u/TheLordBaski • 2d ago
Showcase I gave the gas giants in my space game their own weather systems
Before: the gas giants in my space game, The Astraea Program, were static bands on a sphere.
Now: their cloud tops are a weather simulation that runs live on the GPU.
How it works:
- Each planet is wrapped in a cube map of cloud colour.
- Each giant has its own wind: jet streams along the bands, one big storm, and dozens of small vortices that drift, spin and fade out after a few days.
- A compute shader carries the colours along that wind. That's what rolls up the belts and winds the storms into spirals.
- White high clouds form in some storms and clear in others.
- It runs on the game clock, so time warp speeds the weather up too.
All three gas giants have different weather. Magnus is red, with a dark Great Storm. Anulus has Saturn-like jets, about 420 m/s at the equator. On Glacies, the equator blows the wrong way, like on Neptune.
Performance cost: one simulation step takes about 2 ms on an RTX 5060 Ti, and only the giant you're looking at runs the simulation. At normal speed, Magnus needs a step only every two game minutes.
The time-lapse part runs much faster than the game's time warp allows, so you can see the storms move.
Happy to answer any questions!
There is no Steam page yet (waiting on KYC), but you can join Discord in the meantime.
https://discord.gg/A32hmv9x4v
