Better 3D Weather

Discussion about RailWorks route design.

Better 3D Weather

Unread postby ENR3005 » Sun Feb 14, 2021 10:08 pm

As I posted in my route thread viewtopic.php?f=10&t=7307&start=165 in the main screen shot forum, I have often wondered if the 3D weather environment could be improved as I thought there was the potential to improve upon what was started. The folks who developed the Silverlining Sky component that TS2021 uses, have a stand alone Windows demo of their software which has a folder directory which is laid out very similarly to the one in TS2021. The most interesting file which I will focus on in this post is the SilverLining.config file which I copied and overwrote the default TS2021 one with after making a back up. Having had a quick comparison of the two, it seems several features were cut out of the one for TS2021 for unknown reasons which can be activated by the file alone. As the bottom image shows, we now have more realistic cloud formation which is way more denser and crisper than the original. I was absolutely stunned by the improvement and it appears that decent 3D weather can be created perhaps after figuring out what makes the new config file tick.

The point of the post is to give someone a reference to build from and make improvements from what I have found and posted. I have included the new Silverlining config file as well for those who want to experiment, you will need to rename the file extension from the txt to config to make it useable, as the forum would not allow me to upload a file with a config extension. Make sure you backup your existing TS2021 files before attempting any changes. Below are links to the Silverlining Developer's site as well if you wish to check out their demo software which has been useful in creating new 3D weather scenarios. I have also included a link for the SDK manual which gives some insight to how some things tick within the program.

https://sundog-soft.com/features/real-time-3d-clouds/

Then click on the "Get The Windows Demo" link only

https://www.sundog-soft.com/docs/html/index.html

Coastal Mist Old.jpg


Coastal Mist New.jpg


SilverLining.txt
You do not have the required permissions to view the files attached to this post.
ENR3005
 
Posts: 219
Joined: Fri Mar 19, 2010 11:50 pm

Re: Better 3D Weather

Unread postby ENR3005 » Mon Feb 15, 2021 1:54 am

So after some further experimentation I found some unwanted scene clipping which was resolved by cutting and pasting some of the original TS2021 Silverlining code into the new file which appears to have solved the problem and I have attached below for those who are interested. A word of caution if you are going to attempt to edit this file to experiment on your own, make sure you use a program like Notepad++ otherwise you risk corrupting the file like I did on my first few attempts.
You do not have the required permissions to view the files attached to this post.
ENR3005
 
Posts: 219
Joined: Fri Mar 19, 2010 11:50 pm

Re: Better 3D Weather

Unread postby GreatNortherner » Mon Feb 15, 2021 3:43 am

Hi,

That's a very interesting discovery about the config!

Some years ago, I experimented with the blueprint side of "silver lining" weather and found that even there is vast room for new and different sky effects, some which looked quite dramatic, and some which looked fairly realistic and nice to me. So clearly there is a lot of unused visual potential there.

However, during the course of which I also quickly found out that 3D weather can be a performance hog in RW. Just by adding more and larger cumulus clouds I created a noticable FPS drop, and attempting to create a summer thunderstorm cloud bank moving over turned the game into a slide show. ... all of which happened on my old laptop, which precise specs I can't remember but it was certainly well above RW min. requirements.

Cheers,
Michael
User avatar
GreatNortherner
 
Posts: 1586
Joined: Sun Feb 15, 2009 11:19 am
Location: Czech Republic

Re: Better 3D Weather

Unread postby ENR3005 » Mon Feb 15, 2021 4:15 pm

There is no change to the weather files to make larger clouds when using the new config file and therefore I have not seen a performance hit. I am using vanilla 3D weather files I have adjusted wind speed and altitude of cloud layers only. When the 3D weather was introduced, we did not yet have the 64bit option to run the simulator and would only likely help with the performance now. The Silverlining demo software has additional cloud information / shapes I have not tried yet but may explore in the future as it is the same basic folder structure as what is provided in TS2021. Of interest there is a Cumulonimbus cloud folder (large anvil shaped thunder cloud) within the TS2021 folder with what appears to be shape data but I have yet to see an actual cloud that resembles one. For now I am happy with the low hanging clouds and mist which is present in my coastal route.
ENR3005
 
Posts: 219
Joined: Fri Mar 19, 2010 11:50 pm

Re: Better 3D Weather

Unread postby ozinoz » Tue Feb 16, 2021 5:18 pm

There is always the Armstrong Powerhouse weather add-on, which shows a little of what can be done with the existing engine. Would be interesting to see if your and the AP add-on would work in conjunction.

Thanks for the exploring...

!*salute*!

!*cheers*!
ozinoz
 
