Elvas Tower: Locomotive Light Sources? - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Locomotive Light Sources? Rate Topic: -----

#1 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 366
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 08 March 2015 - 02:54 PM

Hi everybody, I've been getting back into MSTS recently and looking at Open Rails as well. OR has come a long way since I last used it, but one issue that has been around a while is still bugging me. For most of the locomotives I have, the light source seems to be inside the locomotive, which lights up parts of the locomotive that really shouldn't be getting light, plus making some other odd effects.
Attached Image: Lights Off.jpg

Attached Image: Lights On.jpg

Attached Image: Inside.jpg

I was wondering if anybody knows a workaround to cause a sort of 'bias' to push the light source forward in all the locomotives without needing to edit every single .eng file or going too deep into any code. If anybody has any ideas, it'd great to know! ;)

#2 User is offline   Kazareh 

  • Conductor
  • Group: Status: Active Member
  • Posts: 471
  • Joined: 21-December 12
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 08 March 2015 - 02:56 PM

As far as I know, there is no workaround unfortunately. However I had something odd happen with the UA Turbo Train from Trainsim.com, and that was the lights were in the ground.... Due to the m on the position line as such: Position ( .25m 3.12m 13.3m )

Removing the 'm' fixed it. Might be something like that maybe?

#3 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 366
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 08 March 2015 - 05:22 PM

 Kazareh, on 08 March 2015 - 02:56 PM, said:

As far as I know, there is no workaround unfortunately. However I had something odd happen with the UA Turbo Train from Trainsim.com, and that was the lights were in the ground.... Due to the m on the position line as such: Position ( .25m 3.12m 13.3m )

Removing the 'm' fixed it. Might be something like that maybe?

I don't have the m in the position, but I wouldn't be surprised if the position defined is part of the problem. I'd just rather not go through every single file to tweak the lighting.

#4 User is offline   midneguy 

  • Foreman Of Engines
  • Group: Status: First Class
  • Posts: 931
  • Joined: 29-August 11
  • Gender:Male
  • Location:Nebraska
  • Simulator:MSTS
  • Country:

Posted 08 March 2015 - 06:22 PM

It definitely looks like the "cone of light" headlight entry is back in the middle of the engine rather than up in the same position as the actual headlights. That's why the beam of light is casting light on the inside of the body, and the other things you're seeing either side. Since this isn't due to the sim, the only way to correct it will be to fix the .eng file so the light is positioned correctly. Unfortunately you'll have to do this on every engine you see this problem with. To know which light this is in the .eng file, it's the light that has "Type ( 1 )" in its entry, since this specifies the light that actually projects onto other objects. From there, just adjust the "Position ( X Y Z )" line as needed, with the X being the side to side position of the light source, Y being how high, and Z being how far forward or behind of the engine center.

#5 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 09 March 2015 - 06:29 AM

 pschlik, on 08 March 2015 - 02:54 PM, said:

Hi everybody, I've been getting back into MSTS recently and looking at Open Rails as well. OR has come a long way since I last used it, but one issue that has been around a while is still bugging me. For most of the locomotives I have, the light source seems to be inside the locomotive, which lights up parts of the locomotive that really shouldn't be getting light, plus making some other odd effects.
Lights Off.jpg

Lights On.jpg

Inside.jpg

I was wondering if anybody knows a workaround to cause a sort of 'bias' to push the light source forward in all the locomotives without needing to edit every single .eng file or going too deep into any code. If anybody has any ideas, it'd great to know! ;)


So, firstly, a lot of cone lights are poorly defined in MSTS engine files due to the limited way they were rendered in MSTS. The data may simply be quite wrong in reality.

This is particularly the case for the width/breadth of the cone; OR will provide light all the way to 180 degrees total. It also has an tail off outside the defined cone up to that 180 degree boundary due to the way the maths works, though typically the edge isn't visible.

But it may also be worth checking if the X/Y/Z position is right, since we could also have a bug in OR. :) You can do this by changing the Y value to 0 and the X to +10 and the light code should start from a few metres to the right side of the locomotive at ground level or just above. May need a small positive for the Y. That should allow you to check the Z value, which is how far forwards/backwards of the centre the light is. If it's not as far forward as the physical light location, OR could well be lighting it right - the data is wrong - but if it appears right near the front, ahead of the lit bits of the loco, we might have a bug.

You could also place a non-cone light at the same coordinates, I'm pretty sure they are placed correctly (though rotation isn't implemented).

#6 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 366
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 09 March 2015 - 02:59 PM

Alright, I'll have a whack at moving around the lights when I can get around to it and see if that can make anything look better.

#7 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,457
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 10 March 2015 - 10:54 PM

 James Ross, on 09 March 2015 - 06:29 AM, said:

But it may also be worth checking if the X/Y/Z position is right, since we could also have a bug in OR. :rofl2: You can do this by changing the Y value to 0 and the X to +10 and the light code should start from a few metres to the right side of the locomotive at ground level or just above. May need a small positive for the Y. That should allow you to check the Z value, which is how far forwards/backwards of the centre the light is. If it's not as far forward as the physical light location, OR could well be lighting it right - the data is wrong - but if it appears right near the front, ahead of the lit bits of the loco, we might have a bug.
You could also place a non-cone light at the same coordinates, I'm pretty sure they are placed correctly (though rotation isn't implemented).

Could it also be a very wide angle number in the type 1 light setting? I had a loco that appeared to have the edge of the light cone very much behind the engine, (it also had an angle number of 45). When I adjusted the angle to something more reasonable, in this instance 7.5, the appearance of the light was more realistic.

In the same case as above I also tried this out just to see what happend. I first adjusted to Z axis so the edge of the light cone was exactly in place at the front of the loco. Then I adjusted the angle from 45 to 7.5 - the results were very unrealistic.

In both case the radius adjustment stayed constant...the default setting that came with loco was 300 for bright and 100 for dim.

From the number of engines I'm seeing with this same problem, maybe there is something that can be coded into OR to help with the problem. Then the XYZ numbers in the engine file could be used to fine tune on a per engine basis.

Not having much experience with MSTS I don't know the reasoning for positioning behind the front of the engine to begin with. Another workaround??

#8 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,457
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 11 March 2015 - 10:10 AM

 pschlik, on 09 March 2015 - 02:59 PM, said:

Alright, I'll have a whack at moving around the lights when I can get around to it and see if that can make anything look better.


Phillip have you looked at this thread concerning OR and light adjustments?

http://www.elvastowe...150#entry166150

#9 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 366
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 11 March 2015 - 10:41 AM

 R H Steele, on 11 March 2015 - 10:10 AM, said:

Phillip have you looked at this thread concerning OR and light adjustments?

http://www.elvastowe...150#entry166150

I didn't see that one, I'll have a go at some of those modifiers as well. Some of the locomotives I have could use that.

#10 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,457
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 11 March 2015 - 03:27 PM

I steered you to the wrong thread ,,, although that thread also has some info.
This is the one I meant >>>>>> http://www.elvastowe...adlights-in-or/

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users