Weather & Environment

= Weather and Environment =

At the request of the Community that took part in shaping Project CARS on the WMD forum, Slightly Mad Studios devoted a substantial amount of development resources to create was a dynamic weather system.

Kevin Boland of SMS kindly supplied the community with a writeup, upon which much of the content on this page is based.

Overview
Internally the weather system we have is actually quite robust in how it can receive weather forecast information.

The way it works is that you can feed it a condition and how long that condition will last for. With that information it will create a timeline that will playout. It works basically on a 24 hour clock.

Saying all that we did not expose all this functionality to the player because frankly we was thought it was a little bit of overkill.. (As you all know PCars was a co-operative development and I think we forget a little how a simple menu like this can be confusing to people only buying the game anew.)

Ok so the when you look at the screen the first option you can see is a menu item called weather slots. Here you can select between 1 and 4 slots.

Using these slots, the race setup will feed a weather timeline into the weather system.

Each slot represents what the weather will be at the top of every hour with slot 1 being the race start time, slot 2 race start time +1 hour and so on. We repeat this cycle over a 24 hour period.

Example (part 1)
For example we setup a system with 2 weather slots one rainy one clear and the race time at 2pm.

Race setup will feed a timeline to the weather system something like this:


 * at 2pm weather will be rainy and it will be like that for 40 mins.
 * at 3pm weather will be clear and it will be like that for 50 mins ...
 * at 4pm weather will be rainy and it will last 53 mins...
 * at 5pm weather will be clear and it will last 35 mins ..

What this will do is when you start the race it will be raining and will so for the first 40mins.

Then at 2:40pm the weather will start to clear up and by 3pm it will be fully clear and stay that way till 3:50pm and so on. (note the time the weather would last for is random, it was thought exposing info like this would again be too much information)

Ok so that's all simple enough. Now where it gets a little confusing

Decoupling Weather from Day & Night cycle
Somewhere along the development process people wanted to decouple the weather from the day and night cycle.

So for example they wanted the weather to be changing a lot but have the time of day to stay the same.

So what we did was decouple the weather timeline progression (Weather Progression) from the day night (Time Progression). This meant for example you could have the weather speed at 60 i.e 1 second equals 1 min but time of day at real time.

Example (continued, part 2)
So in the example above if we had the weather progression at realtime it would take 40 mins for the weather to start to transition to rainy. But if we set it to 60 it would only take 40 seconds.

Coupling Weather to Race Progress
Then later in the project it was proposed that instead of the weather timeline being a time based thing people wanted it to happen based on how the race progressed..

So a new option was added to the Weather progression slider called "sync to race"

So the way it works is each slot would represent a proportion of the race, so if we had 2 slots they would represent the the first and second half of the race, if 4 slots then each quarter of the race.

Example (continued part 3)
So again taking our above example it would mean the following:

The Start of the race as always rainy and the end of the race would always be clear.

E.g if you had a 2 lap race you would have rain at the start and at the point where the leader began the second lap the weather would be clear.