The “season selector” container is a top-level container of some assets config.txt file that allows the simulator to display the appropriate visual time for each asset instance based on certain environment parameters. The container doesn’t directly specify anything about the visuals, but rather provides logic that maps various environment parameters down to a single “season index”, which is then used in other parts of the asset’s config.txt file.
output-season season-range 0.0, 1.0 above-snow-line 0 branch-true branch-false
output-season
Type: Integer
Description: The season index used for this work if the decision logic reaches this subcontainer. If specified, it should be the only tag in this “Season Selection” container. (0;1;2;3;4)
season-range
Type: vector2
Description: A conditional flag that tests whether the global year value ends in the specified range. If the first number is less than the second, the condition evaluates to (first value <= time of year <= second value.) If the second number is less than the first, the condition evaluates to
time-of-year <= second-value || time-of-year> = first-value.
The global value of year ranges from 0.0 to 1.0 throughout the year, where 0 is the beginning of summer and 0.5 is the beginning of winter.
above-snow-line
Type: boolean
Description: A conditional flag that tests whether the resource instance is above the snow line. If set to a true value (eg 1), the asset instance evaluates this condition as (asset height > = snowline height.) If set to a false value (eg 0), no test is performed.
branch-true
Type: “Season Selection” Container
Description: If all conditional tags in this [sub-] container evaluate to true, this child branch is evaluated to determine the output season for the specified asset instance.
branch-false
Type: “Season Selection” Container
Description: If one or more conditional tags in this [sub-] container evaluate to false, this child branch is evaluated to determine the output season for the specified asset instance.
The season selector for choosing winter would look like this in the top level of your config file (1 for winter, 0 for the other three):
season-selector
{
season-range 0.503,0.741
branch-true
{
output-season 1
}
branch-false
{
output-season 0
}
}
If you apply it to a mesh (scenery), the mesh table will be:
mesh-table
{
default
{
mesh "default/mesh.im"
auto-create 1
mesh-season 0
}
winter
{
mesh "winter/mesh.im"
auto-create 1
mesh-season 1
}
}
If you use it on a base texture, add a texture variant container:
texture-variants
{
0
{
diffuse-texture "default.texture"
}
1
{
diffuse-texture "winter.texture"
}
}
summer = 0
winter = 1
autumn = 4
spring = 5
snow limit summer = 2
snow line winter = 3
snow line autumn = 6
spring in the snow = 7
season-selector
{
above-snow-line 1
branch-true
{
season-range 0.501,0.75
branch-true
{
output-season 3
}
branch-false
{
season-range 0.251,0.5
branch-true
{
output-season 6
}
branch-false
{
season-range 0.751,1
branch-true
{
output-season 7
}
branch-false
{
output-season 2
}
}
}
}
branch-false
{
season-range 0.501,0.75
branch-true
{
output-season 1
}
branch-false
{
season-range 0.251,0.5
branch-true
{
output-season 4
}
branch-false
{
season-range 0.751,1
branch-true
{
output-season 5
}
branch-false
{
output-season 0
}
}
}
}
}