Dynamic Weather Library (Beta 1.0)

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

Clear Day


Rain


Hail


Snow



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.


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

image

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!

360 Likes

This has to be one of the coolest resources I’ve ever seen. Absolutely incredible job!

20 Likes

amazing job, what else do you have planned for this?

6 Likes

How does this interact with being indoors? Will the weather go through roofs?

7 Likes

A plugin for it. I am also planning to redo it as well.

6 Likes

Yes, It does. This will be fixed when the pluigin releases though!

5 Likes

hm yes, this does look highly interesting…


btw the Roblox model should be a little easier to find (like at the top and or bottom of the post), right now it’s hiding as a hyperlink in middle of a sentence in middle of the post

5 Likes


“Clear day” refers to a day that overall lacks in clouds…

6 Likes

I meant as in weather. Clear Weather, Haha. Sorry for the misunderstanding.

9 Likes

It’s nice overall, but perhaps you could slow down the rate of the snow fall.

8 Likes

The snow fall is dynamic. It will react to the amount of wind sheer. I could divide it to make it less strong. Thank you.

7 Likes

Hello, I enabled DayNightCycle but it seems nothing changes! I don’t see any value changing in Lighing service.
Can you help me please?

6 Likes

Any errors located in the output?

4 Likes

yes a lot of errors. I don’t know if it’s my fault or not.

  02:12:16.774  Players.Certurix.PlayerScripts.Precipitation:187: attempt to index nil with 'GetChildren'  -  Client - Precipitation:187
  02:12:16.774  Stack Begin  -  Studio
  02:12:16.774  Script 'Players.Certurix.PlayerScripts.Precipitation', Line 187  -  Studio - Precipitation:187
  02:12:16.775  Stack End  -  Studio
  02:12:16.775  Players.Certurix.PlayerScripts.Precipitation.PositionModule:5: attempt to index nil with 'Position'  -  Client - PositionModule:5
  02:12:16.775  Stack Begin  -  Studio
  02:12:16.776  Script 'Players.Certurix.PlayerScripts.Precipitation.PositionModule', Line 5 - function RandomPosition  -  Studio - PositionModule:5
  02:12:16.776  Script 'Players.Certurix.PlayerScripts.Precipitation', Line 161  -  Studio - Precipitation:161
  02:12:16.776  Stack End  -  Studio
  02:12:16.776  Players.Certurix.PlayerScripts.Precipitation:145: attempt to index nil with 'Position'  -  Client - Precipitation:145
  02:12:16.777  Stack Begin  -  Studio
  02:12:16.777  Script 'Players.Certurix.PlayerScripts.Precipitation', Line 145  -  Studio - Precipitation:145
  02:12:16.777  Stack End  -  Studio
  02:12:18.220  Players.Certurix.PlayerScripts.Precipitation:385: attempt to index nil with 'WaitForChild'  -  Client - Precipitation:385
  02:12:18.221  Stack Begin  -  Studio
  02:12:18.221  Script 'Players.Certurix.PlayerScripts.Precipitation', Line 385  -  Studio - Precipitation:385
  02:12:18.221  Stack End  -  Studio
  02:12:22.004  Players.Certurix.PlayerScripts.Precipitation:470: attempt to index nil with 'WaitForChild'  -  Client - Precipitation:470
  02:12:22.004  Stack Begin  -  Studio
  02:12:22.004  Script 'Players.Certurix.PlayerScripts.Precipitation', Line 470  -  Studio - Precipitation:470
  02:12:22.005  Stack End  -  Studio
4 Likes

This totally isnt your fault! Im looking into it now.

4 Likes

I very much love this idea i have a question tho. Is this open source can we like use it in our games, edit it and all the other things we can be with open source

3 Likes

You can use it in your games, and edit it.

3 Likes

Wow thank you also I will include all of the necessary credits cuz thats how i roll,anyway thank you for making this awesome project and goodluck!

2 Likes

The showcase looks great. How did you make the 2D rain effect?

2 Likes

I grouped a line effect cryptic made, and added other little lines to remove the effect of groups.

3 Likes