Adding Weather to Missions - Part 2

Discussion regarding mapping and missions in here - we are talking FMB chaps. Perhaps you are building a mission for the server or for campaign? Talk to the experts - we always need people willing to muck in so don't be shy!

Moderators: Board of Directors, Command

User avatar
Bonkin
Posts: 2143
Joined: Sat Sep 08, 2012 6:47 pm
Location: East Yorkshire, England

Adding Weather to Missions - Part 2

Post by Bonkin » Sat Jul 29, 2017 7:08 pm

Local Weather

In the first part I covered global wind and how this can be layered up in different height bands, with each band having a different wind strength and direction. In this part I’ll cover adding regional (local) weather and the different cloud types. Note, part 1 can be found at the link below:
http://www.aircombatgroup.co.uk/forum/v ... f=5&t=8360

Local weather moves with the global wind so if you want a weather front you need to ensure you add enough weather areas to last for the duration of the mission. For the Navigation Challenge I had 15 Local Weather areas with no detrimental effect on performance.

Rule No.3: Add as many Local Weather areas as you need for the duration of the mission.

Local weather is independent of the global WeatherIndex and CloudsHeight parameters – so you could set clear conditions for example and add all your weather through local weather areas.

Unfortunately it is not possible to have multiple layers of cloud in the same area. Also, some cloud types are buggy and should be avoided in the current release, e.g. result in weird graphical effects including “rotating textures” and occasional occulting when viewed from certain angles.

Rule No.4: Do not overlap Local Weather areas.

Local Weather is added to the bottom of the mission file. A “[WeatherFront]” section is used to define all of the weather areas, e.g.

Code: Select all

[WeatherFront]
  LocalWeather_0 CUMULUS_GEN 20000 20000 143109.43 256458.64 0 0
  LocalWeather_1 CUMULUS_GEN 25000 25000 96419.38 250153.03 0 0
  LocalWeather_2 CUMULUS_GEN 25000 25000 130921.50 300816.90 0 0
Then, beneath this section there will be a section for each of the areas, e.g. [LocalWeather_0], [LocalWeather_1] and [LocalWeather_2]. Like I said, you can have as many of these areas as you want, but don’t overlap them. Notice how, like global wind, each area has a unique identifier. Also, areas can be circular or elliptical – so they have a width. Length and angle rather than just a radius.

Starting with the definitions then, the parameters are as follows:

- Identifier – LocalWeather_X where X is a number from zero up.
- Cloud Type – either “CUMULUS_GEN”, “FLAT_OVERCAST_GEN”, “OVERCAST_GEN”, “OVERCAST_VS_SPLASH_GEN” or “THUNDER_GEN”
- Width in meters
- Length in meters
- X Position on Map
- Y Position on Map
- Z Position – leave at zero (note, FMB incorrectly puts base height into this field)
- Angle – leave as zero if you use circles. Otherwise – it works in the same way as wind angels.

Following the [WeatherFront] section you’ll need to add a section for each of the Local Weather areas you have defined. These will be called [LocalWeather_0], [LocalWeather_1] and so on. The content of these sections is different for each cloud type – so I’ll go through them separately, with pictures as well.

Note, once you have defined weather areas it is safe to re-position them in the FMB but refrain from trying to edit any of the settings because it will screw things up.

Cumulus Field (CUMULUS_GEN)
This cloud type is safe for use in campaigns.

Image

Image

Example:

Code: Select all

  EllipticA 10000
  EllipticB 10000
  RotAngle 0
  ShiftX 0
  ShiftY 0
  BaseHeight 450
  IsRain 0
  IsDynamicEnabled 0
  ParticipType 0
  DropSize 10
  RainPower 10
  ThermalIntensity 10
  CloudsDensity 10
  MidSize 10
EllipticA and EllipticB define the width and length of the weather area, e.g. set them to the same value for a circular area, or if you want an ellipsoid make them different. A safe low value for each is 2500. Much less than this and you won’t see any cloud at all. That said, why would you have such a small weather area? The safe upper limit is 25000 – go much higher than this add you may have strange graphical glitches like ground shadows disappearing or the whole cloud bank occulting when viewed at certain angles (usually over your shoulder behind you). Whatever you use, ensure that these values match the width and length you set in the [WeatherFront] section.

