PDA

View Full Version : Proposal for a system of intelligently randomised weather simulation:



ciderman9000000
19-06-2015, 09:39
With regards to following up on various discussions I've had on here concerning issues with the scripted weather system in pCars as well as problems that would arise upon a transition to a fully randomised weather system, I decided to come up with a system of intelligently randomised weather based upon probability tables depicting realistic weather transitions specific to geographical climate and season.

As a first working attempt at this I've drawn the following spreadsheet which is designed to provide a believable simulation of changeable weather in the Autumn/Winter of any given track in a temperate climate such as the United Kingdom.

This table is designed to be used with races of any length or time acceleration. My goal has been to either severely lessen or remove entirely the probability of unrealistic weather changes occurring in a randomised system such as clear skies to thunderstorm or vice versa.

http://images.tapatalk-cdn.com/15/06/19/d913f4d1cd0aaad54feddb54028e1914.jpg

Conditions key:
Clear, Light Cloud, Medium Cloud, Heavy Cloud, Overcast, Light Rain, Heavy Rain, Storm, Thunderstorm, Fog, Heavy Fog, Fog with Rain, Heavy Fog with Rain, Hazy

The first column (% Slot 1) shows as a percentage the probability of that weather condition being selected for Slot 1, i.e the starting condition.

The bulk of the table that follows shows percentage probabilities of transitioning FROM any given weather condition (depicted in the second column) TO another condition (depicted in the row across the top) as we move from one slot to the next.

In general I've designed it so that the most probable weather condition to appear in the following slot is the same condition as the current slot, i.e. 'no change' (typically around a 30% chance of no change), but there are exceptions to that rule such as Clear which isn't as likely to remain that way in the winter as it might in the summer, or Storms which typically don't last very long in comparison with other more general conditions.

Where there's an 'X' in the table it demonstrates that this transition has a probability of zero and so will never occur. Example: Clear to Storms.

One thing to note is that the probability of one weather condition transitioning to another does not exactly match the probability of the same transition occurring in reverse. For example, as a representation of autumnal weather, clear skies transitioning to cloud is far more likely an occurrence than the other way around.

I ran the simulation 10 times as a quick validity test and received the following results:

Hazy/Hazy/Light Cloud/Light Rain
Fog with Rain/Heavy Fog with Rain/Heavy Fog with Rain/Heavy Fog with Rain
Overcast/Overcast/Heavy Rain/Storm
Overcast/Storm/Thunderstorm/Heavy Cloud
Heavy Cloud/Light Cloud/Fog with Rain/Heavy Fog with Rain
Hazy/Clear/Light Rain/Medium Cloud
Heavy Cloud/Overcast/Light Cloud/Heavy Cloud
Medium Cloud/Heavy Cloud/Overcast/Light Rain
Light Cloud/Medium Cloud/Overcast/Heavy Rain
Medium Cloud/Heavy Cloud/Overcast/Heavy Fog

I'd be interested in hearing your thoughts on this. Do you think it a reasonably accurate simulation? Could it (or something similar) ever be implemented in-game? etc.

Even if SMS don't respond directly I thought the system might well prove useful regardless for anyone who may be thinking of creating custom championships in future as a means of randomising their own weather patterns in an interesting and realistic manner. Perhaps there are some PC modders out there to whom such a system might be of interest?

Anyway, it's only taken me a couple of hours and I enjoy doing things like this. If you find it at all interesting or useful then let me know and I can work out similar systems for summer/spring and other geographical climates.

NemethR
19-06-2015, 09:45
Great job, and I must say I love that idea.

Might be it is a bit of a job doing these tables, BUT I think after they are done, should not be really hard to implement :)

ciderman9000000
19-06-2015, 10:00
It's not too difficult tbh, especially now that I have the template sorted. I did all of the above on my touchscreen phone and it only took a short while.

The bulk of the work occurs in the imagination as I was kinda building a British winter in my head through various values 0-100. I've always said that SMS have the framework of a superb weather system here, all it needs is to be kicked into life by something like this.

It's the only way they'll ever get real tension and excitement into the game via the weather. The current implementation is deathly boring and just doesn't cut it. Implement something like the above though and we'll all be driving with one eye glued to the skies.

flymar
19-06-2015, 10:18
Interesting.
What's your idea about number of slots and weather progression mutiplier?

ciderman9000000
19-06-2015, 10:21
One of my main goals was to make an overcast sky or heavy clouds loom ominous; such threatening conditions should be worrying for a race driver and ought to set the mind going with regards to tactics. Same with light rain; you need to be worrying about whether this shit's gonna get heavier.

