Elvas Tower: Smooth signal lamp transitions - Elvas Tower

Jump to content

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

Smooth signal lamp transitions Patch Rate Topic: -----

#1 User is offline   YoRyan 

  • Conductor
  • Group: Status: Active Member
  • Posts: 391
  • Joined: 19-February 20
  • Gender:Male
  • Location:California, United States
  • Simulator:Open Rails/unstable
  • Country:

Posted 26 April 2020 - 09:35 AM

Another small feature I've been working on: Smooth on/off transitions for signal lamps. This works automatically for all lights on all kinds of signals. Below, I've attached animations showing before and after the patch. (Open the preview window to get them to play.)

If all looks good, I will submit a Trello request and GitHub PR.

Attached thumbnail(s)

  • Attached Image: sig_abrupt.gif
  • Attached Image: sig_smooth.gif


#2 User is online   R H Steele 

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

Posted 26 April 2020 - 10:15 AM

View PostYoRyan, on 26 April 2020 - 09:35 AM, said:

Another small feature I've been working on: Smooth on/off transitions for signal lamps. This works automatically for all lights on all kinds of signals. Below, I've attached animations showing before and after the patch. (Open the preview window to get them to play.)

If all looks good, I will submit a Trello request and GitHub PR.


Elegant, nice work.

#3 User is offline   longiron 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 3,179
  • Joined: 25-July 08
  • Gender:Male
  • Location:Manasquan, NJ
  • Simulator:Open Rails, MSTS editors
  • Country:

Posted 26 April 2020 - 10:38 AM

Very nice addition.

#4 User is offline   ebnertra000 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,234
  • Joined: 27-February 17
  • Gender:Male
  • Location:East-Central Minnesota
  • Simulator:OR/TSRE
  • Country:

Posted 26 April 2020 - 10:54 AM

I've been thinking about this a little bit too. (Big surprise, right?) Is it adjustable? LED lights are increasingly common, and have no transition phase that incandescent lights have

#5 User is online   R H Steele 

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

Posted 26 April 2020 - 10:56 AM

View Postebnertra000, on 26 April 2020 - 10:54 AM, said:

I've been thinking about this a little bit too. (Big surprise, right?) Is it adjustable? LED lights are increasingly common, and have no transition phase that incandescent lights have


Good point. Should be considered. Smooth Transition for incandescents though.

#6 User is offline   YoRyan 

  • Conductor
  • Group: Status: Active Member
  • Posts: 391
  • Joined: 19-February 20
  • Gender:Male
  • Location:California, United States
  • Simulator:Open Rails/unstable
  • Country:

Posted 26 April 2020 - 11:21 AM

As of now it is not adjustable and hard-coded to 1/2-second transition times. Good point about LED lights.

How about an additional property in the sigcfg.dat file, like this?

LightsTab ( ...
	LightsTabEntry (
		"Red Light"
		colour ( 255 255 16 16 )
		OnOffTime ( 0.5 ) // or 0, 1, 1.5, etc.
	)
)

To be honest, it's such a nice effect that I'd like all signals to transition by default. ^_^

#7 User is online   R H Steele 

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

Posted 26 April 2020 - 11:40 AM

View PostYoRyan, on 26 April 2020 - 11:21 AM, said:

As of now it is not adjustable and hard-coded to 1/2-second transition times. Good point about LED lights.

How about an additional property in the sigcfg.dat file, like this?

LightsTab ( ...
	LightsTabEntry (
		"Red Light"
		colour ( 255 255 16 16 )
		OnOffTime ( 0.5 ) // or 0, 1, 1.5, etc.
	)
)

To be honest, it's such a nice effect that I'd like all signals to transition by default. ^_^


This is WAY out of my experience, but aren't all the new OR parameters that modify or are added to existing MSTS files supposed to start with ORTS...or does that not apply to sigcfg.dat files...just asking?

#8 User is offline   YoRyan 

  • Conductor
  • Group: Status: Active Member
  • Posts: 391
  • Joined: 19-February 20
  • Gender:Male
  • Location:California, United States
  • Simulator:Open Rails/unstable
  • Country:

Posted 26 April 2020 - 11:45 AM

If they are, I had no idea. Still the new guy here. :)

In summary - new sigcfg.dat property that defaults to 0.5 seconds.

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 26 April 2020 - 12:03 PM

Hi Ryan,
yes, all ORTS specific parameters are required to start with ORTS... you couldn't know that, but your learning curve is steep ;)
I also thought at leds, and so I agree in having a parameter to define transition time.

#10 User is offline   YoRyan 

  • Conductor
  • Group: Status: Active Member
  • Posts: 391
  • Joined: 19-February 20
  • Gender:Male
  • Location:California, United States
  • Simulator:Open Rails/unstable
  • Country:

Posted 26 April 2020 - 06:10 PM

Okay, I propose that the new property be called "ORTSOnOffTime" and that it reside in the SignalType block, just like Kuju's SigFlashDuration:

SignalTypes ( ...
	SignalType ( "BNSF3Light"
		SignalFnType ( NORMAL )
		SignalLightTex ( "BNSF ltex" )
		SigFlashDuration ( 0.5 0.5 )
		ORTSOnOffTime ( 1.0 ) // in seconds
		...
	)
	...
)

Once again, defaulting to 0.5 seconds if not explicitly specified.

  • 3 Pages +
  • 1
  • 2
  • 3
  • 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