Weather Pattern Blueprints

Introduction


This section is intended to aid in the creation of new weather patterns in Train Simulator for use in user-created scenarios. Weather patterns are selected in a scenario by double-clicking the scenario marker and selecting a pattern from the subsequent pull-down list.

Weather is important to the look and feel of a scenario. You can create generic weather patterns which can be used in many scenarios or you can make a specific weather pattern tailored to the events of one scenario.

Blueprint Creation and Structure

The Blueprint Editor should be used when creating or editing any blueprint.

Weather Blueprint Location

By default, Weather blueprints should be located under the following folder structure:

C:\Program Files (x86)\Steam\steamapps\common\railworks\Source\"Provider"\"Product"\ Weather

"Provider" is the folder name of the developer creating the new content and "Product" is the product name of the new content.

Blueprint Creation

In the Blueprint Editor navigate to the location of the weather folder described above and right-click the mouse on the weather folder. A menu appears with several options. Select the New Blueprint option to create a new weather blueprint.

A new window appears displaying a list of available blueprint types. Scroll down the list until you see the Weather Blueprint. Left-click this option and press OK.

A new weather blueprint is then created with a default name which you rename to something more memorable either now or at a later time. The main window of the Blueprint Editor now displays the various fields needed to set up the weather.

Blueprint Structure

The blueprint is quite large and can seem daunting. At its basic levels the blueprint can be seen as consisting of the following sections:
  • Display Name
  • Weather Type X4
    • Clear
    • Overcast
    • Rain
    • Storm
  • Precipitation Type X4
    • Rain
    • Sleet
    • Hail
    • Snow
  • Cloud Type X4
    • Clear
    • Overcast
    • Rain
    • Storm
  • Weather Events (User defined amount)
  • Audio

Display Name

The display name is displayed in the scenario editor when you are picking a weather type for that scenario. It is a good idea to give a short yet descriptive name. Display names must be unique. Multiple blueprints with the same friendly names will create conflicts.

Weather Types

There are four weather types in the blueprint. Each has an identical structure. These weather types are:
  • Clear
  • Overcast
  • Rain
  • Storm
Although these four weather types are given suggestive names in the blueprint there is no reason to restrict the creation of your weather types to these categories. If you wanted to have four different types of storm, for example, with subtly changing fog levels or rain density then there is nothing to stop you from creating these four storm types in the Clear, Overcast, Rain and Storm sections.

You also do not have to use all four weather types; if you want one constant weather type then you need only set the first weather type, which is "Clear" (again, the name is suggestive only). The more weather types you set up, however, the more variation you can have using this weather blueprint in a scenario.

You cannot set up more than four weather types, but you can cycle through them in any order, any number of times, to create variation; this is done in Weather Events near the end of the blueprint. The fields in the weather type section of the blueprint are described in detail below.

Wind Direction

This is a value between 0 and 359 which corresponds to the degrees on the compass, where 0 is north and 90 is east and so on. Setting the wind direction has a twofold effect. Firstly, it affects the direction in which the clouds move and, secondly, it affects the direction in which precipitation falls. For example, if the wind direction value was set to 90 then the clouds would move east and the rain would fall diagonally to the east.

Wind Speed

Setting the speed will affect the rate at which clouds travel across the sky. The higher the value the faster the clouds will move and the shallower the angle at which precipitation falls. Note that the fall angle of precipitation is also controlled by the speed, described later.

Precipitation Type

This is a drop-down list from which you can specify the type of precipitation that will fall in this weather type. The four valid precipitation types are rain, sleet, hail and snow and can be set up further down the blueprint. Setting up precipitation types are detailed below.

NOTE: The fifth option “Precipitation Count” is not a valid option and should not be selected.

Precipitation Density

This is a value between 0 and 1 where zero is no precipitation fall and 1 is the heaviest. Setting a value greater than 0 but below 1 will provide a varying heaviness of precipitation.

Precipitation Speed

This value works in conjunction with the wind speed to determine the speed and angle of precipitation fall. This value could be thought of as the vertical momentum of the precipitation whereas the speed is the horizontal momentum.