As things stand there's none of that in the game. Either you're running the same perfectly scripted career race for the umpteenth time and you know exactly what is gonna happen next or you're racing random on solo mode whereby a dark, heavy cloud could just as easily turn to beautiful clear skies a moment later as break into a torrential downpour. There's no point worrying about it because you either a) know exactly what will happen and exactly when it will happen, or b) there's literally no way of guessing.

ciderman9000000
19-06-2015, 10:24
Interesting.
What's your idea about number of slots and weather progression mutiplier?

It's designed to work well with any number of slots, any race length and any multiplier. I don't see why you couldn't have four slots for every race, long or short, and change the multiplier to 10x if you really wanted to. The transitions will always be realistic, just occurring more frequently if sped up.

If the table above were implement exactly then going from Clear to Thunderstorm would require a minimum of 3 Slots, and even then there would only be a 0.8% chance of it doing so.

Quickest route from Clear to Thunderstorm:
Clear to Heavy Cloud (15%)
Heavy Cloud to Thunderstorm (2%)
+
Clear to Overcast (5%)
Overcast to Thunderstorm (5%)
+
Clear to Light Rain (5%)
Light Rain to Thunderstorm (5%)
=
0.8% chance occurrence

TrevorAustin
19-06-2015, 10:37
Now that's an interesting idea, and would make the weather truly dynamic. I wonder if it could be done.

Fanatest
19-06-2015, 10:45
One of my main goals was to make an overcast sky or heavy clouds loom ominous; such threatening conditions should be worrying for a race driver and ought to set the mind going with regards to tactics. Same with light rain; you need to be worrying about whether this shit's gonna get heavier.

As things stand there's none of that in the game. Either you're running the same perfectly scripted career race for the umpteenth time and you know exactly what is gonna happen next or you're racing random on solo mode whereby a dark, heavy cloud could just as easily turn to beautiful clear skies a moment later as break into a torrential downpour. There's no point worrying about it because you either a) know exactly what will happen and exactly when it will happen, or b) there's literally no way of guessing.

This resonates with me a great deal, I like it :)

Just as you describe, that feeling of shall I put on on wets or is the sun coming out. Will it stay the same, dry up, or get foggy etc... There's a gamble and risk/reward to that.

Here in the UK you can be outside, with blistering/blinding sun/heat (perhaps a little light cloud in the sky) and all of a sudden, without any warning, sun still blazing... It's absolutely pelting it down?

You are stood there in shorts, T-Shirt, sun glasses holding an umbrella :) ... You run for cover and within 5/10 minutes, you are back to complaining about how hot and dry it is :)

Even during the sunny daytime races, it would be wonderful to have random bouts of heavy rain (for a few minutes or so) for no real reason and with no real change to the environment, why, because this happens All the time where I live :D

It was only last week we were having a BBQ, when out of no where we heard thunder. Then as we all sat there eating burgers and bathing in the sun, it was roaring thunder and then rain came (but it was still sunny/clear/hot/perfect weather) after 10/15mins.. Shower stopped and on we went about our blisteringly hot days BBQ :)

Great work on the tables by the way :D

flymar
19-06-2015, 10:48
It's designed to work well with any number of slots, any race length and any multiplier. Sorry but it will not. If there will be Sync to Race or high multiplier (that are not free to change by user) and you'll have 4 states (or more) in short race you'll quickly see people crying on the forum saying how unrealistic the weather is.
The idea of variable weather slots lenght isn't new, but it's unfortunately not implemented.

LADY GEMMA JANE
19-06-2015, 10:49
Looks a bit techi

Cornflex
19-06-2015, 10:50
@ciderman: Great idea! Thanks for the effort.
Hope it can be done. :)

Pamellaaa
19-06-2015, 10:59
This looks excellent and based on your simulations above very realistic, would you mind if I used the data you have linked above to try and create an all singing all dancing spreadsheet?

I have grand visions in my head now off different sets of data for each location and season (or even month!) and an all in one spreadsheet that just takes inputs for where and when you want a race to simulate and the number of slots you want and then outputs a set of settings as you have above. Could be great for those running leagues.

NemethR
19-06-2015, 11:18
This looks excellent and based on your simulations above very realistic, would you mind if I used the data you have linked above to try and create an all singing all dancing spreadsheet?

