Elvas Tower: Enable inclined gauges in 2D cabs - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Enable inclined gauges in 2D cabs Rate Topic: -----

#1 User is offline   Csantucci 

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

Posted 28 October 2020 - 03:15 AM

Side parts of cabs are often seen inclined. A 2D gauge therefore wouldn't move correctly up and down (or left and right) there.
A rotation parameter to be added within the Gauge () subblock in the .cvf file can solve this.
As I got now the second request for this, I've implemented that and will create a PR for the official OR and will insert this in OR NewYear MG.
The line to be added has the same syntax as for digital controls, that is
ORTSAngle (angle)

where angle is the angle in degrees.
I have made a test with an electric locomotive, where I duplicated on the right side four pointer gauges that were already present on the front pane.
Here a picture with the running loco. As can be seen, the position of the four pointers on the right pane replicates the one of the ones on the front pane.
Attached Image: RotatedGauges.jpg

Trello box: https://trello.com/c...uges-in-2d-cabs

P.S. Revised patch for OR NewYear MG
Attached File  InclinedGauges.diff.txt (7.89K)
Number of downloads: 453

It should now work for all gauge configurations I hope, although there are so many of them, that it's quite likely that there is an untested one.

#2 User is offline   Eldorado.Railroad 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 982
  • Joined: 31-May 10
  • Gender:Male
  • Country:

Posted 29 November 2020 - 08:38 AM

Can some kind person clarify what this control actually does? Specifically what plane (XYZ) is being altered?

Maybe a clear example of before/after would be helpful. It would be nice if this worked for analog gauges (with rotating needles). Perhaps in a similar fashion as lights are defined in the .eng file. This allows for full control on EVERY axis (XYZ). For those who create 2D Cabs, we all know that console views that are not perfectly flat, in all planes (XYZ), leads to some unwanted compromises when it comes to animating those analog gauges.

Thanks,
Steve

#3 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,929
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 29 November 2020 - 09:01 AM

And what in case of rotation around 2 or 3 axles would be needed?
Can Angle() accept 3 numbers?

#4 User is offline   Csantucci 

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

Posted 29 November 2020 - 01:27 PM

Inclination is possible only around axis z (direction of route), and it will remain so as far as I am concerned.

#5 User is offline   hugoakio 

  • Hostler
  • PipPip
  • Group: Status: Fired
  • Posts: 51
  • Joined: 28-February 19
  • Gender:Male
  • Simulator:Open rails
  • Country:

Posted 14 December 2020 - 08:31 AM

 Csantucci, on 28 October 2020 - 03:15 AM, said:

Side parts of cabs are often seen inclined. A 2D gauge therefore wouldn't move correctly up and down (or left and right) there.
A rotation parameter to be added within the Gauge () subblock in the .cvf file can solve this.
As I got now the second request for this, I've implemented that and will create a PR for the official OR and will insert this in OR NewYear MG.
The line to be added has the same syntax as for digital controls, that is
ORTSAngle (angle)

where angle is the angle in degrees.
I have made a test with an electric locomotive, where I duplicated on the right side four pointer gauges that were already present on the front pane.
Here a picture with the running loco. As can be seen, the position of the four pointers on the right pane replicates the one of the ones on the front pane.
RotatedGauges.jpg

Trello box: https://trello.com/c...uges-in-2d-cabs

P.S. Revised patch for OR NewYear MG
InclinedGauges.diff.txt

It should now work for all gauge configurations I hope, although there are so many of them, that it's quite likely that there is an untested one.

P.P.S. Creation of a PR for the master release either leads to build errors with the master release, or it leads to build errors with the Unstable release, because of the different Draw() methods. So, until the MG branch won't be merged in the master branch, this feature will be inserted only in OR NewYear MG.


Nice add Csantucci. Please, could you add the rotation parameter to MultiStateDisplay too?

#6 User is offline   Csantucci 

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

Posted 15 December 2020 - 01:15 AM

With MultiStateDisplay you can generate already inclined .ace files, so there is a solution without adding a specific feature.

#7 User is offline   Csantucci 

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

Posted 07 March 2021 - 02:14 AM

A PR has now been created for the official OR version, and the feature should be available in the Unstable release within about 30 minutes.

Page 1 of 1
  • 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