Better Lighting for Locomotives and Wagons
by Yuri Sos
(utilising research and development by Robert Fontaine)

Overview

One of the most obvious parts of a locomotive are the lights. While the lighting as designed by Kuju is satisfactory for the simplest lighting schemes, you'll run into problems as soon as you try to enhance your model with multiple lights or lights side-by-side.

 

The Default Light - And Its Limitations

The light is actually a 2-polygon square, the appearance of which is controlled by a combination of parameters in the Lights ( Light (State())) section:

  • Radius: the size of the light
  • Colour (in transparency | red | green | blue);

and a texture file called liteglow.ace located in the MSTS/Global/Textures folder: this texture file looks like this:

So what's wrong with this setup?

Mostly nothing, if you're only interested in simple and single lights.

It's when you try to do more complicated things that issues arise. The amount of "transparency" (the black section in the image above that's supposed to be transparent) around the visible light can interfere with other lights and become visible (see image below). This is especially noticeable when you try to place two lights side-by-side (there are other techniques you can use to stop this happening with vertically-arranged lights).

Even if you have simple lighting, problems occur when you try to size the light to cover the light shown on the model - you end up with an unacceptable glow extending beyond the limits of the light (even on marker lights), thus......

.......or even poking through parts of the model like this......

There is a solution.

 

So what can be done?

Many people have been experimenting with different settings and so on for some time.

Robert Fontaine went straight to the source of the lights and modified the .ACE file that controls the physical appearance of the light. His version of the liteglow.ace looks like this:

You'll need to reduce the radius in ENG files to accommodate the new lite_glow.ace (typically 50% of the original figures), but the results are certainly worth it.

Compare these next three images with those above: the notes beneath each image may guide you:

Note the light fills the texture light fitting below it with no glow spilling over the sides

The lights now fill the texture light fitting beneath them - the overlap has disappeared leaving a small line that is almost unnoticeable (and could be further reduced by reducing the radius even further).

(This is the default SD40-2) Note the lights now fill the textured lighting fitting with no bits poking through the light surround: a spectacular improvement over the default and one that could not have been accomplished without the new liteglow.ace.

 

Altering Default And Previously Installed Locomotives?

You will need to edit the radius in the lighting section in .ENG files you wish to use in the sim. Make a Backup of the ENG file you're about to open, then open the file of choice in Wordpad or a Unicode-aware editor such as ConTEXT, my favourite.

Scroll down to the Lights section and find the light section you wish to modify: you will need to modify the Radius parameter (in the example image below, I've marked the line with asterisks). Typically, you'll need to reduce the radius to 40-50% of the original.

Save and quit and try out your altered lights in MSTS.

Let's look at the default GP38 and observe the effects of changes to the ENG file when we use the new liteglow.ace: comments are under each image. The headlights are set to "bright" for the screenshots.

Totally default: liteglow.ace, radius of 0.5. Notice the glow extending beyond the lights and the ditch light disappears into the front footwalk.

The new liteglow.ace has been installed but the radii of the lights are unaltered in the ENG file: the lights are now much too big.

This time the radius of the headlights have been reduced from the default 0.5 to 0.25 and the ditchlights even more from 0.5 to 0.2. You'll now notice that the lights "fit" the textured light fittings far better, the ditchlight glow no longer dips into the footwalk and the overspill of glow has disappeared. This also shows that the light positions weren't really correct in the default locomotive.

Finally, I've moved the lights closer together, changing the position of the top light
from Position ( -0.00365 4.3885 6.90297 )
to Position ( 0.00 4.39 6.90 ) and the lower light is now
Position ( 0.00 4.185 6.85 ) instead of Position ( 0.00344 4.12601 6.84792 ).

This is now looking much better; I'd also change the colour from "ffffffff" to something like "ffF7EDC5", but that's beyond the scope of this article.

 

Summary

How can you identify locomotives that are
set up for the modified liteglow.ace?

Robert has created an image that you will usually see on the loco description, in the ZIP file or on the installer that contains the locomotive. It looks like this:

Where do you get the new liteglow.ace?

Right here!

Click on this link to download LightFx.zip, a small (31.7k) .ZIP file that contains the new liteglow.ace as well as the original (named default_liteglow.ace). Unzip the file into your MSTS folder with "Use Folder Names" turned on.