RotAngle is the rotation angle and should match the last value of the corresponding [WeatherFront] section. I always use circles so I leave this set to 0.

ShiftX and ShiftY do not seem to be implemented in v4.312 so leave these at 0.

BaseHeight is the base height of the clouds above sea level in meters. You can have the cloud right down at ground level if you want but you will get some graphical render oddities which will ruin immersion. I would recommend the lowest cloud base to be 25m above the highest airfield in use. The upper limit seems to be unbounded and the higher you put them the darker grey they get. The downside of putting them up very high is that the draw distance comes into play – so you could end up with a circular patch of clouds way up high above your head and nothing else. Also, when on the ground you’re not going to see clouds going all the way down to the horizon – so it is a bit of an immersion killer. Personally I would recommend you keep them relatively low and definitely no higher than 2000m.

The IsRain does not seem to be implemented in v4.312 so leave this at 0.

I’ve not found a way of using the IsDynamicEnabled parameter so leave this at 0. I suspect if it is set it may be possible to apply scripting to it but I’ve not investigated this as yet.

ParticipType does not seem to be implemented in v4.312 so leave this at 0.

The DropSize parameter has a range of between 1 and 10. It does not seem to be implemented in v4.312 but has a default value of 10 so I would recommend leaving it as this.

RainPower does not seem to be implemented in v4.312 so leave this at the default 10.

ThermalIntensity does not seem to be implemented in v4.312 so leave this at the default 10.

The CloudsDensity parameter affects the cloud coverage and is an integer between 2 and 10. This can be considered to be like Octas. Don’t put it at 1 because the clouds will disappear.

MidSize changes the size of each clump of clouds. It has a range between 1 and 10. Frankly I wouldn’t bother reducing it too far because at low values the clouds just don’t look very realistic, e.g.:
Image

During testing I found that the shadows caused by the clouds would sometimes disappear. The exact causes for this are unclear, but it seems to be linked with how many weather areas you have and the cloud base. For me the ground shadows are important, so when creating a weather scenario it is always best to make single parameter changes at a time.

Note that there is no parameter for cloud height. By default Cumulus seems to have a height of 1000m.

Flat Overcast (FLAT_OVERCAST_GEN)
This cloud type is safe for use in campaigns but it does have a kaleidoscope effect which can detract from the immersion. That said, it is good for a obscuring the horizon and making visual navigation much harder.

Image

Example:

Code: Select all

  EllipticA 20000 
  EllipticB 20000 
  RotAngle 0
  ShiftX 0
  ShiftY 0
  BaseHeight 200
  IsRain 0
  IsDynamicEnabled 0
  ParticipType 0
  DropSize 0
  RainPower 0
  FrontThickness 200
  CloudsDensity 10
Where parameters are the same as the CUMULUS_GEN type then the same rules/effects apply unless stated below.

The BaseHeight parameter seems to be the middle of the cloud layer with the actual cloud base half the thickness beneath it and the cloud tops half the thickness above it, e.g. a base height of 1000m and a thickness of 610m would have the base at 695m and the tops at 1305m. Personally I don’t recommend putting it any lower than 600 or any higher than 1500.

The FrontThickness parameter seems to have a range in the FMB between 50 and 350 but in my testing the cloud thickness always seems to be around 2000ft, e.g. 610m. I don’t think it is therefore working properly and it is best to leave it at the default of 200.

The CloudsDensity parameter takes values between 4 and 10 inclusive. Below 4 and the clouds won’t show. When set to 4 you will get to get glimpses of the ground but not enough to navigate by. At 10 you won’t really see the ground beneath you at all.

Overcast (OVERCAST_GEN)
Nice looking clouds which remove the kaleidoscope effect of the general overcast type. This cloud type can hit the FPS if abused. It can be safe for campaign use but may also be useful for composing static screen shots.

Image

Image

Example:

Code: Select all

  EllipticA 20000
  EllipticB 20000
  RotAngle 0
  ShiftX 0
  ShiftY 0
  BaseHeight 600
  IsRain 0
  IsDynamicEnabled 0
  ParticipType 0
  DropSize 0
  RainPower 0
  FrontThickness 300
  EvenLayers 3
  TotalLayers 3
Where parameters are the same as the FLAT_OVERCAST_GEN type then the same rules/effects apply unless stated below.

