TSW3 ToD4 Lighting Overhaul

  • by JetWash
  • 12 upvotes
  • Downloaded 4,891 times

Note | This version is for TSW3 only

Previews Here

https://youtu.be/TFZ8PBMVTEQ

https://youtu.be/IlVEtHWyDmg

Having struggled with TSW3's lighting for a long time I decided to try and come at it from a completely different angle. The aim was to create a more realistic, hybrid look that was based more around Armstrong Powerhouse lighting in Train Sim Classic but utilising the extra benefits that TOD4 and UE4 bring and I'd like to think I've achieved that, improving the game as a result.

Designed for all PC's these settings will;

  • Improve draw distance
  • Unlock Journey Mode so you can play it in the order YOU want to
  • Help with stuttering
  • Speed up the way eye-adaption works so entering and exiting tunnels is much more realistic
  • Most importantly overhaul the lighting to be more realistic, less washed out, less over-exposed and more detailed

What does that actually mean?

  • First and foremost I have decreased the brightness of the sun to half it's default value. This was the starting point, and key to reducing how over-blown the lighting in the game was
  • Added detail to the clouds; more vertical extent, reduced the low quality (and exceptionally low resolution) second layer of 2D high cloud and added light pollution to them at night. Cloud shadows are greatly improved
  • Decreased the brightness of the stars to realistic levels and added a touch of light pollution to the sky itself at night
  • The higher end settings (Medium through Beyond Ultra) will also vastly improve shadows and shadow draw distance, with the changes becoming more noticeable the higher you go. When teamed with the UK Vegetation & Grass EP (linked below) grass pop-in is eliminated entirely

God Mode | PLEASE READ

Although I can't recommend this enough there will be people who don't want, or can't use it. If you have God Mode installed (and you should!) then please note it sets the SkyLight Intensity value to 1.0 each time you start a drive. I suggest you set the intensity to suit the conditions you're driving in using the inbuilt slider. Note that I designed these settings specifically so that the only thing you would need to do yourself would be adjust that slider to suit. The ideal setting varies by route and weather conditions but it is this that adds the finishing touches to the reduction in TSW3's tendency to be massively over-exposed. By not using the God Mode mod you will always have the value set to 1, which whilst suitable for some conditions is totally unsuitable for others.

Nvidia Image Scaling | Read This too!

It is frustrating that TSW3 still doesn't support DLSS. If you own an Nvidia card you can, however, use Nvidia Image Scaling (NIS) with the game. NIS was the pre-cursor to DLSS and in a nutshell allows you to select a lower resolution as your game resolution (with the associated performance benefit) which NIS then upscales to your native screen resolution with virtually zero loss in quality. I use it in 4K and it has many benefits, not least keeping the noise and heat chucked out by my GPU to much reduced levels. It allows me to push the game harder and enjoy a much better experience. It's use is optional, but I would give it due consideration if you're using anything less than a 40 series card (I have a 3090 for comparison)! More information here on how to use it;

https://www.gamingpcbuilder.com/nvidia-image-scaling-tested/#foogallery-16565/i:16567

Game Settings

The lighting changes will work irrespective of your game settings and I have tested this through the range. Even using the 'Low' option with Medium pre-set in game looks vastly better than default. I use The Ultra settings with Ultra set in-game. Recommendation time - I strongly suggest that whatever settings you use, you never set 'Sky Quality' to anything higher than than ‘Very High’. Ultra has a significant performance hit and doesn't look good enough to justify it. I have altered the way clouds look through these settings so would suggest you use 'Very High' or below.

Other Important Things to Note

  • You must remove Bescot's eye-adaption mod if you have it installed
  • Any external programs (such as ReShade) that alter the lighting in the game should not be used with these changes. However, I still recommend the use of ReShade with the TAA shader which vastly reduces the shimmering when stationary that TSW is known for. You must use version 5.8 as the latest update (5.9) crashes the game for some reason
  • This works fine with legacy (TSW2) content although given it tends to be darker anyway I'd suggest you start with a skylight intensity of 1.0 and then fine-tune to your liking

Further information & discussion can be found here;

https://forums.dovetailgames.com/threads/enhancement-tsw3-tod4-lighting-overhaul.71901/

Requirements

Not required but recommended

Not required but HIGHLY recommended

Not required but HIGHLY recommended. Requires Peak Forest

Designed to complement these changes

Installation Instructions

Installation and use is very very simple and please don't worry, even if you get yourself in a mess and end up deleteing the engine.ini file the game will just recreate a new one next time you start it.

To start navigate to;

C:\Users\USER NAME\Documents\My Games\TrainSimWorld3\Saved\Config\WindowsNoEditor

