Dynamic Weather (Beta 1.0)
About
Dynamic Weather originates way back when I was obsessed with weather and saw a video demonstrating weather for UE4. I was heavily inspired, and began working on my Dynamic Weather module.
Information
Dynamic Weather is a highly realistic simulation of mother nature herself. Dynamic Weather uses 4 values to dynamically update the weather.
- Temperature
- Humidity
- Wind Sheer
- Atmospheric Pressure
These values will tell the weather how to update and change. I’ve included a little area for nerds located below. It goes in-depth on why these values update the system the way they do.
For Nerds
I’m sure most of you reading this have been taught the Weather Cycle. Evaporation occurs, (Sun’s heat turning water into a gas), then Condensation occurs, (the conversion of a vapor or gas to a liquid), then precipitation occurs, (When water droplets become heavy enough to fall to the atmosphere). And it loops around and around again.
With this system, when the temperature rises more evaporation will occur creating more clouds. When the wind sheer rises, the clouds will become fuzzier. When the air pressure lowers, more clouds will form, when Humidity rises, more clouds will form.
What does evaporation have to do with temperature?
“Although water can evaporate at low temperatures, the rate of evaporation increases as the temperature increases.” As ACS says, along with several different sources.
What does Wind Sheer have to do with how fuzzy the clouds are? (Yes, the clouds get fuzzy depending on the wind sheer)
Some of you may not know what the definition of wind sheer exactly is. So here it is. “variation in wind velocity occurring along a direction at right angles to the wind’s direction and tending to exert a turning force.” Clouds will get fuzzier because they are being torn apart as the wind is at different speeds and directions at different heights.
What does the atmospheric pressure have to do with clouds forming?
Some of you again may not know what air/atmospheric pressure is. Here is the definition. “the pressure exerted by the weight of the atmosphere, which at sea level has a mean value of 101,325 pascals (roughly 14.6959 pounds per square inch).” Basically, it’s easier for vapor to rise and condense when the weight of the atmosphere is less high.
What does humidity have to do with how many clouds form?
Well, humidity is water vapor in the air. This basically means that evaporation is already occurring which could form more clouds easier.
Showcase
Important to Note
There are a few required things for this system to run at its full potential.
- Make sure there is an Atmosphere object in Lightning named “Atmosphere”
- Graphics quality must be high in order for splashes to appear
- You can help me out by helping improve the module in your own ways and sending them to me if you think it’s an improvement!
- This project is in Beta, and will most likely not be released even until 2022. It will be updating as Roblox’s clouds update as well.
- Make sure there is a clouds instance in Terrain. Make sure it’s named, “Clouds.”
Demo
I’ve created a demo for you to play in and look at the weather system before getting it. Let it be known, it may take a bit for it to rain since it is realistic values plugged from my home town.
Credits
There are a few amazing people who helped out with this project. And I thought I would mention them.
- @TheCrypticRunner (Amazing feedback + Help with Particles)
- @boatbomber (Advanced tweening help + Screen Rain)
- @Quasiduck (Awesome Lightning Module)
How to use
When getting the model, import it into Roblox studio and put it into ReplicatedStorage. Upon doing so, open the Library. It should look like this:
Open Folder
You should then see a “CPI” Folder. Open that. In there will be several folders. Their names should be names of services in the game (Workspace, ServerScriptService, Etc) Drag all the items inside the folder into the service the name of the folder. Pretty self-explanatory.
It should now be working properly! Simple setup, yes?
How do I customize it?
Amazing question. Inside the Folder in replicated storage, there will be a folder named, “Scripts.” Simply open that up and open the script, “DynamicWeatherDatabase.” This is where all the information is held. You should then see a ton of values with set numbers. You can change those numbers to your liking!
DynamicWeatherDatabase Value Descriptions
MinTemperature: Minimum temperature for randomization
MaxTemperature: Maximum temperature for randomization
MinHumidity: Minimum humidity for randomization
MaxHumidity: Maximum humidity for randomization
MinWindSheer: Minimum wind sheer for randomization
MaxWindSheer: Maximum wind sheer for randomization
MinAtmosphericPressure: Minimum atmospheric pressure for randomization
MaxAtmosphericPressure: Maximum atmospheric pressure for randomization
DayAtmosphere: Link to Day Atmosphere for rain revert
DayRainAtmosphere: Link to Day Atmosphere for rain
DayNightCycle: If day to night cycle is enabled
DayLength: Time for a full cycle
NightMinTemperature: Minimum temperature for night randomization
NightMaxTemperature: Maximum temperature for night randomization
NightMinHumidity: Minimum humidity for night randomization
NightMaxHumidity: Maximum humidity for night randomization
NightMinWindSheer: Minimum wind sheer for night randomization
NightMaxWindSheer: Maximum wind sheer for night randomization
NightMinAtmosphericPressure: Minimum atmospheric pressure for night randomization
NightMaxAtmosphericPressure: Maximum atmospheric pressure for night randomization
NightAtmosphere: Link to night Atmosphere for rain revert
NightRainAtmosphere: Link to night Atmosphere for rain
MinTimeBetweenLightning: Minimum time (seconds) between another lightning strike
MaxTimeBetweenLightning: Maximum time (seconds) between another lightning strike
LightningSpawnRangeX: Distance from Vec3(0,0,0) for lightning to spawn on the X axis
LightningSpawnRangeZ: Distance from Vec3(0,0,0) for lightning to spawn on the Z axis
DivideDayToGetTransitionTime: Division by the day length to get storm transition time
WindSheerCloudTear: If wind sheer will affect how "fluffy" the clouds are
CanSnow: If snowing is enabled
CanHail: If hailing is enabled
PrecipitatingCloudColor: Color of clouds while it is precipitating (raining, snowing, etc)
PrecipitatingAmbient: Ambient while it is precipitating
SplashDivision: Divide amount of splashes on the floor while it is raining
GlareProtection: Protect atmosphere glare from spawning Jesus
The Future
Me and my friend @mostbootifulgirlever are looking at creating a possible plugin bundle including an update to our Ray Traced Global Illumination plugin. (Including real time)
In order to get updated, join our discord server. The code is Xys8AY3bbp. See you there!
Help me out!
I will be taking feedback and help. Since this is now open sourced, you can make your own changes and send them to me (Make sure to include detail) so I could put you into the final product with credit!
(If in the next version you are givin credit like so: (name) (Idea for ___) this does not mean I am giving you less credit, it means that I have either redone the code or added my own flare)
I am excited to see what you have to bring! See you on this wild adventure developing the Dynamic Weather Library!