Elvas Tower: Operational turntable - 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.
  • 25 Pages +
  • « First
  • 21
  • 22
  • 23
  • 24
  • 25
  • You cannot start a new topic
  • You cannot reply to this topic

Operational turntable Rate Topic: ***** 1 Votes

#331 User is offline   alifatico 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 116
  • Joined: 25-April 19
  • Gender:Male
  • Simulator:open rails
  • Country:

Posted 29 January 2023 - 06:00 AM

View PostCsantucci, on 19 January 2023 - 08:39 AM, said:

I am adding a small feature to the turntable code, that is the ability to handle "partial" turntables, like the one in the attached picture, which can only rotate between 0 and 40 degrees.
Attachment PartialTurntable.jpg


Could you tell me which route it is on?

Thanks and best regards

Pedro

#332 User is offline   Csantucci 

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

Posted 29 January 2023 - 09:04 AM

Hi,
it's a route that has not yet been published, but should be within a few months.

#333 User is offline   Traindude 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 814
  • Joined: 17-November 13
  • Gender:Male
  • Location:Seattle, WA
  • Simulator:Open Rails
  • Country:

Posted 29 January 2023 - 02:25 PM

View Poststeved, on 27 January 2023 - 03:18 PM, said:

Here's the discussion I used to get mine working.
http://www.elvastowe...e/page__st__160

Randy


Okay--but when I add a new turntable to a pre-existing route, I can't get it to work.

Here's the turntables.dat in question:
2
Turntable(
WFile ( "w+001454+010325.w" )
UiD ( 418 )
XOffset ( 0 )
YOffset ( 1.35 )
ZOffset ( 0 )
TrackShapeIndex ( 37298 )
Animation ( "Deck" )
Diameter ( 18.6 )
)
Turntable(
WFile ( "w-001493+010308.w" )
UiD ( 174 )
XOffset ( 0 )
YOffset ( 1.175 )	
ZOffset ( 21 )
TrackShapeIndex ( 24864 )
Animation ( "TRACKPIECE" )
Diameter ( 42 )
)


...and the tsection.dat:
include ( "../../../Global/tsection.dat" )
_INFO ( Track section and shape addition for turntable BBS-NSWGR-60ft-TT-open2_animate.s   )

TrackSections ( 40002

_SKIP ( Track section for turntable BBS-NSWGR-60ft-TT-open2_animate.s )

TrackSection ( 24864
 SectionSize ( 1.5 42 )
)
TrackSection ( 37298
 SectionSize ( 1.5 18.6 )
)

TrackSection ( 40001
 SectionSize ( 1.5 18.6 )
)[/b]
)


TrackShapes ( 40002

_INFO(TrackShape for turntable BBS-NSWGR-60ft-TT-open2_animate.s)

TrackShape ( 24864
 FileName ( A1t42mTurntable.s )
NumPaths ( 3 )
 SectionIdx ( 1 0 1.175 0 0 24864 )
 SectionIdx ( 1 -21 1.175 21 90 24864 )
 SectionIdx ( 1 13.4895, 1.175, -4.9131 -40 24864 )
)
TrackShape ( 37298
 FileName ( BBS-NSWGR-60ft-TT-open2_animate.s )
NumPaths ( 3 )
 SectionIdx ( 1 0 1.35 -9.300 0 37298 )
 SectionIdx ( 1 -9.300 1.35 0 90 37298 )
 SectionIdx ( 1 6.576, 1.35, -6.576 -45 37298 )
)
TrackShape ( 40001
 FileName ( BBS-NSWGR-60ft-TT-open2_animate.s )
NumPaths ( 3 )
 SectionIdx ( 1 0 1.35 -9.300 0 37298 )
 SectionIdx ( 1 -9.300 1.35 0 90 37298 )
 SectionIdx ( 1 6.576, 1.35, -6.576 -45 37298 )
)
)


In case you're wondering, the "new" turntable is the one with the track section number 24864. My initial thought was that, when adding a new turntable to a route, you had to increase the numbers in the "TrackShapes" and "TrackSections" by one, and all the turntables must be listed in numerical order by TrackShape number, but my new turntable still does not work. What am I doing wrong?

#334 User is offline   xavivilla 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 211
  • Joined: 12-May 12
  • Gender:Male
  • Simulator:Open Rails - RailWorks
  • Country:

Posted 29 January 2023 - 05:04 PM

Does the shape a1t42mturntable have animation?

#335 User is offline   Traindude 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 814
  • Joined: 17-November 13
  • Gender:Male
  • Location:Seattle, WA
  • Simulator:Open Rails
  • Country:

Posted 29 January 2023 - 09:38 PM

View Postxavivilla, on 29 January 2023 - 05:04 PM, said:

Does the shape a1t42mturntable have animation?


