White Horizons & Weather Solution

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

White Horizons & Weather Solution

Post by maxtedrw »

This is going to take a little longer to explain than one post as to be able to troubelshoot your setup needs a little background knowledge that may or may not be common knowledge. Excuse me if I am teaching many of you to suck eggs here but I think it worth gathering all I have found out into one place.

So to start at the beginning. The weather system in TS2015 has changed absolutely at even the most basic level. However, DTG have left the previous concept intact and working to enable backwards compatibility. Over several versions up to TS2014 there were incremental improvements in the weather system but no radical change.

There are now 4 weather systems available in TS2015.

1. RailSim Weather - this is the oldest weather system now running ( I call it RailSim Weather ). It uses a cone of sky around you which is painted with colour and on which pictures of clouds are projected. The cone moves along with you. All aspects of this weather system are found in Assets\Kuju\Railsimulator directory. Inside this directory /TimeOfDay contains the seasons and the colours the sky is painted at various times of day. Directory /Weather contains the way in which the dome colours and other aspects are painted uder various weather conditions. This directory contains the weather which shows up as a selection type "EU_Stormy" (etc..) and the files are called Weather 1.bin etc.
In the present version of the simulator there are still scenarios which use this kind of weather. However, it is NOT used in the quickdrive weather selections.
This a a legacy weather type.

2. RailWorks 2012 Weather - this system uses the same painted dome and cloud pictures concept as RailSim Weather. It is recognisable by the whispy clouds of a more deffuse nature. However, the seasons, the dome itself, and the weather are all reloacted to the Assets\Kuju\RailsimulatorCore directory. The seasons and time of day colours are found in the /TimeofDay directory and the weather is found in the ?weather directory. This weather shows up as selection "1. Cloudy" (etc...) in a scenario and the weather files are the RW_Cloudy.bin types. All the weather files for this start as RW_. Most of the current scenarios for non-RSC routes use this weather system still. It is also the weather system that is used if the "NewClouds" box is not ticked on the settings menu.

In the quick drive menu this sytem is also what is selected if the "NewClouds" box is not ticked. However, there is an important point here. the RW2012 weather has many types of RW_ weather files. Some of which are things like RW_NightCloudy.bin. The setting on the quick drive weather selector determines which is used so the time will cause RW_nightcloudy to be used rather than RW_cloudy. It is this that partly explains why sometimes the White Hills effect is worse at night and sometimes not.

3. TS2014 Weather. This uses the same basic system as RW2012 weather of cloud domes, painted skies etc. However, this weather is instantly recognisable by the more sharply definned clouds ( that to my mind look like pictures ) and espeacilly the speed of cloud movement. This weather system was only implemented in the RSC routes and in one or two 3rd party routes. The weather system is located in each route directory and specific to that route. So for BathTemp it is found in Assets/RSC/BathTemp/Weather etc. Some newer scenarios for these routes written after TS2014 was released use this weather but most scenarios even for these routes use the previous RW2012 weather or even (exceptionally) a right old mix and mash of all versions.

