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.
  • 38 Pages +
  • « First
  • 32
  • 33
  • 34
  • 35
  • 36
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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

#331 User is offline   alifatico 

  • Hostler
  • Group: Status: Active Member
  • Posts: 92
  • 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: Status: Elite Member
  • Posts: 7,000
  • 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 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 661
  • 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: Status: Active Member
  • Posts: 199
  • 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 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 661
  • 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: Status: Active Member
  • Posts: 199
  • 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 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 661
  • 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: Status: Contributing Member
  • Posts: 548
  • 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 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 948
  • 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 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 661
  • 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:


  • 38 Pages +
  • « First
  • 32
  • 33
  • 34
  • 35
  • 36
  • Last »
  • 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