Elvas Tower: Hacked the Trackside Camera - Elvas Tower

Jump to content

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

Hacked the Trackside Camera Rate Topic: -----

#1 User is online   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,577
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 31 March 2013 - 02:02 PM

One of my pet peaves with OR and MSTS has been the trackside camera... In OR, whenever the track is more than 1m offset from the terrain, the trackside view switches to the bridge view, which is right over the center of the track.

I don't know about you, but if I'm on a bridge, I still stand off to the side a bit.

What was also getting distracting... I've been installing berms on my routes, and it's not unusual for the track to sit about 3-5 feet up from ground level. 90% of the camera views in the Trackside mode were bridge views...


Since re-installing Visual Studio a couple weeks back, I've played around a little with the code, and it is quite easy to follow in places...

So.. today's hack of the day... eliminating the top-down bridge view.

There are two opportunities for doing this -- changing the BridgeCutoffAltitude parameter (currently = 1) to something a little more forgiving (5 worked for me)

That worked pretty well, and gave me a consistent ground level view looking up at the train.

The second opportunity is modifying the "else" statement in (newLocationElevation > newLocation.Location.Y - BridgeCutoffAltitude):

                {
                    cameraLocation = newLocation;
                    cameraLocation.Location.Y = newLocationElevation + CameraBridgeAltitude + CameraAltitudeOffset;
                }


That resulted in applying the CameraBridgeAltitude Y value but also using a random XZ value.


https://lh4.googleusercontent.com/-z7W1uSVCaig/UVivmmz5krI/AAAAAAAASaM/nwnWA87ojgY/s720/capture__111995.jpg
https://lh4.googleusercontent.com/-kczu-VGFERo/UVivohr93fI/AAAAAAAASac/S74dGBuyySE/s720/capture__111997.jpg

Pretty happy with the outcome, and happy to share the complete code block with the OR team if anyone is interested...

#2 User is offline   lineman 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 516
  • Joined: 19-April 08
  • Gender:Male
  • Location:Arizona
  • Simulator:Open Rails Train Simulator
  • Country:

Posted 31 March 2013 - 03:33 PM

Wow, that is a greatg job. That limitation always bugged me too. Thanks for this hack! Hope we get to see it in the OR experimental releases soon.

#3 User is offline   thegrindre 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 8,349
  • Joined: 10-September 08
  • Gender:Male
  • Location:Now in central Arkansas
  • Simulator:MSTS & Trainz '04 & Open Rails
  • Country:

Posted 31 March 2013 - 03:53 PM

Boy, I agree. I hate that top down view as well. :thumbup3:

:drool3:

#4 User is offline   pnrailway 

  • Superintendant
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,238
  • Joined: 23-December 04
  • Gender:Male
  • Location:Sarasota, FL
  • Simulator:ORTS
  • Country:

Posted 31 March 2013 - 04:26 PM

Eric,

I agree with the others as the restraints of the current #4 camera have long been a thorn in my side. Hopefully your hack plus some others that allow for the positioning of the camers will sooner or later be incorporated into ORTS. :thumbup3:

#5 User is offline   captain_bazza 

  • Chairman, Board of Directors
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 13,927
  • Joined: 21-February 06
  • Gender:Male
  • Location:Way, way, way, South
  • Simulator:MSTS & OR
  • Country:

Posted 31 March 2013 - 05:44 PM

A nice hack that I hope will find its way into the official code.

Cheers Bazza

#6 User is offline   Csantucci 

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

Posted 31 March 2013 - 11:24 PM

I too like this hack, as well as the remark about pnrailway about allowing player-driven positioning of trackside camera (available in MSTS!).

#7 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,346
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 11 January 2014 - 05:37 PM

An old thread... but hey, it's going to be relevant:

I hate, hate, hate, the bridge view. :thumbup3: Offhand I cannot think of any situation where it is relevant (I admit, I might not be thinking about it all that hard).

Where it really drives me nuts is the #4 camera. I HATE getting hte bridge view from the #4 camera... so much so the opinion is at the heart of my original thoughts on camera sets. I'd love to have a railfan camera set that operates just like the #4 camera but instead of the software choosing where to position The One camera let the player choose from up to 8 positions. For me, none of those would be the bridge camera.

<huff> <huff> :D <snort>

Whew. I feel a bit better now.
:)

#8 User is online   SVRy_Steve 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,995
  • Joined: 07-January 04
  • Gender:Male
  • Location:Chiloquin, OR
  • Simulator:OR
  • Country:

Posted 11 January 2014 - 06:14 PM

Bridge view!

Back in the late 1980's when UP 3985 came through Boise and stopped in Baker City Oregon, we chased from around Huntington on the Snake river. Just outside of Durkee, Dad and I set up with cameras and camcorders and my 13 year old son climbed up on a signal tower and on out the BRIDGE, right above the tracks. Yes, you could get away with this back then, sometimes.

Well, when 3985 came under there, on a grade, working hard at 45 or 50 mph, he got a bit of a shock. I swear, when he climbed down, his eyes were the size of saucers!

So, although I (and Levi) hate the bridge view, it does happen on occasion.

Steve

#9 User is offline   thegrindre 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 8,349
  • Joined: 10-September 08
  • Gender:Male
  • Location:Now in central Arkansas
  • Simulator:MSTS & Trainz '04 & Open Rails
  • Country:

Posted 11 January 2014 - 06:29 PM

I hate that view, too!!! :ranting: I always hit another view then hit the 4 key again to get rid of it. :aggressive:

:oldstry:

#10 User is offline   PA1930 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 782
  • Joined: 16-December 12
  • Gender:Male
  • Simulator:-
  • Country:

Posted 11 January 2014 - 07:32 PM

I agree with the motion - I'd love to see this applied on the OR code. :aggressive: Great hack!

  • 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