I have grand visions in my head now off different sets of data for each location and season (or even month!) and an all in one spreadsheet that just takes inputs for where and when you want a race to simulate and the number of slots you want and then outputs a set of settings as you have above. Could be great for those running leagues.

Even if not implemented in the game, that could be used, as a "Create a random weather system for an online race" spreadsheet.

ciderman9000000
19-06-2015, 11:18
I don't mind at all.

ciderman9000000
19-06-2015, 11:22
Sorry but it will not. If there will be Sync to Race or high multiplier (that are not free to change by user) and you'll have 4 states (or more) in short race you'll quickly see people crying on the forum saying how unrealistic the weather is.
The idea of variable weather slots lenght isn't new, but it's unfortunately not implemented.

I'm not sure if you read my edit, so here it is. I'm trying to demonstrate how even across multiple slots the above system really keeps down the likelihood of unrealistic patterns:


If the table above were implement exactly then going from Clear to Thunderstorm would require a minimum of 3 Slots, and even then there would only be a 0.8% chance of it doing so.

Quickest route from Clear to Thunderstorm:
Clear to Heavy Cloud (15%)
Heavy Cloud to Thunderstorm (2%)
+
Clear to Overcast (5%)
Overcast to Thunderstorm (5%)
+
Clear to Light Rain (5%)
Light Rain to Thunderstorm (5%)
=
0.8% chance occurrence

Pamellaaa
19-06-2015, 11:25
Even if not implemented in the game, that could be used, as a "Create a random weather system for an online race" spreadsheet.

Exactly my thoughts, I think I am right in saying that the exact setup would only be apparent to the lobby host as anyone else in the lobby will simply see the forecast panel which doesn't give you complete details.

Hosts could even post up vague forecasts and keep specifics to themselves.....

flymar
19-06-2015, 11:36
I'm not sure if you read my edit, so here it is. I'm trying to demonstrate how even across multiple slots the above system really keeps down the likelihood of unrealistic patterns:
I understand it and admire the effort and to be honest I don't have problem with fast and (not really) unrealistic changes:) I'm just saying that you could encounter people that (when hit once by Clear/fog/clear/fog in 5 laps) will say it's crap.

Pamellaaa
19-06-2015, 11:41
I understand it and admire the effort and to be honest I don't have problem with fast and (not really) unrealistic changes:) I'm just saying that you could encounter people that (when hit once by Clear/fog/clear/fog in 5 laps) will say it's crap.

I may be misunderstanding your argument but I don't think that its related to the system the OP has devised. You seem to have an issue with too many weather slots in short races (which I agree with) whereas the system in the OP seems to just be aimed at making the transitions that do happen (however many that may be) more believable. It has no affect at all on how often the slot changes as that is down to how the race is setup by the player or lobby host.

flymar
19-06-2015, 11:46
I may be misunderstanding your argument but I don't think that its related to the system the OP has devised. You seem to have an issue with too many weather slots in short races (which I agree with) whereas the system in the OP seems to just be aimed at making the transitions that do happen (however many that may be) more believable. It has no affect at all on how often the slot changes as that is down to how the race is setup by the player or lobby host.
I was thinking it's mostly about scripted career events. And no, I don't have the issue with many transitions:).

ciderman9000000
19-06-2015, 11:50
I understand it and admire the effort and to be honest I don't have problem with fast and (not really) unrealistic changes:) I'm just saying that you could encounter people that (when hit once by Clear/fog/clear/fog in 5 laps) will say it's crap.

TBH I don't know how the game currently gets around that issue so it's difficult to comment, but my recommendation I think would be to limit the number of slots available to 1 or 2 for particularly short races.

That said though, the probability of your Clear/Fog/Clear/Fog example occurring using the probabilities I suggested would be just 0.004%. That's without even taking into account that there's only a 10% chance of a race actually beginning with Clear conditions.

ciderman9000000
19-06-2015, 12:09
IMO the chances of happening across unrealistic weather patterns using this system are so small that it would not be an issue. Perhaps 1 in every 20 races or so might seem a little odd if the multiplier was turned up to the max, but if you race arcade distances then I'd say you shouldn't complain if you happen across arcadey weather every now and then. Compare that slight negative impact to the current scripted weather system, which effects everybody all the time, and I think the pros here far outweigh the cons.

Pamellaaa
19-06-2015, 12:15
I was thinking it's mostly about scripted career events. And no, I don't have the issue with many transitions:).

I had completely misunderstood what you are saying, my apologies.