Posts: 1626
Joined: Fri Feb 20, 2009 1:59 am
Location: Antipodes

Re: Better 3D Weather

Unread postby ENR3005 » Tue Feb 16, 2021 8:05 pm

ozinoz wrote:There is always the Armstrong Powerhouse weather add-on, which shows a little of what can be done with the existing engine. Would be interesting to see if your and the AP add-on would work in conjunction.

Thanks for the exploring...

!*salute*!

!*cheers*!


I have the AP pack and enjoy it however you are limited by what you can do what you can portray in a 2D setting which this pack uses. To replicate coastal weather on my route, I needed low hanging clouds almost like a fog but only in specific areas like clouds, something I could not replicate with the 2D Weather unless I wanted continuous fog are to run into a 2D cloud texture which was not very appealing. The 3D weather engine allows be to drive in and out of the coastal fog / clouds, a neat effect when you are running a route especially with some wind added to move them along slowly. Interestingly, I still use the time of day files from the AP pack (likely the best out there and worth their weight in gold) but I do not believe the 3D weather engine will reference any of the other files such as the moon and sun textures. The 3D weather engine has it's own textures in the Silverlining folder. A thought did cross my mind to redo the Silverlining folder textures with the AP ones to see what they look like. An experiment for another time, for now I am happy with the clouds the new config file is creating.
ENR3005
 
Posts: 219
Joined: Fri Mar 19, 2010 11:50 pm

Re: Better 3D Weather

Unread postby ENR3005 » Tue Feb 16, 2021 11:14 pm

Tonight's short experiment, generate a single large 3D cloud at a specific location defined by latitude and longitude. In this case a thunder cloud complete with lightning and flash effects within the cloud / cell itself. Rain shows up only under the cloud itself as well an interesting and possibly useful discovery. Have not figured out the sound part. The scenario was setup with the following specs. Screenshots below of the result.

<?xml version="1.0" encoding="utf-8"?>
<cBlueprintLoader xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
<Blueprint>
<cSilverLiningWeatherBlueprint>
<DisplayName>
<Localisation-cUserLocalisedString>
<English d:type="cDeltaString">SNCR Coastal Storm</English>
<French d:type="cDeltaString"></French>
<Italian d:type="cDeltaString"></Italian>
<German d:type="cDeltaString"></German>
<Spanish d:type="cDeltaString"></Spanish>
<Dutch d:type="cDeltaString"></Dutch>
<Polish d:type="cDeltaString"></Polish>
<Russian d:type="cDeltaString"></Russian>
<Other/>
<Key d:type="cDeltaString"></Key>
</Localisation-cUserLocalisedString>
</DisplayName>
<WeatherType>
<cSilverLiningWeatherType d:id="292874">
<TypeName d:type="cDeltaString">storm</TypeName>
<WindDirection d:type="sFloat32" d:alt_encoding="0000000000002640" d:precision="string">11</WindDirection>
<WindSpeed d:type="sFloat32" d:alt_encoding="0000000000001440" d:precision="string">5</WindSpeed>
<WindMinAltitude d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</WindMinAltitude>
<WindMaxAltitude d:type="sFloat32" d:alt_encoding="000000000088B340" d:precision="string">5000</WindMaxAltitude>
<CloudLayer>
<cSLCloudLayer d:id="292915">
<IsInfinite d:type="cDeltaString">eTrue</IsInfinite>
<Longitude d:type="sFloat64" d:alt_encoding="0000000000000000" d:precision="string">-123.774</Longitude>
<Latitude d:type="sFloat64" d:alt_encoding="0000000000000000" d:precision="string">49.6083</Latitude>
<BaseAltitude d:type="sFloat32" d:alt_encoding="0000000000207C40" d:precision="string">450</BaseAltitude>
<BaseWidth d:type="sFloat32" d:alt_encoding="00000000004CDD40" d:precision="string">30000</BaseWidth>
<BaseLength d:type="sFloat32" d:alt_encoding="00000000004CDD40" d:precision="string">30000</BaseLength>
<RelativeToCameraAltitude d:type="cDeltaString">eFalse</RelativeToCameraAltitude>
<Thickness d:type="sFloat32" d:alt_encoding="0000000000005940" d:precision="string">3500</Thickness>
<Density d:type="sFloat32" d:alt_encoding="000000403333D33F" d:precision="string">1</Density>
<Alpha d:type="sFloat32" d:alt_encoding="000000A09999D93F" d:precision="string">0.5</Alpha>
<CloudType d:type="cDeltaString">eCumulonimbusCappilatus</CloudType>
<VoxelSpinRate d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0.1</VoxelSpinRate>
<EnableGrowth d:type="bool">0.5</EnableGrowth>
<InitialGrowthIterations d:type="sInt32">0.4</InitialGrowthIterations>
<PrecipitationType d:type="cDeltaString">eRain</PrecipitationType>
<PrecipitationRate d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">10</PrecipitationRate>
</cSLCloudLayer>
</CloudLayer>
<CrepuscularEffect d:type="sFloat32" d:alt_encoding="000000000000E03F" d:precision="string">0.5</CrepuscularEffect>
</cSilverLiningWeatherType>
</WeatherType>
<WeatherTransition/>
<WeatherArchetype d:type="cDeltaString">eWeatherTypeCloudy</WeatherArchetype>
<TerrainShadows d:type="cDeltaString">eTrue</TerrainShadows>
<FogOverrideEnabled d:type="cDeltaString">eFalse</FogOverrideEnabled>
<FogColour>
<cHcColour>
<Red d:type="sFloat32" d:alt_encoding="000000803D0AD73F" d:precision="string">0.36</Red>
<Green d:type="sFloat32" d:alt_encoding="000000803D0AD73F" d:precision="string">0.36</Green>
<Blue d:type="sFloat32" d:alt_encoding="000000A09999D93F" d:precision="string">0.4</Blue>
<Alpha d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</Alpha>
</cHcColour>
</FogColour>
<FogEnd d:type="sFloat32" d:alt_encoding="000000000088B340" d:precision="string">5000</FogEnd>
<TimeZoneOverrideEnabled d:type="cDeltaString">eFalse</TimeZoneOverrideEnabled>
<GMTOffset d:type="sFloat32" d:alt_encoding="00000000000020C0" d:precision="string">-8</GMTOffset>
<DSTOffset d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</DSTOffset>
<AudioControlOverrideEnabled d:type="cDeltaString">eFalse</AudioControlOverrideEnabled>
<AudioControl d:type="cDeltaString"></AudioControl>
<NearClipAdjustment d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</NearClipAdjustment>
</cSilverLiningWeatherBlueprint>
</Blueprint>
</cBlueprintLoader>