For example, a low speed in this field could be used for slowly falling snow. However, if the wind speed was set to a high value then this slowly falling snow will travel at speed faster horizontally than it would vertically.

Fog Override

This is a true/false option which simply determines whether the default fogging is used, as set up in the Time of Day Blueprint, or whether the settings used are those set in this blueprint, overriding the defaults.

Fog Colour

The fog colour can either be set by sliding the separate red, green and blue slider bars or by clicking the colour bar itself where a new window will appear.

Tip: You may want to tailor weather patterns to a scenario. A weather pattern with light colour fog may look great in the daytime but will make a scene look illuminated at night. For darker times of day, a darker fog colour is recommended.

NOTE: The alpha section and slider currently has no effect.

Fog Start

This value is in metres and determines how close to the camera the fogging effect begins.

Fog End

This value is also in metres and determines the point at which all objects become fully fogged out. Setting this to a relatively small value, such as 150, will mean that any objects further than 150 metres from the camera will be hidden by the fog.

Lightning density / Frequency

These values are currently inactive.

Blend in Time

This is a number, in minutes, that it will take for this weather type to blend with the subsequent weather type. This can be set to decimal fractions of under a minute, however, for more realistic weather transitions, the suggested blend should be at least a minute. This value will have no effect if only one weather type is defined in a blueprint.

Cloud Type

This is a drop-down list from which you can specify the type of cloud cover to be associated with this weather type. The four valid cloud types are clear, overcast, rain and storm and can be set up further down the blueprint. Setting up cloud types are detailed later in this document.

NOTE: The fifth option “Cloud Count” is not a valid option and should not be selected.

Precipitation Types

Precipitation type is selected from a pull-down list in the weather type section of the blueprint. There are four precipitation types to choose from and each has an identical structure. These precipitation types are:
  • Rain
  • Sleet
  • Hail
  • Snow
Similarly to the weather types, these are given suggestive names in the blueprint but there is no reason to restrict the creation of your precipitation types to these categories. You may use these four precipitation type slots to make four variants of rain, for example.

You also do not have to use all precipitation types or any. However, the more precipitation types you set up, the more variation you can have in a scenario. The fields used in setting up the precipitation type section of the blueprint are described in detail below.

Bottom Left & Top Right View Space Offset

For these values, you are picking an area where the texture will be resized into based on the location of the bottom left and top right values. If the bottom left is X=0 Y=0 and the top right is X=1 Y=1, this will show the whole image with equal size sides and there will no resizing. If you then tweak these numbers so that the top right is half the height (X=1, Y=0.5) then you will have a displayed image squished so it is normal width but half height.

Making these values tiny will make the texture display in a little raindrop size texture. So Bottom left is still X=0 Y=0 but the top right can be set to X=0.02 Y=0.04 so it is very small, but it is twice as tall as it is long.

One way to look at these values is to think of them as referencing the raindrop texture that is like a foam ball and it is squishing it down in size based on the numbers. The ball itself isn't changing, just its height/width/size.

Bottom Left & Top Right UV

Whereas the values above could be thought of as squishing a foam ball, these values can be thought of as how you slice up that ball.

Using the same XY 01 grid above, imagine the texture is laid out on that grid and the bottom left is again X=0 Y=0 and the top right is X=1 Y=1. This is the whole texture. When you change the values from this you start to slice into what part of the texture is displayed; so if the top right of the image is specified as only halfway up the image (x=1, y=0.5) then only the bottom half of the texture has been specified to be drawn, so will look like the bottom half of a circle.

It is better to leave these values so that the UV shows the entire texture (bottom left is again X=0 Y=0 and the top right is X=1 Y=1) and use the space offsets to change the size. The best size for the offsets I have found so far for light rain is bottom left X=0 Y=0 top right X=0.02 Y=0.04. Then set alpha top to 255, bottom to 0 and precipitation speed to 40. If you want lashing rain, make the offset sizes a little bigger (like loosening the grip on the sponge ball I have forced into a tiny size for the light rain) and maybe up the streak modifier to 2 or 3.

Alpha Top

