Extending Day Sequence for randomized weather

Let’s say I want to implement a weather system in my game. There would be multiple weather profiles (“sunny”, “ovrecast”, “raining” etc). The game would pick a weather profile at random, use it for a few in-game hours and then smoothly blend into another randomly picked profile.

My idea of implementing this is to create a new asset type similar to a Day Sequence Collection. Instead of a collection of day sequences + boolean conditions, it would be a collection of day sequences (each representing a weather profile) + probabilities and durations of each weather profile.

First of all, am I not reinventing the wheel? Isn’t there by any chance some ready made solution that already does everything I want?

And if the answer is no, Is this the correct way of approaching the problem? Or would a seasoned Unreal dev choose a different for a weather system?

If you haven’t looked at the DaySequenceModifierVolume yet, I would suggest having a look at that. It supports DaySequenceCollections or an individual UserDaySequence. It also supports both volume or global effects as well as a UserBlendWeight that you can use to manually drive the transitions between your sequences. This is for example how they made Crime City in Fortnite look like a rainy night whenever players would enter that POI.

So you could still have the DaySequenceCollection representing the weather profile look and then store the probabilities and durations of those volumes in a weather manager that controls the weights of those volumes.

1 Like