ThunderStorm_1.jpg


ThunderStorm_2.jpg


ThunderStorm_3.jpg
You do not have the required permissions to view the files attached to this post.
ENR3005
 
Posts: 219
Joined: Fri Mar 19, 2010 11:50 pm

Re: Better 3D Weather

Unread postby GreatNortherner » Wed Feb 17, 2021 5:19 am

Wow, lightning storm! Thanks for sharing the blueprint. Which parameter in the blueprint controls the lightning if you don't mind me asking? Or is that also something which you enabled via the mods to the config files?

That's some very interesting work you're doing there, thanks much for documenting it here. !*salute*!

I completely agree that driving in and out of the 3D clouds is quite cool, and also the looks of the smaller clouds or cloudbanks hanging around mountain tops on routes like Stevens or Marias Pass. None of that is possible with the original (2D) weather model.

Cheers!
Michael
User avatar
GreatNortherner
 
Posts: 1586
Joined: Sun Feb 15, 2009 11:19 am
Location: Czech Republic

Re: Better 3D Weather

Unread postby ENR3005 » Wed Feb 17, 2021 10:08 pm

Weather creation is specific to cloud type. In the case of the thunderstorm (CumulonimbusCappilatus) you would need to note the following below on this line beginning with an "e" as shown. If you use my blueprint, be sure to change the latitude and longitude to whatever area you want it to appear in your route such as a specifc town you know the location of, otherwise it will never appear. You can also mix and stack the storm with other cloud layers to make it look larger. I am working on a list of the clouds which you can use. I am also looking at the other shapes in the demo software to see if they will work as well if configured similarly to what is provided. There may be something else that could be added. A forum member by the name of AlpenFreight had made a really useful Metar decoder (decodes real world weather) for the 2D weather system which generates a custom weather blueprint. This was an extremely neat and smart idea which I tested extensively when he first offered it and I recently re-downloaded. I believe this could be further customized and altered to do 3D weather with a set of parameters similar to the 2D weather. Another project for me to try another day as the Metar coding appears to have changed somewhat since he released his spreadsheet. If I could figure out the new coding, it could allow the incorporation of real world weather into the sim.

On another note, looking at the demo software I wish DTG had integrated the Triton water software these guys offer as well into the sim. To have some real waves affected by the weather would have been a neat effect. Ocean water is rarely calm, even on a nice day. One can only dream.


<CloudType d:type="cDeltaString">eCumulonimbusCappilatus</CloudType>
ENR3005
 
Posts: 219
Joined: Fri Mar 19, 2010 11:50 pm

Re: Better 3D Weather

Unread postby GreatNortherner » Thu Feb 18, 2021 2:55 pm