or wherever your game is located if you have installed it in a custom directory.

  • In there you will see an ini file called 'engine'. Double click on it and it will open in notepad.
  • Open your chosen settings and select everything in there and copy it.
  • Scroll down to the bottom of the text contained within the engine.ini file (which is simplay a list of your installed DLC) and, leaving a single blank line, paste your copied text
  • In the menu along the top of notepad click 'File' then 'Save' and that's it

To remove the settings you can either simply delete the flie itself (as I said, the game will simply create a new one) or delete your added text and save again.

Tags: lighting night-lighting realism

Files

1 Beyond Ultra v1.5.1.ini 2 KB · Added 9 Aug 2023 · Downloaded 457× 1.1 Beyond Ultra v1.5.1 (12GB VRAM or MORE).ini 2 KB · Added 9 Aug 2023 · Downloaded 380× 2 Ultra v1.5.ini 2 KB · Added 9 Aug 2023 · Downloaded 457× 2.1 Ultra v1.5 - (12GB VRAM or MORE).ini 2 KB · Added 9 Aug 2023 · Downloaded 303× 3 High v1.5.ini 2 KB · Added 9 Aug 2023 · Downloaded 576× 4 Medium v1.5.ini 2 KB · Added 9 Aug 2023 · Downloaded 325× 5 Low v1.5.ini 1 KB · Added 9 Aug 2023 · Downloaded 274× 6 Very Low v1.5.ini 1 KB · Added 9 Aug 2023 · Downloaded 223× Changelog v1.5.1.txt 2 KB · Added 9 Aug 2023 · Downloaded 263×

Previously uploaded files have been downloaded 1,633 times before being withdrawn.

Comments

Avatar of Quentin J.
Quentin J. 26 Jul 2023

Perfect .ini mod, tested on different routes and really enjoying it. Also good job on explaining everything in detail.

Avatar of Lenny
Lenny 26 Jul 2023

Which ini did you use?

Avatar of Quentin J.
Quentin J. 27 Jul 2023

I used the Ultra one, also I have ReShade on top just for some vibrance and sharpening.

Avatar of W2SJW
W2SJW 26 Jul 2023

Outstanding job! I have one quick question for a reccomendation - Ryzen 5800X/32GB DDR4-3600/RTX-3070 @ 1440p with NVCP locking FPS at 60. Should I be trying 'Mega-Ultra' or just keeping with 'Ultra'?

Avatar of JetWash
JetWash 27 Jul 2023

Only you can answer that! Give it a try and see how it goes. If it’s too much go back to Ultra. The difference is that the draw distance is slightly further out and the shadow resolution is bumped from roughly 4K to the equivalent of 6K. Increasing the shadow resolution is demanding which is why I made it a separate option.

Avatar of Lenny
Lenny 27 Jul 2023

What lines of code can I remove to boost my fps? I was running 70+ smooth on my pc with Laika's ini. I'm using the "Very-Low" preset.

Avatar of JetWash
JetWash 27 Jul 2023

If you're using that preset and it's not working then this probably isn't for you There is nothing really in that file that is demanding of performance, all the commands do is alter the lighting values. On paper it is less demanding than Laika's ini

Avatar of JetWash
JetWash 27 Jul 2023

I've just uploaded some revised versions and taken some more stuff out of the 'Very Low' preset. HTH.

Avatar of Morelocolayer
Morelocolayer 27 Jul 2023

Compatible with TOD 3.5 ?

Avatar of JetWash
JetWash 27 Jul 2023

Absolutely!

Avatar of Wind44
Wind44 28 Jul 2023

and the rest of the mods? high and very high?

Avatar of JetWash
JetWash 28 Jul 2023

Not sure what happened there, sorry. They should be back as they're approved.

Avatar of TheSouthernRex
TheSouthernRex 28 Jul 2023

Does London commuter work with this mod?

Avatar of JetWash
JetWash 28 Jul 2023

All routes work with them.

Avatar of TheSouthernRex
TheSouthernRex 30 Jul 2023

ok thanks!

Avatar of shanie
shanie 30 Jul 2023

Thank you so much for this!

Performance

With the Class 700 on London Commuter, the experience at first was way worse: 20fps, way more stutters.
However after a full 24 minute run, I closed the game and restarted it on the same run, and the experience was incredible - mostly 50-60fps with near-zero stuttering.
The only time FPS dips is when another train goes by - a few stutters and 30fps, but only for a second or two.
This becomes even more impressive when you consider that I was in a very busy intense station area with winter low sun lighting reflecting off everything.
A huge improvement over the default DX11 + no shader cache experience which was an inconsistent mess.
So just follow the instructions carefully, hold it out for the first run of each route and you will have a great experience!