ciderman9000000
19-06-2015, 13:45
Whilst I feel very strongly that something like this ought to be implemented into the career mode, it goes without saying that the creation of solo or online events or championships would be dramatically enhanced also. Player event creation suffers from the exact same problem as does career mode with regards to the weather, in that you have to actually select it yourself, meaning that you know exactly what's coming up just as with the scripted career.

No tension, no tough decisions, no fun.

Even if you select random slots, there's no pattern of realistic probability whatsoever to how they transition form one to the next, so dark, gloomy skies are rendered entirely benign as the following slot could be anything from brilliant sunshine to thunder. Clouds, no matter how dark, are currently entirely without meaningful consequence.

Compare the vacant aesthetics of the current implementation then to the sight of an overcast sky using the newly proposed system of realistic probability simulation. You see the skies turn gloomy and you're wondering what comes next...

20% Light Rain
18% Heavy Rain
5% Storm
5% Thunderstorm

It'd certainly force you to consider your race strategy.

Raven403
19-06-2015, 13:52
Up vote to infinity. This is a must if not for Pcars but for pcars2. Great idea it's something that bugs me, how it can go from sunny shiny day to heavy fog in a lap. Great work!

Pamellaaa
19-06-2015, 13:56
Whilst I feel very strongly that something like this ought to be implemented into the career mode, it goes without saying that the creation of solo or online events or championships would be dramatically enhanced also. Player event creation suffers from the exact same problem as does career mode with regards to the weather, in that you have to actually select it yourself, meaning that you know exactly what's coming up just as with the scripted career.


I think, I am not 100% on this mind, that in an online custom lobby only the host will see the exact weather so if someone was to base their simulation on your work above it could add some tension for all other drivers in the race.

Schnizz58
19-06-2015, 15:45
Nice work ciderman.

ciderman9000000
19-06-2015, 18:16
Cheers, man. You helped me out with my thought process in the other thread last night and inspired me to come up with this, a far more simple, elegant and effective solution than my original idea.

It's proven rather popular so I'll work on a UK summer and spring table and post it tomorrow maybe.

ciderman9000000
20-06-2015, 11:14
So here's the table for UK Spring/Summer.

http://images.tapatalk-cdn.com/15/06/20/bb5a82409a16da6a885897df2199b6c1.jpg

I've tried to emphasise a combination of clear skies and intermittent cloud with rain often never too far off the horizon, usually only light but sometimes a heavy downpour. The occasional Storm should be a threat though they likely won't last very long, and I've eliminated the prospect of fog.

My test tun of ten simulations produced the following results:

Clear/Light Cloud/Light Rain/Medium Cloud
Clear/Clear/Clear/Light Cloud
Clear/Clear/Clear/Light Cloud
Medium Cloud/Medium Cloud/Heavy Cloud/Light Rain
Light Rain/Light Rain/Thunderstorm/Thunderstorm
Hazy/Hazy/Light Rain/Medium Cloud
Clear/Light Rain/Heavy Rain/Light Cloud
Light Cloud/Light Cloud/Light Cloud/Medium Cloud
Medium Cloud/Heavy Cloud/Overcast/Heavy Rain
Clear/Clear/Light Cloud/Light Cloud

hkraft300
20-06-2015, 11:57
Could you maybe use basic 2014 weather data to come up with the % figures for the table?
Like how many clear days in the year, how many wet days, fog days, etc...
That way for example the British tracks would see more wet days than Dubai

ciderman9000000
20-06-2015, 12:24
I looked into that but concluded that it'd be unnecessarily complicated.

My process has been to make educated guesses at the correct values before running the test of ten simulations and examining the results, then tweak the values and repeat. Eventually you get the final table providing consistently believable results.

Dubai certainly wouldn't pose much of a challenge.

hkraft300
20-06-2015, 13:10
I mean if you have the simple data, say 300 days out of 365 at Dubai were clear, 20 were fog, 35 were partly cloudy, 10 were light rain, etc you have your percentage values to plug straight in your table
Or you could come up with the values using educated guesses, like you have.
Certainly more complicated, but your method produces believable results anyway without relying on outside data.

Linus27
21-06-2015, 08:00
Don't forget that here in the UK, especially in spring/early summer we get a lot of rain overnight, either, late evening, through the night and in the early part of the morning. Then the day is hot and sunny. Yesterday was a prime example of this.

The UK weather is so changeable as already mentioned. I did a sessioned track day a few years back at Castle Combe and on the hour, every hour we had different weather. We had sun, we had rain, we had hail stones and we had snow. It was just comical.