Adjusting this value sets the alpha, or opaqueness at the top of the texture.

Alpha Bottom

Adjusting this value sets the alpha, or opaqueness at the bottom of the texture. If the values are the same as the top then the texture will have the same opaqueness throughout.

Particle Streak Modifier

This value determines the factor by which the texture used in the precipitation type becomes elongated. By default, this value is 1 which means it is not elongated. Increasing this value will turn a roughly spherical snowdrop into a streak. A raindrop which has been given a value of 10 turns the rain into a series of streaks.

Texture ID

This field points to the location of the texture used for the precipitation type. The texture is in the .ace format described in the Art Guidelines section of the Reference Manual.

To reference the .ace file either manually, type in the path or Right click the texture and select “Copy Filename” then paste the result into this texture ID field using the keyboard shortcut Ctrl + V.

Cloud Types

Cloud type is selected from a pull-down list in the weather type section of the blueprint. There are four cloud types to choose from and each has an identical structure. The types are:
  • Clear
  • Overcast
  • Rain
  • Storm
Similarly to the weather and precipitation types, these are given suggestive names in the blueprint but there is no reason to restrict the creation of your cloud types to these categories. You could have four variations of stormy weather in these four slots if you desire.

There are three layers of cloud texture created as part of a skydome texture. The skydome used is specified in the Sky Info Blueprint which is described in a separate document. The cloud types are basically formed by specifying how much of each of the three cloud layers are visible at a time, plus a general sky darkening modifier.

Four fields are used in setting up each cloud type and all the values are between 0 and 1 where 0 effectively hides that texture and 1 displays the texture fully.

NOTE: The textures and the skydome can be recreated or modified by advanced developers.

Wispy Alpha layer

The first cloud texture layer is the wispy layer. A value of 0 in this field will hide this texture layer. When the maximum value of 1 is entered in this field and 0 in all others then the sparse wispy cloud texture is displayed.

Thick Cloud Alpha Layer

The next cloud texture layer is the thick layer. A value of 0 in this field will hide this texture layer. When the maximum value of 1 is entered in this field and 0 in all others then the thicker cloud layer texture is fully displayed.

Storm Layer Alpha Layer

The next cloud texture layer is the storm layer. A value of 0 in this field will hide this texture layer. When the maximum value of 1 is entered in this field and 0 in all others then the dark and foreboding storm cloud layer is displayed.

You can opt to display one layer at a time or all layers together to varying strength. With all three cloud layers set to the maximum of 1, you can see how all three co-exist.

Colour Darkening Intensity

This is a value between 0 and 1. The higher the value in this field the darker the base sky will become (cloud colour is unaffected).

Weather Events

Now that all the weather types you are using have been set up with their subtypes of precipitation and cloud, you can now select the order and duration in which these weather types will play.

Initially, the weather events section is empty, meaning no playlist has been set up. To create the first event, click the plus sign to expand the section of the blueprint and then “Insert First”. You can then expand this first weather event instruction where you will see a type and time field, which are described below.

Additional weather events can be added which will play out in sequence.

Type

This is a drop-down list containing the four weather types that are set up earlier in the blueprint. Selecting one of the four weather types will add it to the event list. All the events will play out in order, separated by the blend in time.

NOTE: There is a fifth option in the list “Weather Type Count” which has not been implemented and should be selected.

Time

This is the duration in minutes that the selected weather type will run for, before blending into the next. If this is the last weather type in the list then it will continue indefinitely.

Audio Control

Audio is set up on a per blueprint basis. This section of the blueprint points to the weather audio control blueprint. A weather audio blueprint does not need to be referenced or set up for the weather to work.

Name

This is an arbitrary name for the weather audio control.

Audio Control

This is the location where the weather audio control blueprint is located. This type of blueprint will be referenced in a later document.

Exporting the Weather Pattern Blueprint

Once the blueprint has been completed to your satisfaction, you should save and export the blueprint.

Exporting the blueprint places the information contained in the Source files to the Deployment side, which is a "game ready" format. After a successful export, the weather pattern will be available for selection by double-clicking a scenario marker and selecting it from the pull-down list.