Back to case studies

Case study / Weather simulation

Sensor-based weather system.

A Niagara, Blueprint, render-target, and sky-control system that moved weather away from a heavy world-tiled setup toward localized effects around active sensors and scene-capture cameras.

Overview

This project was a sensor-based weather system that I created in Unreal Engine. The goal was to replace the older WorldTiler weather (grid based) setup with something more scalable, more flexible, and more suitable for a scene that can have multiple sensors and recording cameras active at the same time. The levels are usually +25 km2.

The previous setup partially worked, but it had some clear limits. It created a very high number of particles, it was hard to add more features on top of it, and there were visual issues when switching between cameras or when the sensor height changed. I wanted to build a better base system that could support rain, snow, lightning, local fogs, and future weather presets without wasting so much simulation budget.

The Problem

The WorldTiler system was spawning a lot of particles even when most of them were not useful for the active camera or sensor. With more sensors, the particle count became too high very quickly.

Some of the main issues were:

  • Visible weather tiles in the distance.
  • Rain appearing with a delay after switching cameras.
  • Very high particle counts, which made it hard to add new emitters or custom particle logic.
  • No budget left for extra effects like mist, fog, or more complex rain behavior.
  • The system depended too much on emitter height.
  • When the camera moved higher than the WorldTiler height, rain could disappear in front of the sensor.
  • Because particles had to travel a long distance, the lifetime was high and effects like turbulence or velocity advection became harder to control.

So the main question was: can the weather be simulated only where it actually matters for the sensors and cameras? Since we can just have particles around the camera/sensor and still it will look like it is raining in distance.

My Approach

I created a Niagara-based system that follows the location of the active sensors and scene-capture cameras. Instead of covering a large area with tiled emitters, the weather is generated around the places where it needs to be visible.

This made the system much more scalable. It also made the behavior more consistent for scene captures, because the weather is connected to the sensor/camera logic instead of only existing in fixed world tiles.

It is pretty common in games that the weather VFX particle system is attached to the main camera, then you add a couple of tricks to give some depth to it. The approach is not bullet proof, but it will solve a lot of problems and you can achieve very realistic and performant weather system.

Niagara Weather System

I built a new base Niagara system for localized weather effects. The system was tested with multiple sensors and cameras, and even in the first version it was already more performant than the WorldTiler setup.

The main work included:

  • A base Niagara system for camera/sensor-based precipitation.
  • Support for multiple active sensors and scene-capture cameras.
  • Reduced wasted particles outside the relevant view area.
  • A structure that can support more weather logic later.

This was important because the system should not only solve the current rain problem. It also needed to be a better foundation for future weather features.

Lightning and Clouds

I also created a new Niagara base system for lightning, which I did explain fully in a separate case study.

Sky, Moon, and Stars

The sky system also needed updates for this version. I improved the SkySphere Blueprint and added a texture-based moon with exposed controls.

The sky work included:

  • Texture-based moon support.
  • Moon phase control using a float value.
  • Exposed moon yaw and pitch controls.
  • Vector-based star material setup.

For the stars, I used the Unreal Engine 5.5 Sky Sphere material as a base idea and adjusted it for this system. It needed to work correctly with camera position and scene captures.

Performance Comparison

The biggest improvement was the particle count. Even before final optimization, the sensor-based system was already much lighter than the WorldTiler version.

ScenarioWorldTiler ParticlesSensor-Based ParticlesApprox. Reduction
10 sensors/cameras4,094,318664,90884%
20 sensors/cameras5,405,9621,003,05381%
20 sensors/cameras, one far from the main camera6,282,4681,003,05384%

This was the main reason the new approach made sense. It gave back a lot of performance budget and made it possible to think about more advanced effects later.

Result

The sensor-based system fixed most of the important problems from the older WorldTiler approach. It reduced the particle count, worked better with multiple sensors and scene captures, and created a much stronger base for future weather features.

It also made the system easier to extend. With the previous approach, adding more emitters or custom logic was risky because the particle count was already too high. With the new approach, there is more room for features like turbulence, velocity advection, distance mist, fog, stronger snow behavior, and more detailed lightning/cloud interaction.

Key Takeaway and Future Improvements

For me, the important part of this project was not only making the weather look better. It was about changing the system design so the weather could scale with the simulation needs. By making the effects sensor-based, the system became lighter, more predictable, and much easier to expand.

Future possible improvements:

  • Distance particles in front of light sources: car lights, light poles, etc. This is a very interesting subject. I will write a full article about it at some point, but the general idea is to spawn one sprite per light source and drive the material of it from a render target that can represent snow, rain, or other effects.
  • Rain veils: this is also distance particles, but it happens to be pretty huge, so it is an interesting challenge and also has a very simple solution. You can spawn a couple of sprites in dense clouds, scale them from sky to ground, then drive the noise material there and it will look like rain veils.
Email copied