Hi again,

Many thanks for the explanations and additional details! That's very interesting that the lightning is automatically created by using the right cloud system.

I guess that a lot of fun can be had with this and that there's great potential for cool new and dramatic effects. I wasn't aware that a real world weather tool existed, that looks like a very clever invention. I very much enjoy the real world weather feature in OMSI and it must be at least as neat in a train sim.

Cheers,
Michael
User avatar
GreatNortherner
 
Posts: 1586
Joined: Sun Feb 15, 2009 11:19 am
Location: Czech Republic

Re: Better 3D Weather

Unread postby savv_nz » Thu Feb 18, 2021 10:48 pm

This is certainly interesting, I wonder if it would be possible to fix 3d weather in Southern Hemisphere routes.... where the sun renders in the south of the sky not the north as it should.
Cheers,

Stefan van Vliet

TSNZ Webmaster http://www.tsnz.co.nz
NZTS Workshops Co-Founder
TSNZ Discord https://discord.gg/RD6MsgM
savv_nz
 
Posts: 64
Joined: Sun Feb 22, 2009 7:52 am

Re: Better 3D Weather

Unread postby ENR3005 » Fri Feb 19, 2021 12:06 am

savv_nz wrote:This is certainly interesting, I wonder if it would be possible to fix 3d weather in Southern Hemisphere routes.... where the sun renders in the south of the sky not the north as it should.


This should be fixable with the Time Of Day blueprints as the 3D weather still references these files but loads different weather along with a moon and sun from the Silverlining folder. To adjust where it rises you will need to find this section. The line noted with AzimuthAngle is where you should be able to correct this. Use the following site to assist with calculating the correct angle https://www.suncalc.org/#/40.1789,-3.51 ... /21:05/1/3 and is based on location you select within the world.

<InfoSun>
<sSkyBodyInfo>
<RiseTime>
<sTimeOfDay>
<_iHour d:type="sInt32">7</_iHour>
<_iMinute d:type="sInt32">15</_iMinute>
<_iSeconds d:type="sInt32">0</_iSeconds>
</sTimeOfDay>
</RiseTime>
<SetTime>
<sTimeOfDay>
<_iHour d:type="sInt32">18</_iHour>
<_iMinute d:type="sInt32">20</_iMinute>
<_iSeconds d:type="sInt32">0</_iSeconds>
</sTimeOfDay>
</SetTime>
<AzimuthAngle d:type="sFloat32" d:alt_encoding="00000020DBF9EEBF" d:precision="string">-0.968</AzimuthAngle>
</sSkyBodyInfo>
</InfoSun>
ENR3005
 
Posts: 219
Joined: Fri Mar 19, 2010 11:50 pm

Re: Better 3D Weather

Unread postby savv_nz » Fri Feb 19, 2021 6:14 am

ENR3005 wrote:This should be fixable with the Time Of Day blueprints


Unfortunately, it doesn't seem to be. We have custom TOD blueprints with our Midland Line route, and 2d weather has the sun in the correct location because of them. Flipping to 3d however and the sun swaps to the southern sky not the northern, so it seems its something in the 3D weather set-up, somewhere...
Cheers,

Stefan van Vliet

TSNZ Webmaster http://www.tsnz.co.nz
NZTS Workshops Co-Founder
TSNZ Discord https://discord.gg/RD6MsgM
savv_nz
 
Posts: 64
Joined: Sun Feb 22, 2009 7:52 am

Re: Better 3D Weather

Unread postby GreatNortherner » Fri Feb 19, 2021 9:36 am

savv_nz wrote:
ENR3005 wrote:This should be fixable with the Time Of Day blueprints

Unfortunately, it doesn't seem to be.

That bug also exists on northern hemisphere routes, only that there the sun shines from the north with SilverLining weather, at least occasionally it does so. Our tests also showed that the bug was tied to 3D weather only. I found it to be surprisingly distracting and noticable in gameplay when the sunlight came from the wrong direction.
User avatar
GreatNortherner
 
Posts: 1586
Joined: Sun Feb 15, 2009 11:19 am
Location: Czech Republic

Re: Better 3D Weather

Unread postby buzz456 » Fri Feb 19, 2021 12:54 pm

Sometimes ignorance is bliss. At least in my case. !*roll-laugh*!
Buzz
39 and holding.
"Some people find fault like there's a reward for it."- Zig Ziglar
"If you can dream it you can do it."- Walt Disney
Image
User avatar
buzz456
Site Admin
 
Posts: 20927
Joined: Sun Mar 21, 2010 8:30 am
Location: SW Florida

Next

Return to Route Design

Who is online

Users browsing this forum: No registered users and 1 guest