It apparently does...
animations ( 1
		animation ( 3599 30
			anim_nodes ( 2
				anim_node BASIN (
					controllers ( 0 )
				)
				anim_node TRACKPIECE (
					controllers ( 2
						tcb_rot ( 3
							tcb_key ( 0 0 0 0 1 0 0 0 0 0 )
							tcb_key ( 1800 0 1 0 0 0 0 0 0 0 )
							tcb_key ( 3600 0 0 0 -1 0 0 0 0 0 )
						)
						linear_pos ( 361
							linear_key ( 0 0 0 21 )
							linear_key ( 10 0 0 21 )
							linear_key ( 20 0 0 21 )
                                                        [...edited to conserve space...]
                                                        linear_key ( 3580 0 0 21 )
							linear_key ( 3590 0 0 21 )
							linear_key ( 3600 0 0 21 )
						)
					)
				)
			)
		)
	)
)


So...what's wrong?

#336 User is offline   xavivilla 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 211
  • Joined: 12-May 12
  • Gender:Male
  • Simulator:Open Rails - RailWorks
  • Country:

Posted 30 January 2023 - 01:48 AM

I see that all the "linear_key( )" lines in your file have the same 'X-Y-Z' values.
If you check the Open Rails documentation, you will see that the 'X-Y-Z' values ​​are different on each line.
This may be the problem.

#337 User is offline   Traindude 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 814
  • Joined: 17-November 13
  • Gender:Male
  • Location:Seattle, WA
  • Simulator:Open Rails
  • Country:

Posted 30 January 2023 - 06:21 PM

View Postxavivilla, on 30 January 2023 - 01:48 AM, said:

I see that all the "linear_key( )" lines in your file have the same 'X-Y-Z' values.
If you check the Open Rails documentation, you will see that the 'X-Y-Z' values ​​are different on each line.
This may be the problem.


I copied all the animation data from the documentation's .txt file and pasted it into the a1t42mturntable shape file (uncompressed) but I still can't get it to work. Now what?

#338 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 30 January 2023 - 09:34 PM

View PostTraindude, on 29 January 2023 - 02:25 PM, said:

...
Here's the turntables.dat in question:
2
Turntable(
WFile ( "w+001454+010325.w" )
UiD ( 418 )
XOffset ( 0 )
YOffset ( 1.35 )
ZOffset ( 0 )
TrackShapeIndex ( 37298 )
Animation ( "Deck" )
Diameter ( 18.6 )
)
Turntable(
WFile ( "w-001493+010308.w" )
UiD ( 174 )
XOffset ( 0 )
YOffset ( 1.175 )	
ZOffset ( 21 )
TrackShapeIndex ( 24864 )
Animation ( "TRACKPIECE" )
Diameter ( 42 )
)

...
Now what?
...

...so, maybe now this ->

Hello Traindude,

Because I think it is very unlikely that your route has such enormous dimensions, the used w-coordinates (WFile names) in your "turntable.dat" caught my eyes. Maybe it's just a little typo here?
So please check if it is simply a sign error in the world file name "WFile ( w-001493+010308.w )". Shouldn't it be more correctly "WFile ( w+001493+010308.w )"?

And by the way: If in an animation part of a shape code all "linear_pos" lines of a controller have the same X,Y,Z values, you can delete the whole "linear_pos" section with all associated lines.
The reduced animation code lines would then look like this and still should rotate the turntable correctly:
animations ( 1
        animation ( 3599 30
            anim_nodes ( 2
                anim_node BASIN (
                    controllers ( 0 )
                )
                anim_node TRACKPIECE (
                    controllers ( 1
                        tcb_rot ( 3
                            tcb_key ( 0 0 0 0 1 0 0 0 0 0 )
                            tcb_key ( 1800 0 1 0 0 0 0 0 0 0 )
                            tcb_key ( 3600 0 0 0 -1 0 0 0 0 0 )
                        )
                    )
                )
            )
        )
    )
)
Note that there is only an "1" left at the "controllers"-line of "TRACKPIECE"

Greetings
Jonas

#339 User is offline   Laci1959 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,131
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 30 January 2023 - 11:07 PM

Hello.

The animation block is bad. There are only 17 lines here. There is a file a1t27mturntable_animations.txt in the Openrails Dokumentation SampleFiles folder. It consists of 385 lines.
Big difference. In fact, it rotates slowly with the animation.
If there is no Animations block in the shape file, the contents of the a1t27mturntable_animations.txt file must be inserted before the last parenthesis.
I did the same in my odell. It spins around nicely.

Sincerely, Laci1959

#340 User is offline   Traindude 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 814
  • Joined: 17-November 13
  • Gender:Male
  • Location:Seattle, WA
  • Simulator:Open Rails
  • Country:

Posted 31 January 2023 - 02:01 AM

View Postjonas, on 30 January 2023 - 09:34 PM, said:

[/size]
...so, maybe now this ->

Hello Traindude,

Because I think it is very unlikely that your route has such enormous dimensions, the used w-coordinates (WFile names) in your "turntable.dat" caught my eyes. Maybe it's just a little typo here?
So please check if it is simply a sign error in the world file name "WFile ( w-001493+010308.w )". Shouldn't it be more correctly "WFile ( w+001493+010308.w )"?


I tried changing that minus to a plus, but it unfortunately causes ORTS to crash when I load an activity.

View Postjonas, on 30 January 2023 - 09:34 PM, said:

And by the way: If in an animation part of a shape code all "linear_pos" lines of a controller have the same X,Y,Z values, you can delete the whole "linear_pos" section with all associated lines.
The reduced animation code lines would then look like this and still should rotate the turntable correctly:
animations ( 1
        animation ( 3599 30
            anim_nodes ( 2
                anim_node BASIN (
                    controllers ( 0 )
                )
                anim_node TRACKPIECE (
                    controllers ( 1
                        tcb_rot ( 3
                            tcb_key ( 0 0 0 0 1 0 0 0 0 0 )
                            tcb_key ( 1800 0 1 0 0 0 0 0 0 0 )
                            tcb_key ( 3600 0 0 0 -1 0 0 0 0 0 )
                        )
                    )
                )
            )
        )
    )
)
Note that there is only an "1" left at the "controllers"-line of "TRACKPIECE"

Greetings
Jonas


I'll try that next. UPDATE: No, it doesn't work.

View PostLaci1959, on 30 January 2023 - 11:07 PM, said:

Hello.

The animation block is bad. There are only 17 lines here. There is a file a1t27mturntable_animations.txt in the Openrails Dokumentation SampleFiles folder. It consists of 385 lines.
Big difference. In fact, it rotates slowly with the animation.
If there is no Animations block in the shape file, the contents of the a1t27mturntable_animations.txt file must be inserted before the last parenthesis.
I did the same in my odell. It spins around nicely.

Sincerely, Laci1959


If you look at my sample code I only left frames 0, 10, 20, 3400, 3500 and 3600 there so my post wouldn't take up so much space on this thread. How else am I supposed to show it to you on this forum without you having to do endless scrolling?

I already tried copying and pasting the a1t27mturntable_animations.txt animation data and it still doesn't work.

Anywhooo...this is what I get when I view the "new" turntable in TSRE, even when I added the appropriate changes to turntables.dat and tsection.dat:


#341 User is offline   Laci1959 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,131
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 31 January 2023 - 02:37 AM

https://kephost.net/p/ODU1NDMy.png

Hello.

I do not know. I simply copied the contents of the file a1t27mturntable_animations.txt before the last parenthesis, and it slowly rotated in Shape View. That's the first test. If the animation does not work there, or the turntable is not visible, there may be a parenthesis error when copying.
I made a 24-meter and a 20-meter turntable based on the regulations of the Hungarian State Railways. Both work. I only succeeded on the first and third attempts, I probably made a parenthesis mistake. The second was immediately good.
If you look at the fourth value of Linear_Pos it keeps increasing up to 180 degrees. after that it continuously decreases from there.

Sincerely, Laci1959

#342 User is offline   Csantucci 

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

Posted 31 January 2023 - 09:22 AM

In this video https://www.youtube....h?v=O9h3cbBoPME you can see the partial turntable and other interesting interactives.

#343 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 31 January 2023 - 10:28 AM

View PostLaci1959, on 30 January 2023 - 11:07 PM, said:

Hello.

The animation block is bad. There are only 17 lines here. There is a file a1t27mturntable_animations.txt in the Openrails Dokumentation SampleFiles folder. It consists of 385 lines.
Big difference. In fact, it rotates slowly with the animation.
If there is no Animations block in the shape file, the contents of the a1t27mturntable_animations.txt file must be inserted before the last parenthesis.
I did the same in my odell. It spins around nicely.

Sincerely, Laci1959

Ok, you're right. My animation doesn't work for a1t27mturntable.s. I assumed that the turntable (subobject TRACKPIECE) has its pivot point in its center. Then no linear_pos lines would be needed at all.
But TRACKPIECE actually has its pivot point at the edge and therefore needs an x,y,z position change for each keyframe.

#344 User is offline   Laci1959 

  • Superintendant
  • Group: Posts: Elite Member
  • Posts: 1,131
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 31 January 2023 - 10:37 AM

View PostTraindude, on 31 January 2023 - 02:01 AM, said:

If you look at my sample code I only left frames 0, 10, 20, 3400, 3500 and 3600 there so my post wouldn't take up so much space on this thread. How else am I supposed to show it to you on this forum without you having to do endless scrolling?
Anywhooo...this is what I get when I view the "new" turntable in TSRE, even when I added the appropriate changes to turntables.dat and tsection.dat:


Hello.

You're right about that, I was careless, I'm sorry.
The only thing about the picture is that it only shows where tracks can be connected. This is enough for track construction.

Sincerely, Laci1959

#345 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 31 January 2023 - 10:52 AM

View PostTraindude, on 31 January 2023 - 02:01 AM, said:

...
I tried changing that minus to a plus, but it unfortunately causes ORTS to crash when I load an activity.
...

Is the w-file "w-001493+010308.w" (with the prefixed minus!) available in your WORLD folder of your route at all?

Because in your snapshot there is no minus sign in the second line at "Tile X: 1493". So we see the w-tile of the w-file "+001493+010308.w" in your snapshot with the turntable.

  • 25 Pages +
  • « First
  • 21
  • 22
  • 23
  • 24
  • 25
  • 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