The CloudsDensity parameter has been replaced by the EvenLayers and TotalLayers parameters. In my experimentation I’ve not really been able to find out what they do, other than to add instability, e.g. changing them can cause the clouds to occult at certain viewing angles. The safe value for each is 3. Note, the FMB would suggest they can be altered between 3 and 16.

Overcast with Breaks (OVERCAST_VS_SPLASH_GEN)
This cloud type can be entered in the FMB but does not work, e.g. no clouds appear. It seems to have the same input parameters as the OVERCAST_GEN gen type.

Thunder (THUNDER_GEN)
This cloud type should be used with caution since it does seem to be sensitive to the context of the other weather types which can result in it occulting when viewed at certain angles.

Image

Image

Image

Example:

Code: Select all

  EllipticA 8000
  EllipticB 8000
  RotAngle 0
  ShiftX 0
  ShiftY 0
  BaseHeight 700
  IsRain 1
  IsDynamicEnabled 1
  ParticipType 1
  DropSize 0
  RainPower 0
  FrontThickness 3500
  FrontWindMaxHorSpeedNear 15
  FrontWindMaxVertSpeedUp 30
  FrontWindMaxVertSpeedDown 20
  FrontWindMaxTurbInClouds 15
  FrontWindMaxTurbInSquallZone 20
  EvenLayers 5
  TotalLayers 15
  IsThunder True
Where parameters are the same as the FLAT_OVERCAST_GEN type then the same rules/effects apply unless stated below.

The EllipticA and EllipticB parameters really need to be reduced for this cloud type. In my testing I found that values above 8000 tended to result in some occulting at certain aspects.

The BaseHeight parameter does actually reflect the correct cloud base in meters.

The FrontThickness has a bit of a misleading name. It actually defines the height in meters of the thunder cloud heads. Setting it to 1 will therefore result in a cloud field much like overcast, but setting it at say 5000 will result in towering stacks of clouds.

The FrontWindMaxHorSpeedNear parameter does not seem to be implemented in v4.312 so leave this at the default 15.

The FrontWindMaxVertSpeedUp parameter does not seem to be implemented in v4.312 so leave this at the default 30.

The FrontWindMaxVertSpeedDown parameter does not seem to be implemented in v4.312 so leave this at the default 20.

The FrontWindMaxTurbInClouds parameter does not seem to be implemented in v4.312 so leave this at the default 15.

The FrontWindMaxTurbInSquallZone parameter does not seem to be implemented in v4.312 so leave this at the default 20.

The EvenLayers parameter does not seem to have much of an effect. If anything, it adjusts the spacing between clouds but I think it may be quite subjective. The FMB seems to have a range of between 3 and 16 for this parameter but in actual fact its range is 1 to 10. Anything above 10 will result in the clouds occulting at certain viewing angles. A safe value is 3.

Adjusting the TotalLayers parameters affects the vertical spacing between clouds. It also impacts the overall height. Lower values create more space between clouds and higher values close these in. The FMB would indicate that the parameter has a range between 3 and 31, although actually the minimum value is 2. Less than this and the clouds occult. Setting it to 31 seems safe. The picture below shows the clouds with it set to 3:
Image

Finally, the IsThunder parameter does not seem to be implemented in v4.312 so leave this at the default of True.


It is worth mentioning that during testing I did suffer multiple launcher crashes with certain combinations of weather settings and it seems that v4.312 does have some memory conflict issues if too much is loaded in. I’ve tried here to provide safe numbers and recommendations for use – but in part 3 I will provide some examples that could be used in campaign missions. As with all things, a lot of trial and error will be needed until the bugs are resolved.

Taking Maltloaf’s idea on board, I’m suggesting that the normal Thursday night training slot becomes a “Clouds Thursday” training slot. That way we could build some confidence before using it in anger.
Image

Kildren
Posts: 1580
Joined: Thu Jul 30, 2015 2:33 pm
Location: Adelaide, AUSTRALIA [̲̅$̲̅(̲̅ ͡° ͜ʖ ͡°̲̅)̲̅$̲̅]

Re: Adding Weather to Missions - Part 2

Post by Kildren » Sat Jul 29, 2017 7:53 pm

