Tutorial: Removing Shadow-Casting from Headlights

Discussion about computers: Hardware, Problems, etc.

Tutorial: Removing Shadow-Casting from Headlights

Unread postby StrategyFirst » Thu Aug 06, 2015 2:14 am

I'm pretty sure this is the most accurate place to post this. If I am wrong, please move it to the right section. :D

So, I'm pretty sure most of you know how to do this already. But in case you don't, it's a really useful trick for keeping up the performance. It's a standard fact that shaders pack a punch to performance. This was quite obvious once Train Simulator 2012 came out. Of course, there have been minor tweaks to the game so that there's not such a huge decrease in performance. Unfortunately, there are still a few trains who's headlights hog your system. Examples of such are the F7, GP38-2, and the ES44 (though not as much). The cab lights especially eat it all up. Thankfully, there is a REALLY simple solution to fixing this.

Step 1: Locate the "Lights" Folder
This is really easy. Just find the location of the locomotive files. For example, I'm going to be editing the GP38-2 that comes with Stevens Pass.

Its location is "C:\Program Files (x86)\Steam\steamapps\common\RailWorks\Assets\GNTX\StevensPass\RailVehicles\Diesel\GP38-2\Ex-BN" for me.

There should be a subdirectory called "Lights". If it's just a standalone train, you might find the files in the main folder. For example, the CRH380A's light files are in the main directory. Otherwise that folder will usually be taken up by scenery lights.
"C:\Program Files (x86)\Steam\steamapps\common\RailWorks\Assets\SimtechVision\CRH380APack\Lights"
Can you guess what files are in there? !**duh*!!

Step 2: Disabling the Shadows
Here's where the magic begins. Convert the file such as "headlights.bin" into a .XML file with Serz, and scroll towards the bottom.

Image

You can see that I highlighted the Boolean that controls whether the shadows are enabled or disabled. Right now the "1" represents "enabled", so "0" would represent "disabled". Simply change that to 0.

Convert it back to .BIN with Serz and open it up in Railworks! Now you should only get a tiny, if any, performance hit.

Before: (The number represents the FPS.)
Image
Image

After:
Image
Image

(I couldn't supply pictures, but with shadowing disabled, the FPS is the same with or without the lights on.)

So there you have it! If you ever have a light that's hogging your system, just disable the shadowing. The performance upgrade all depends on the locomotive. :D
Long-time train enthusiast and computer hacker/programmer. I love 1st-generation diesels, especially Santa Fe and their Chief set.
"For every glossy GUI button, ten commands are left out."
Intel i5-3570k Quad-Core @4.1GHz x64-bit 16GB RAM
YouTube channel: https://goo.gl/OUbbsj
Image
User avatar
StrategyFirst
 
Posts: 220
Joined: Sat Aug 01, 2015 3:18 am

Re: Tutorial: Removing Shadow-Casting from Headlights

Unread postby Chacal » Thu Aug 06, 2015 10:57 pm

Excellent tutorial, thanks!
I'll move it to the learning center when I get home.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6500
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada


Return to Geek Speak

Who is online

Users browsing this forum: No registered users and 1 guest