Elvas Tower: Problem with Turntable Animation - Elvas Tower

Jump to content

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

Problem with Turntable Animation Rate Topic: -----

#11 User is offline   Gman347 

  • Foreman Of Engines
  • Group: Status: First Class
  • Posts: 934
  • Joined: 18-June 11
  • Gender:Male
  • Country:

Posted 13 September 2017 - 07:33 PM

Well this is how the hierarchy appears in shape viewer.

Attached Image: Turntable Heirarchy.jpg


Once the model was complete and exported to a shape file I edited the animation section as follows:


animations ( 1
animation ( 3600 30
anim_nodes ( 2
anim_node MAIN (
controllers ( 0
)
)
anim_node bone (
controllers ( 1
tcb_rot ( 5
slerp_rot ( 0 0 0 0 1 )
slerp_rot ( 900 0 0.7071068 0 0.7071067 )
slerp_rot ( 1800 0 1 0 -1.629207E-07 )
slerp_rot ( 2700 0 -0.7071066 0 0.7071069 )
slerp_rot ( 3599 0 0 0 1 )

With this sequence in place the table rotates counterclockwise in shape viewer as it should. So all seemed to be OK.

I have made the length of my model to match that of the original table (n1t16mturntable.s) with the intention of simply replacing the original table with my model. I first replaced the file as planned and ran MSTS. The new model showed up in the correct locations and I could drive a train over them so apparently the replacement worked OK. I also opened the route in OR and likewise could see the tables and operate trains over them but I had not yet added turntables.dat in the OR folder so the tables were still not operable. Once I could see the tables OK in OR I added turntables.dat to the route's OpenRails folder. There are two occurrances of the table so turntables.dat looked as follows:



2
Turntable(
WFile ( "w-012382+014172.w" )
UiD ( 182 )
XOffset ( 0 )
YOffset ( 0 )
ZOffset ( 8.043 )
TrackShapeIndex ( 39941 )
Animation ( "TRACKPIECE" )
Diameter ( 16 )
)
Turntable(
WFile ( "w-012372+014220.w" )
UiD ( 435 )
XOffset ( 0 )
YOffset ( 0 )
ZOffset ( 8.043 )
TrackShapeIndex ( 39941 )
Animation ( "TRACKPIECE" )
Diameter ( 16 )
)

The first line is blank as required.

When I run Open Rails with the turntables.dat file in place I get the following error in the OpenRails.log file:

Warning: System.IO.FileLoadException: {TileX:-12382 TileZ:14172 X:892.288 Y:1983.84 Z:191.124} scenery object 182 failed to load ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.

The turntables are no longer visible in the route, makes sense, the shape failed to load per the message. If I remove the turntables.dat file rendering the turntables static I can see them again. So the problem seems to be related to the animation, or am I wrong?

Can anyone offer advice?

I am attaching the log file for review if needed. There are other issues reported but I am thinking they are not related to the current problem. I didn't create the route originally and wasn't aware of the problems within the route until this problem arose.

#12 User is offline   wellsburg 

  • Conductor
  • Group: Status: First Class
  • Posts: 329
  • Joined: 29-January 04
  • Gender:Male
  • Location:Lakewood, Ohio
  • Country:

Posted 13 September 2017 - 08:21 PM

Paul,

I see a couple of issues. There needs to be a blank line after the initial 2. The Animation name "TRACKPIECE" does not match the Hierarchy name "Armature".
Give the modified version below a whirl.

Mike


2
Insert blank line here
Turntable(
WFile ( "w-012382+014172.w" )
UiD ( 182 )
XOffset ( 0 )
YOffset ( 0 )
ZOffset ( 8.043 )
TrackShapeIndex ( 39941 )
Animation ( "Armature" )
Diameter ( 16 )
)
Insert blank line here
Turntable(
WFile ( "w-012372+014220.w" )
UiD ( 435 )
XOffset ( 0 )
YOffset ( 0 )
ZOffset ( 8.043 )
TrackShapeIndex ( 39941 )
Animation ( "Armature" )
Diameter ( 16 )
)

#13 User is offline   Gman347 

  • Foreman Of Engines
  • Group: Status: First Class
  • Posts: 934
  • Joined: 18-June 11
  • Gender:Male
  • Country:

Posted 14 September 2017 - 04:44 AM

The extra blank spaces are a surprise to me. They are not included in the examples posted by Carlo or in the OR manual. My understanding was that the first line of the data file, before the "2" needed to be a blank. The mis-name of the animation is definitely operator error. http://www.elvastower.com/forums/public/style_emoticons/default/sign_oops.gif I should have caught that myself! I will make the changes and give it a try.

Thanks Mike. http://www.elvastower.com/forums/public/style_emoticons/default/sign_thank_you.gif

#14 User is offline   wellsburg 

  • Conductor
  • Group: Status: First Class
  • Posts: 329
  • Joined: 29-January 04
  • Gender:Male
  • Location:Lakewood, Ohio
  • Country:

Posted 14 September 2017 - 07:56 AM

Paul,

You are correct. The line space is necessary at top of file only. :sign_oops:

Mike

#15 User is offline   Gman347 

  • Foreman Of Engines
  • Group: Status: First Class
  • Posts: 934
  • Joined: 18-June 11
  • Gender:Male
  • Country:

Posted 15 September 2017 - 09:23 AM

Quote

The Animation name "TRACKPIECE" does not match the Hierarchy name "Armature".


That fixed it Mike! That was a silly mistake on my part. http://www.elvastower.com/forums/public/style_emoticons/default/wallbash.gif I should have caught that. This is a case where it's good to have a friend helping on a project. The extra pair of eyes can find such things much more quickly.

Thanks Again. http://www.elvastower.com/forums/public/style_emoticons/default/sign_thank_you.gif

  • 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