Bonkin wrote:Taking Maltloaf’s idea on board, I’m suggesting that the normal Thursday night training slot becomes a “Clouds Thursday” training slot. That way we could build some confidence before using it in anger.
nah chuck it straight into campaign more fun that way without practising first

but on another note clouds well over due in campaign sick of like the 4 fluffly fuckers hanging over hydrequent and clear skies all the way ;)
1







Speak to me about joining the ACG Pilots Union

User avatar
Mysticpuma
Posts: 363
Joined: Mon Sep 01, 2014 5:07 pm

Re: Adding Weather to Missions - Part 2

Post by Mysticpuma » Sat Jul 29, 2017 8:42 pm

Great thread to read Bonkin. The only issue I found when using thunder and overcast was (in wide view) the particle system would overload and all the clouds would vanish :(

But as something that shows a much more realistic representation of cloud cover, these settings really are nice :)

User avatar
Maltloaf
Posts: 1809
Joined: Sun Jun 22, 2014 10:07 pm
Location: Salisbury Plain, birthplace of British military aviation.

Re: Adding Weather to Missions - Part 2

Post by Maltloaf » Sat Jul 29, 2017 10:09 pm

Good work Bonks. Looks like a bit of a marathon so I feel templates will be the way forward. You really have done some digging here. As I said before and Kildren put so eloquently above, roll on a really shitty day.
"I have never once lost my gratitude for those who were the sentinels and held the line between tyranny and civilisation"

69th_Spiritus_Mortem
Posts: 57
Joined: Fri Apr 28, 2017 7:06 pm

Re: Adding Weather to Missions - Part 2

Post by 69th_Spiritus_Mortem » Sat Jul 29, 2017 11:38 pm

Awesome couple of posts Bonkin. Responded to your PM and also linked these to the public discussion on weather and the FMB over at ATAG and BoS, hope you don't mind.

Double
Posts: 411
Joined: Mon Sep 28, 2015 12:22 pm
Location: Phoenix, Arizona

Re: Adding Weather to Missions - Part 2

Post by Double » Sun Jul 30, 2017 7:36 am

Simply amazing Bonkin, screenshots look awesome. :nice: What kind of performance hit are we talking about here?

:salute: DS
Image
"I hate being bipolar, it's fucking awesome!

User avatar
Bonkin
Posts: 2143
Joined: Sat Sep 08, 2012 6:47 pm
Location: East Yorkshire, England

Re: Adding Weather to Missions - Part 2

Post by Bonkin » Sun Jul 30, 2017 1:58 pm

69th_Spiritus_Mortem wrote:Awesome couple of posts Bonkin. Responded to your PM and also linked these to the public discussion on weather and the FMB over at ATAG and BoS, hope you don't mind.
No not at all. I've started Part 3 and will probably post that towards the back end of the next week.
Double wrote:What kind of performance hit are we talking about here?
My PC is an i5-2500K with an nVidia GeForce GTX970 so for the most part I fly around at 60fps no problem. The worst drop I saw was down to 30fps but this wasn't for very long. Mostly when flying in the thick of it I'd say it may be down to around 45fps or 50fps - which I'm perfectly happy with.
Image

Boyezee
Posts: 3650
Joined: Sun May 04, 2014 8:56 pm
Location: Northamptonshire, England

Re: Adding Weather to Missions - Part 2

Post by Boyezee » Sun Jul 30, 2017 3:47 pm

Thanks for doing this Bonkin, clearly a lot of work has gone into it.

As was suggested in the other thread I think it is a good idea to runs this on thursdays for now, that way we can pick up on any gremlins and if successful it will give the misison building team time to get this incorporated into campaign.
Image

Biggs
Posts: 961
Joined: Thu Jul 02, 2015 12:12 am
Location: Murrillynd, United States

Re: Adding Weather to Missions - Part 2

Post by Biggs » Sun Jul 30, 2017 4:31 pm

Fantastic work Bonks!

Can't wait to see it in action!
Image

Wiggy
Posts: 298
Joined: Sun Jan 24, 2016 10:55 pm

Re: Adding Weather to Missions - Part 2

Post by Wiggy » Sun Jul 30, 2017 4:42 pm

Experimented a bit and flying in and out of those thunder clouds is awesome! Great work Bonkin! :nice: It's gonna add a whole new dimension to the missions for sure.

Post Reply