4. TS2015 Weather. This uses a completely different paradigm ( I couldn't resist !). The skydome and painted clouds are gone and the weather now is created in real time all over the planet and you move through it. The weather creation uses weather physics to set up the weather depending on the time and season you select. The weather physics bits are stored in the /data/SilverLight directory and the weather generating files are stored in the Assets\Kuju\RailsimulatorCore directory as weather type "1. 3D Cloud" (they all use the 3D tag) and the files are called "SL_Cloudy.bin" etc.

Critically this weather is only switched on by the "NewClouds" tick box thingy and if this is not ticked the weather reverts back to RW2012 RW_ type for most routes except those with TS2014 weather available. If this weather is selected and used in a scenario but then played without the "NewClods" tick box being activated it seems that the sim reverts back to running the sim in the RW2012 equivilent or TS2014 if available.

This information is quite important to understanding the next bit ........
AndyUK
Very Active Forum Member
Posts: 3110
Joined: Thu Aug 15, 2002 7:57 pm

Re: White Horizons & Weather Solution

Post by AndyUK »

Interesting and useful I look forward to the next chapter, thanks for taking the time to post it. Just to be 100% clear is the "NewClouds" box you refer to the one labelled "Dynamic Clouds" that I've highlighted in the attached screenshot?

Andy L
Attachments
Settings.jpg
User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

Re: White Horizons & Weather Solution

Post by maxtedrw »

Assuming that everytning else is working ok - i.e. that selecting the "NewClouds" tick box and running a quick drive gives a brown horizon. This is worth checking on the 3rd party route that is giving you white horizons when "NewClouds" is unticked.

There are a number of operations that need to be performed to solve the problem: these are ~

1. Edit the RW2012 weather types located in RailSimulatorCore\weather to reset the fog. It is worth mentioning here that "fog" is not so much "fog" as the way in which the point where the skydome meets the scenery in the traditional legacy skydome is blended to prevent a sharp line. Think of it as blurring rather than traditional autumnal pea souper. It happens that using it in a particular way can reproduce a pea souper but that is not it's prime purpose.

2. Edit the RailSimulatorCore\TimeofDay seasonal files to manipulate the fog and ambiant light which reflects back off far distant hills.

3. Check that Quick Drive scenarios for your 3rd party route call up either SL_clear or RW_clear ( it doesn't seem to matter ) rather than any legacy RailSim2012 EU_ weather types.

4. Check the Assets/MYROUTE/RouteTemplate files do the same for their default weather

5. Check that Content/MYROUTESUID/routetemplate.xml does the same.

There is a possible final step that I have not yet checked (Not on my Railworks computer as new windows being fitted :o ) which may be to change any EU_ weather types from scenarios but I don't think this is necessary.

So what settings to use ??
User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

Re: White Horizons & Weather Solution

Post by maxtedrw »

Yes it that tick box - problem of doing this from notes and memory whilst main computer is under wraps to protect from flying glass and window fitters !

I have realised that my notes for the next bit are incomplete so it will have to wait for the fitters to finish later this afternoon when I can give the values properly.

In the longer term ( this weekend ) I hope to be able to release a set of modified RW_ weather files and the TimeofDay files I have developed which solve the problem for most 3rd parties.

More later ......
scefhwil
Well Established Forum Member
Posts: 905
Joined: Tue Dec 04, 2001 12:00 am
Location: Bristol, England

Re: White Horizons & Weather Solution

Post by scefhwil »

Very useful and informative posts Maxtedrw. Just a few random bits to throw in as I was having a poke around at the new weather system last night....

I've found that there are also new TS2015 weather .bin files in the Academy route .ap structure, in the /weather folder. (I don't have any of the new TS2015 "default" routes so can't comment if they have their own also, but from reading posts elsewhere I suspect they do). These can be selected in any route by enabling the DTG/Academy assets in the provider/product selector. This gives a series of "3D cloudy" weather type names, noting that they don't have the "1." etc, parts in the name that the files from Kuju\RailsimulatorCore folder give. Haven't had time to see if these two sets of bin files are configured the same or differently yet.

When setting up weather in the scenario editor I'm not yet sure if it matters to select a correct date for the season chosen, ie if the season is autumn then does it matter if the scenario date is September/October/November or not? Now that SilverLining does the difficult "where in the sky is the sun and moon" calcs which setting does it use? This might explain why the wrong shadow lengths are being seen for time of day/seasonal weather selected?

As posted elsewhere, the blue tinge that has appeared in TS2015 weather can be overcome by editing the silverlining override file.
kh74124
Getting the hang of things now
Posts: 11
Joined: Wed Mar 20, 2013 9:25 pm

Re: White Horizons & Weather Solution

Post by kh74124 »

Very interesting post, thanks.

However, the issue of bright horizons occurs on routes such as the Riviera Line, GWML, Woodhead, and none of the files for these routes or the weather files in Kuju were changed in any way in the TS2015 update. (I've run a before+after comparison with a backup.) The issue is also present whether Dynamic Clouds is ticked or not.
User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

Re: White Horizons & Weather Solution

Post by maxtedrw »

OK so new windows fitted and after opening them fully, then a bit, then thinking I ought to clean the others I have sort of run out of exciting things to do with them other than look at a fabulous autumnal sunset and think (sadly) "low sky colour whitey blue high sky colour duck egg blue it is the clouds that go yellow".

So what to edit in the RW_cloudy etc files is the first task.

You will need to find the files which are in assets/kuju/railsimulatorcore/weather and are those starting with RW_xxxxx.bin. I would suggest that you make a backup copy of all the RW_XXXX.bin files in case of errors. SERZ them to make an xml file.

Go down the file looking for lines that start <WeatherTypeaaaaa> where aaaa is something like "clear" or "cloudy". These determine what the weather response is.

If you look you will see that these lines each head up a section of code which includes the lines:

<FogOverride d:type="cDeltaString">eTrue</FogOverride>
<FogColour>
<cHcColour>
<Red d:type="sFloat32" d:alt_encoding="000000E05757E73F" d:precision="string">0.729412</Red>
<Green d:type="sFloat32" d:alt_encoding="000000E05757E73F" d:precision="string">0.729412</Green>
<Blue d:type="sFloat32" d:alt_encoding="000000E01717E73F" d:precision="string">0.721569</Blue>
<Alpha d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</Alpha>
</cHcColour>
</FogColour>
<FogStart d:type="sFloat32" d:alt_encoding="0000000000C06240" d:precision="string">150</FogStart>
<FogEnd d:type="sFloat32" d:alt_encoding="0000000000509440" d:precision="string">1300</FogEnd>

These are the culprits. It is not that they have changed in this version it is that the sim's response to them has changed.

The first thing is to set <FogOverride d:type="cDeltaString">eTrue</FogOverride> to eFalse instead of eTrue. This line makes the hills darker straight away but will not of itself cure the problem but without this change there is no way to cure the problem. You will have to trust me on this as I have done some pretty exhaustive tests which you can replicate when we have finished.

You should change this value for every <Weathertype> in your file and for every one of the files EXCEPT RW_Foggy and RW_NightFoggy as I have yet to check that this won't disable the fog in these. ( I will confirm this later)

After that mammoth job you will need to serz the file to convert it back to a bin. You are then ready to go to the next step.
User avatar
Retro
Very Active Forum Member
Posts: 4926
Joined: Tue Oct 19, 2004 9:52 pm
Location: Bury. Home of the E.L.R.

Re: White Horizons & Weather Solution

Post by Retro »

Hi,
I have noticed the white distant mountains on my Central Route when it is dark. I altered the weather to 3D Raining and the white then vanished. It is much darker overall with the new weather system and more realistic. There does need to be more variety of weather such as in the old system where it might stop raining for a period of time IMHO.
I have yet to look at some of the other Scenarios.
Kind regards James.
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

Re: White Horizons & Weather Solution

Post by maxtedrw »

The next step is to set up the TimeofDay files. These are found in assets/Kuju/RailsimulatorCore/TimeofDay. The file names give a strong clue but are confusing as those for RW2012 weather are called CORE_ something and work with the weather type RW_ something whereas those for what I call RailSim weather ( the oldest version) are called RW_summer and work with EU_stormy etc. That is probably the most frequent cause of problems of mix and match to be honest.

Anyway. Do the backup and SERZ thing for the CORE_summer file to start with. We will be working with the summer to start with.
In this file you will find sections that look horrific. Basically it is quite simple. This file breaks the day down into chunks and a time of sunrise and sunset etc. For each time of day it tells the sim what colour to paint the skydome, and how to colour the scenery facing towards and away from the light etc.

The key change here is to darken the fog effect that joins the skydome to the scenery and to bring this effect in a bit so that the effect washes over the furthest hills. Ignore what the WIKI says about this effect - it is out of date.

Scroll down the file and find the section that starts <MidnightTOD> what follows is the definition of how the world looks at midnight with the colours expressed as a percentage RGB value where 100% = 255 RGB value and is light and 0% is dark. ie. the smaller the value the darker the colour. Find the section in this that starts with <FogColour>

Change the values in this section to something dark such as
<FogColour>
<cHcColour>
<Red d:type="sFloat32" d:alt_encoding="000000A0FD0F903F" d:precision="string">0.015686</Red>
<Green d:type="sFloat32" d:alt_encoding="000000A0FD0F903F" d:precision="string">0.015686</Green>
<Blue d:type="sFloat32" d:alt_encoding="000000A0FD0F903F" d:precision="string">0.015686</Blue>
<Alpha d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</Alpha>
</cHcColour>
</FogColour>

This colour needs to be applied to the fogcolour for the<NightTOD> and <DuskTOD> time period sections as well. For the day you can make far hills less blue by reducing the fog colour by about 0.1 or even as much as 0.9 less. But it is not essential.

Once this is done you will also need to bring forward the fog start distance. Find the section in the timeperiod definition that reads

<FogStart d:type="sFloat32" d:alt_encoding="0000000000006940" d:precision="string">200</FogStart>
<FogEnd d:type="sFloat32" d:alt_encoding="000000000070B740" d:precision="string">6000</FogEnd>

If the values are radically different from those above get the fog start down to between 200 and 500. It doesn't mean that you will have fog at 200m or something but it really does turn the white distant hills to a sensible colour if your weather file is set correctly.

Repeat this process for Autumn, Spring and Winter. If the sky is too deep blue by the way ( and it often is ) this is the time to wind the brightness up a tad by raising the values in your UpperSky section of the daytime sections.

You will now have a set of modified TimeofDay Core_ files that you will find work with any route ..... that uses them....... which is the next check
User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

Re: White Horizons & Weather Solution

Post by maxtedrw »

Every route has a file called RouteProperties.xml located in the base directory of the route in \Content\MYROUTEGUIDhorriblenumber\

This file tells the route what weather and season files ( and hence ) system to use in all scenarios EXCEPT quickdrives. The critical thing here is that none of the above fixes work for scenarios using the RailSim weather oldest EU_xxxx type weather and RW_season TimeofDay files.

Open the contents\myroute\RoutePoperties.xml first. Find the section marked <Skies> and check that it references RailSimulatorCore and not RailSimulator as the <product> and that the TimeofDay file names are not RW_ types. If they are then change them to Core_ types. For some routes like West Scotland/Port Road the author has provided their own TimeofDay season files. If you are getting white mountains in the route then you can apply all the changes above to those files and it will work. The same is also true for what I call TS2014 weather for RSC routes such as Bath etc which have there own TimeofDay files called from the routes RouteProperties.xml. I will return to these as they are set correctly and the issues are scenario specific.

Check the section that starts <WeatherBlueprint>. I am not sure where this weather is used as it isn't in scenarios or the quick drive but if it is set to an EU_ type weather none of the above fixes will work. Set it to either RW_Cloudy or SL_Cloudy - it actually doesn't seem to matter which when I tested it.

Save the file ( no need to SERZ it as it is used as an XML file)

Open the route's asset directory. This can be quite hard to find for third party routes but if we use coniston freeware as an example it is in Assets\pedro_dehoton\coniston\TemplateRoutes. It is almost always in a /TemplatesRoutes directory and the file is called in this case Coniston.bin.

You need to repeat the sane two operations above checking the TimeofDay files refs and the Weather refs in this file.

If the fix doesn't work for a particular route in the future ( once you have modified the Railsimulatorcore files) than all you need to do is to go straight to this section and do these operations - it will fix the problem.

Ok so why the last step in the process ???
User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

Re: White Horizons & Weather Solution

Post by maxtedrw »

This is where the biggest issue arises in backwards compatibilty. All of the previous sections will address problems in 99% of scenarios and quick drives. But not always.

When a scenario sets up a scenario one has to choose the weather. Similarly a route author has to choose some time of day files. In both cases the sim presents a list of ALL of the weather types available including some interesting ones like EU_SlightlyStormyButOntheWholeNotABadDay which of course everyone plumps for. Except that as you will now realise the author has just welded the scenario to the oldest weather system that simply cannot be made to show distant hills correctly.

There are scenarios for RSC routes like Settle and Carlisle which has TS2014 weather but the scenario uses RailSim ( Legacy) EU weather in combination with the routes TS2014 seasons. As a result troubleshooting is hard to do.

So, this last stage is really one to use for (a) neatness or (b) if all else fails check this.

Each scenario (including quickdrives) has a ScenarioProperties.XML file in its Contents/MYROUTEGUIDNUMBER/Scenarios/23453fsadgf17654754/ type directory. However there is a quick of finding this which is to go to the build and then scenario menu and find the scenario you want. On the righthand side is a clickable link to the source files for the scenario ! Easy.

Open the file and find the section
<WeatherBlueprint>
<iBlueprintLibrary-cAbsoluteBlueprintID>
<BlueprintSetID>
<iBlueprintLibrary-cBlueprintSetID>
<Provider d:type="cDeltaString">Kuju</Provider>
<Product d:type="cDeltaString">RailSimulatorCore</Product>
</iBlueprintLibrary-cBlueprintSetID>
</BlueprintSetID>
<BlueprintID d:type="cDeltaString">weather\rw_foggy.xml</BlueprintID>
</iBlueprintLibrary-cAbsoluteBlueprintID>
</WeatherBlueprint>
If the weather here is an EU_ type or the provider is RailSimulator and not RailsimulatorCore then change it to a TS2012 RW_ or TS2015 SL_ type.

That should cure the problem provided the steps above a re completed.
User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

Re: White Horizons & Weather Solution

Post by maxtedrw »

And that is pretty much that.

What I have learnt is that the Dynamic Clouds tick box is effectively an instruction to the sim to use Silverlight TS2015 weather system. If the box is unticked, provided you have got all your beans in a row the sim will start up the TS2014/TS2012 weather system.

This means that those of us who are less than convinced by the SL weather will be able to play scenarios created using SL_ weather and those using SL system as a preference will be able to use it on scenarios written in RW2012/14 but will find the full effect of the SL system won't happen as the scenario won't be accessing SL_ weather.

It means that QD scenarios especially can be written for the SL_ sytem and used by TS2014 prefereees quite happliy.

To end this I think I will be issuing some modded RW_ weather files and my own TS2012 TimeOfDay files turned into Core_ files to overwrite the current ones for those that are happy to do this.
jstange
Very Active Forum Member
Posts: 1832
Joined: Wed Apr 04, 2012 5:46 pm

Re: White Horizons & Weather Solution

Post by jstange »

All these are certainly very interesting findings, thank you very much for that. I started to try some of them out, however I am not sure I want to edit million and one file just because DTG changed the way all these files are interpreted.

I believe there must be a way how to alter this intepretation to return back to TS2014 look (or close).
User avatar
maxtedrw
Well Established Forum Member
Posts: 918
Joined: Tue Jul 02, 2002 11:06 pm

Re: White Horizons & Weather Solution

Post by maxtedrw »

I would be surprised if dtg change the set up for the weather back. I am still hoping to release some updated files. It is taking longer than I expected to do the new season files.
User avatar
JustRight
Well Established Forum Member
Posts: 711
Joined: Mon Nov 21, 2011 7:06 am
Location: Adelaide, South Australia

Re: White Horizons & Weather Solution

Post by JustRight »

maxtedrw wrote:I would be surprised if dtg change the set up for the weather back. I am still hoping to release some updated files. It is taking longer than I expected to do the new season files.
I'm really hopeful you are able to do this mate. Although your description of the mods required is thorough, it's quite an undertaking! I'm sure many of us would welcome an installable 'fix'.

Cheers.
Locked

Return to “[TS] General Discussion”