Blustery and chillier today and tomorrow with showers or longer spells of rain. Drier by midweek.
It's no secret that our old weather system was a huge mess of programmer art and performance issues, which is why it had to be removed from the game a long time ago. We were able to resolve the performance issues by doing more optimizations ourselves and relying less on Unity's particle system optimizations. We sort of rolled our own super primitive voxel collision to handle the coarse, large-scale collisions. Unity then only has to sort out the detailed collision on the last couple of meters above ground.
As for visuals, I think we did it right this time by having a system that is almost entirely artist-driven. The code then simply blends between various weather presets. This also has the advantage that everything can be adjusted by server mods, allowing for endless customization in the future.
Here's a short explanation of the main weather convars for server owners:
weather.load - loads a specific weather type
weather.reset resets to dynamic weather
weather.report prints the current dynamic weather
There are currently the following weather types that can be loaded this way:
An example is
In terms of affecting gameplay, server owners can also adjust how wet players get from rain and snow:
When using the default dynamic weather, server owners can adjust the probability of every weather type individually:
If all of that still isn't enough customization for your particular server, then you can also adjust every individual parameter of the weather system. Note that negative values (-1) indicate that the value isn't overwritten and is using whatever the dynamic weather system is currently outputting. These commands must be run from server console - otherwise use
sv for server commands replicated on client.
weather.rain- How much it should rain
weather.wind- How much wind there is (mostly visual, affects certain vegetation)
weather.thunder- How much thunder / lightning there is
weather.rainbow- Can be set to forcefully trigger a rainbow
weather.fog- How much fog there is
weather.atmosphere_rayleigh- Rayleigh scattering intensity (determines the color of the sky - play around with it)
weather.atmosphere_mie- Mie scattering intensity (determines the color of the sky - play around with it)
weather.atmosphere_brightness- Overall brightness of the sky
weather.atmosphere_contrast- Overall contrast of the sky
weather.atmosphere_directionality- Directionality factor that determines the size of the glow around the sun
weather.cloud_size- Scale of the cloud layers (does not affect the cloud billboards)
weather.cloud_opacity- Opacity of the cloud layers and billboards
weather.cloud_coverage- How much sky is covered by the cloud layers
weather.cloud_sharpness- How sharp the clouds formed by the cloud layers are
weather.cloud_coloring- Determines the blending of indirect light from the sky and direct light from the sun
weather.cloud_attenuation- How dark the clouds should be are when they get thicker
weather.cloud_scattering- How much sunlight the clouds should scatter (makes them bloom)
weather.cloud_brightness- Overall brightness of the clouds