(NOTE: The performance relevant settings can be mostly credited to geloxo and dbrunner#4864: they are almost exactly the same as here: https://forums.dovetailgames.com/threads/definitive-stutter-fix-via-engine-ini-settings.70559/)

Visuals

Nothing to complain about. It's not gone too far with adding saturation, and not gone too far turning down the exposure. So far I've only tested winter & summer at 12:30 and its looked so natural, no cartoony feels like before.

With the SkyLight tip, however, I should note that this also transfers the colour of the sky down, rather than just "light" as a novice might expect, so I left it on the default 1.0 for the scenarios mentioned above. Time will tell to see how much tinkering other weathers/times need.

Also, I can't seem to notice that horrible extremely short shadow distance on the rails anymore, as well as LODs (and sometimes entire objects) popping in just metres away. Much better now!

Tips & Questions

  1. Do you know where the shader cache files are actually stored? Even with voidTools sorted by date modified and checking the regular folders, I couldn't find any files. In OMSI we use DXVK and that saves a *.dxvk-cache file with shader cache. Obviously it would be wise to try and save these so we don't have to play through routes again if we re-install game/drivers etc.

  2. If you take an upscaled / hi res render screenshot with CTRL F12, the game will dip to 25fps for a few seconds after that. If it does not go back up, you can switch between the cameras (1,2,3) on your keyboard and look around in different directions, and it will go back up to normal performance.

  3. To improve it even further I would use some reasonable AO settings, here are mine. A good balance between actually visible AO inside and outside, while not making areas overly dark (especialy interiors). Really helps remove the flatness from the game:

[SystemSettings]
r.AmbientOcclusionLevels=3
r.AmbientOcclusion.Method=1
r.GTAO.FalloffEnd=150
r.GTAO.SpatialFilter=0
r.GTAO.NumAngles=2
r.GTAO.UseNormals=1
r.GTAO.ThicknessBlend=0

By the way, I am using the Ultra ini download from here, coupled with these settings: https://i.imgur.com/eO5sIR2.png, on an Asus Zephyrus G15 2021 GA503QM (R7 5800HS + RTX 3060M Max-Q + 40GB RAM + NVMe SSD). Do note that some stutters could be from my RAM upgrade causing single channel operation, and the fact that this is a laptop with lower wattage available for the components, so won't perform like its desktop counterparts.

Avatar of solicitr
solicitr 7 Aug 2023

Is there any way to reset the default skylight to something other than the rather murky 1.0, rather than having to change it in GM every run?

Avatar of JetWash
JetWash 7 Aug 2023

Yes. I was waiting for you to reply on the forum but this works. Either add a line into the ini as follows;

r.SkylightIntensityMultiplier=

with the number being between 0 and 1.

If you use the latest version of GodMode you can set a specific set of commands on a route-by-route basis. In that case all you need to do (I believe, I haven't tried it myself) is add the above line into the relevant box in GodMode

Avatar of Cadrisian
Cadrisian 8 Aug 2023

Big thank you for your work! Looks fantastic!

I’ve been playing around with the settings, and I found that adjusting the intensity of the sun to ~100,000-120,000 lux, like what it is in real life at sea level, and then underexposing by 1EV looks good, too.
With KitKats TOD4 Upgrade Mod I found that on older routes -1.5EV gives them the feeling of the old TOD lighting.

These would be the settings:
TimeOfDaySystem.AutoExposure.ExposureBias=-1.0 (or -1.5 for old routes)
TimeOfDaySystem.AutoExposure.MinBrightness=3.5
TimeofDaySystem.SunIntensity=100000

For a crisper image you could also add
r.ToneMapper.Sharpen=1
r.MaxAnisotropy=16

Avatar of JetWash
JetWash 8 Aug 2023

Fair enough. It’s personal preference, but the default sun intensity is 100,000. The whole point of my settings is to move away from that so as to make the game less over exposed.

Avatar of User
User 8 Aug 2023

All of the files disappeared

Avatar of JetWash
JetWash 8 Aug 2023

They'll be back shortly. The site doesn't seem to like multiple file changes so they have to be deleted completely then re-uploaded.

Avatar of Simon
Simon 11 Aug 2023

Hi JetWash I just want to say a huge thanks for all your time and effort on this MOD, I’ve been following your journey with this for the last few weeks and all I can say is you've transformed my game play experience. The stuttering has virtually stopped and that buggy sleeper shadow running 5metres in front has totally disappeared. Also, I never used GM prior to this MOD so thanks again for introducing me to this amazing tool (kudos to Foobian) I've just got one question in regards to solicitr's post when setting the r.SkylightIntensityMultiplier= ( I like 0.6) in GM does it matter if you choose Physically Based Lighting (TODv4+) or Non-Physically Based Lighting (<TODv4)
Apologies, I have zero technical knowledge on IT development, so you guys are Gods in my eyes for all the work you do!! Cheers

Avatar of JetWash
JetWash 13 Aug 2023

Hey there, glad you're enjoying the mod

I use the slider so haven't tried it myself, but I think you'd need to place this entry in the physically based lighting The time of day changes would go into the non-physically based. If you're unsure maybe ask Foobian on the GM page

HTH :-)

Avatar of Pixelade
Pixelade 16 Aug 2023

This looks amzing! Sadly for the first time using any of these settings, i get lots of stuttering when i usually don't get any at all. (locking up for 2-3 seconds at a time, every 10 or so seconds). Are there any lines of code i can remove that will help with this?

Avatar of JetWash
JetWash 16 Aug 2023

What’s your PC spec and which level of the mod are you using?

All I can suggest is use a lower version. It is also worth nothing that generally the first time you run a route there is more stuttering as the shaders compile. Once you driven something once it should then be smooth.

Avatar of IsambardKingdomBrunel

Sorry meant to say thanks when i first downloaded this exquisite mod. I ticked the like button and then buggered off, old age and poor memory.
As per the forum, many many thanks for improving the appearance of the game (TSW4).

Avatar of JetWash
JetWash 24 Sept 2023

Thanks! Glad you're enjoying it

Add a comment

If you wish to leave a comment, please log in .

About this mod

Created
26 Jul 2023
Updated
9 Aug 2023
Game
Train Sim World
Type of content
Other
Train Sim World compatibility
Train Sim World 3
Train Sim World Content
Amtrak's Acela, Arosalinie: Chur - Arosa, Bahnstrecke Bremen - Oldenburg, Bakerloo Line, Birmingham Cross-City Line, BNSF SD70ACe, BR Class 20 'Chopper', BR Class 31, BR Class 33, BR Class 52 'Western', BR Heavy Freight Pack, Cajon Pass, Caltrain MP15DC Diesel Switcher, Caltrain MP36PH-3C 'Baby Bullet', Canadian National Oakville Subdivision: Hamilton - Oakville, Cane Creek: Thompson - Potash, Cathcart Circle Line: Glasgow - Newton & Neilston, Clinchfield Railroad: Elkhorn - Dante, CSX C40-8W, DB BR 101, DB BR 155, DB BR 182, DB BR 187, DB BR 204, DB BR 363, DB BR 403 ICE 3 Railbow, DB G6 Diesel Shunter, Diesel Legends of the Great Western, Dispolok BR 182, East Coastway: Brighton - Eastbourne & Seaford, Glossop Line: Manchester - Hadfield & Glossop, Great Western Express, Harlem Line: Grand Central Terminal - North White Plains, Hauptstrecke Hamburg - Lübeck, Hauptstrecke München - Augsburg, Hauptstrecke Rhein-Ruhr: Duisburg - Bochum, Horseshoe Curve: Altoona - Johnstown & South Fork, Island Line 2022: BR Class 484 EMU Add-On, Isle Of Wight: Ryde - Shanklin, LGV Méditerranée: Marseille - Avignon, Linke Rheinstrecke: Mainz - Koblenz, LIRR M3 EMU, London Underground 1938 Stock EMU, Long Island Rail Road: New York - Hicksville, Main Spessart Bahn: Aschaffenburg - Gemünden, Midland Main Line: Leicester - Derby & Nottingham, New Journeys - CSX SD40 (TSW 3), New Journeys - S-Bahn Köln BR 423 (TSW 3), New Journeys - Silver 1972 Tube Stock (TSW 3), New Journeys Expansion (TSW 2 bundle), Norfolk Southern Heritage Livery Collection, Northeast Corridor: New York - Trenton, Northern Trans-Pennine: Manchester - Leeds, Peak Forest Railway: Ambergate - Chinley & Buxton, Peninsula Corridor: San Francisco - San Jose, Rail Head Treatment Train, Rail Operations Group BR Class 37/7, Rapid Transit, RhB Anniversary Collection, Rhein-Ruhr Osten: Wuppertal - Hagen, Ruhr-Sieg Nord: Hagen - Finnentrop, Rush Hour - Boston Sprinter - Northeast Corridor: Boston - Providence, Rush Hour - London Commuter - Brighton Main Line: London Victoria - Brighton, Rush Hour – Nahverkehr Dresden - Riesa, S-Bahn Zentralschweiz: Luzern - Sursee, Sand Patch Grade, Santa Fe F7, Schnellfahrstrecke Kassel - Würzburg, Schnellfahrstrecke Köln-Aachen, ScotRail Express: Edinburgh - Glasgow, Sherman Hill: Cheyenne - Laramie, Southeastern BR Class 465 EMU, Southeastern Highspeed, Southern BR Class 313 EMU, Spirit of Steam: Liverpool Lime Street - Crewe, Tees Valley Line: Darlington – Saltburn-by-the-Sea, Thameslink BR Class 700/0 EMU, Tharandter Rampe: Dresden - Chemnitz, Union Pacific Heritage Livery Collection, West Cornwall Local: Penzance - St Austell & St Ives, West Cornwall Steam Railtour, West Somerset Railway