Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: What determines the visual representation of rain vs snow?  (Read 347 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
What determines the visual representation of rain vs snow?
« on: September 25, 2024, 07:42:07 PM »

For the visual representation of rainfall versus snow (when the weather is set to precipitation or thunder), is this determined only by the TEMPERATURE value set in a map's load.ini?

Or does the calculated sea level temperature play a role?

Personally I'd rather see the latter be the determinant. More specifically, the sea level temperature threshold could be some positive value instead of zero. This would reflect the freezing level being at some altitude, where snow could remain as such before melting to rain by the time it reaches the surface. For instance, snow would be generated when the freezing level is, say, 1km ASL. Or at the base of the cloud. Yeah, I do like the cloud base height as the determinant.

But is this possible to do? I've not found any code (yet) which deals with rain/snow generation. I have a suspicion this resides in a dll...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Vampire_pilot

  • member
  • Offline Offline
  • Posts: 8621
Re: What determines the visual representation of rain vs snow?
« Reply #1 on: September 25, 2024, 10:32:05 PM »

In my experience, it is the month set as base in the load ini.

11 to 3 (or2?) gives you snow (a winter month), all others will give you rain.  It's unrelated to temperature as far as I know. That only seems relevant for water state. That's from my superficial experience.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: What determines the visual representation of rain vs snow?
« Reply #2 on: September 25, 2024, 10:54:11 PM »

The stock code for generating the rain sound in EffClouds.setRainSound() restricts to months April through October. Does this also control the visual rain streaks?

If the rain is tied to the calendar in this way, that would be silly in tropical latitudes, where rain occurs year round; no snow.

Just days ago I altered that setRainSound() method to leave the month out of consideration entirely, relying only on the sea level temperature. I thought this concerned the rain sound only. If the visual rain effect is indeed tied to the sound, then my desires will have been met.

I'll have to do some more experimenting...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Vampire_pilot

  • member
  • Offline Offline
  • Posts: 8621
Re: What determines the visual representation of rain vs snow?
« Reply #3 on: September 26, 2024, 01:13:44 AM »

I think you did not understand what I mean.

You ONLY get snow, when you set the month in the ini to 11, 12, 1, 2 or 3.
If you use any other moth there, you get no snow whatsoever (Rain ALLWAYS) and if you use such a month, you get snow ALLWAYS

The month you set in the mission does not matter. You can not have both effects on the same map (for all I have ever seen)

That's a thing for winter and summer maps and makes some sense to me.
On a winter map -> set a winter month -> get snow.
On a summer map -> set a summer month -> get rain.

I fixed my share of winter maps that were set to month 7 and were raining over frozen rivers.... The sound is always tied correctly to the effect, as far as I have experienced.

Funny thing, if you set rain/snow on a map in FMB and zoom in close enough, there is a point where you can start to hear the train noise. If you get that on a winter map, you already know, the ini is setup wrong, without entering a mission.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: What determines the visual representation of rain vs snow?
« Reply #4 on: September 26, 2024, 02:36:18 AM »

Vamps,
Thanks for the input!

Before reading your previous post I did some experiments. Yep, it's making sense that the rain/snow is dependent on the month value set in the load.ini. I think this aspect is coded in a dll.

I have discovered that the rain sound is quite independent, in that one can set whatever conditions one wants in EffClouds.class. I set the threshold to be a calculated sea level temperature of 4C, which puts the freezing level at about 700m ASL. No matter the mission month or load.ini month, the rain sound is heard whenever the sea level temp is at least 4C. Even if snow is falling.  😀

Knowing that the snowflakes are always present when a map is WINTER and the load.ini month is between Nov and March, the stock scheme of using the month range (and not my experimental temperature) is perhaps the best approach.

Although when the temp is a bit above above freezing, it is pretty neat to hear the patter of rain while snow flakes fall, suggestive of a mix of rain and snow. A not uncommon occurrence here in Ontario when a warm front approaches ahead of a mild warm sector. Which often enough means freezing rain when the ground and objects have not yet warmed up.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 24 queries.