Elvas Tower: Screwing around with the path - Elvas Tower

Jump to content

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

Screwing around with the path Rate Topic: -----

#1 User is offline   Genma Saotome 

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

Posted 21 September 2021 - 06:02 PM

TSRE 7.002

Near end of a 250m road shape, not connected to anything at all.
Attached File  00-near.jpg (112.54K)
Number of downloads: 1

Far end
Attached File  00-far.jpg (157.66K)
Number of downloads: 1

Here is the tsection entry:
TrackShape ( 25534 FileName ( MR_All_n1B_21x250m.s )
NumPaths ( 2 )
Sectionidx ( 1 -1.6764 0 0 0.314 3 )
Sectionidx ( 1 1.6764 0 0 0.314 3 )
RoadShape ( )
)

What the above states is there are two paths, each 1.67m on either side of the center line with a defined car path 0.314m above the zero altitude level, 250m long. No squirlly angles in there. What is different is the value of 0.314. All other shapes int eh tsection value have 0 in that location. This a bit higher so the road shape can have an arch, including a lower altitude in adjacent lanes, with room for a gutter quite near to 0 altitude..

Copy POS as well as copy Pos/Rot for pasting upon another similarly defined shape does not work at all.

I've put several months of work into this library of road shapes and to see what the program is doing is a real shock.

#2 User is offline   ebnertra000 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,234
  • Joined: 27-February 17
  • Gender:Male
  • Location:East-Central Minnesota
  • Simulator:OR/TSRE
  • Country:

Posted 22 September 2021 - 04:20 AM

TSRE has had an issue like this for a long time, where they would end up slightly off-kilter. It's always happened with longer pieces, but is very inconsistent; because of that, I've never found the cause. I can place 250s until the cows come home, and then one will suddenly do it. I will usually end up rotating the piece back manually, since (I think) the shape is crooked, but not the .rdb lines

#3 User is offline   StevenMasters 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 43
  • Joined: 14-October 13
  • Simulator:ORTS
  • Country:

Posted 22 September 2021 - 05:16 AM

Going from memory (at work right now), but the 0.314 is in the angle position.

#4 User is offline   Genma Saotome 

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

Posted 22 September 2021 - 12:39 PM

 StevenMasters, on 22 September 2021 - 05:16 AM, said:

Going from memory (at work right now), but the 0.314 is in the angle position.


Yeah, I think you are right. I went looking for exceptions to " 0 0 0 " and found slip switches.

Ok... I misunderstood the purpose here. That leaves me with a major problem, specifically, how do you define a path offset above the the origin point? KUJU appears to have hard coded a value for railheads and either did the same or assumed zero for roads. I have built a road shape library that depends on the path being above the origin point. How to I define the path for that?

Here is an example of the goal:

Attached File  streets.jpg (192.09K)
Number of downloads: 0

There are 4 shape files shown there -- the #1, #2, and #3 lanes, plus the centerline. Not shown are shapes for parking lanes or shapes for gutter/curb/parkway shapes, both in multiple "flavors"... even the cernterline comes in flavors: Yellow lines, white lines, black lines and no lines. Also not shown are identical shapes textured for asphalt, cobblestone, and street cars, as well as the track for the streetcars. All of this is based on the various shapes using an identical xyz origin point to make placement of the several shapes very easy -- you set down the #1 lanes and everything else that follows uses the same Position() and Qdirection() values. And the roadway is arched.

This means the roadway for the #1 lanes has to match the altitude of the railhead shape (for streetcars). And because the roadway is arched the altitude of the carspawner path in the #2 and #3 lanes is lower. All of this depends on defining the carspawner path above the origin point -- exactly as-if it was a track shape. Except KUJU didn't provide for this in the Tsection file, they hard coded the offset in the program.

What can I do??

#5 User is offline   dajones 

  • Open Rails Developer
  • Group: Status: Contributing Member
  • Posts: 413
  • Joined: 27-February 08
  • Gender:Male
  • Location:Durango, CO
  • Country:

Posted 23 September 2021 - 10:31 AM

Try

TrackShape ( 25534 FileName ( MR_All_n1B_21x250m.s )
NumPaths ( 2 )
Sectionidx ( 1 -1.6764 0.314 0 0 3 )
Sectionidx ( 1 1.6764 0.314 0 0 3 )
RoadShape ( )
)

The third number in SectionIdx is supposed to be the Y offset, but I don't know if anyone has ever used it.

Doug

#6 User is offline   Genma Saotome 

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

Posted 25 September 2021 - 10:20 AM

Doug, that IS the answer, thank you.

However there is still a problem, this time in TSRE: The program seems to be using the XYZ position from the tsection data as the origin point of the object, instead of the objects own 0,0,0 origin point. In practice this means the road shape I'm describing in this thread will use 0, 0.314, 0 to located the object on the ground which means the object itself is invisible underground. The option to "snap-to-object" when placing does not prevent this... and of course if you turn off the display of the terrtex you are most likely to see the next placement drop to -infinity altitude.

So as I feared, it appears there are only two solutions: code changes in TSRE or placing other road shapes and then hand editing both the .tdb and world files to subsitute in the shapes I want to use. I have, on occasion, done the later; it's no fun, especially after making an error.

FWIW, Goku has not logged into his own board (or this one) in over three months. The tree sap might be solidifying into amber.

#7 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 05 January 2022 - 08:32 AM

I did solve this problem for you 10 months ago (road Y offset). And everything worked well.
https://github.com/G...8/TDB.cpp#L1608
For perfect results, this solution requires that all your shape paths have the same Y height.

Don't know why did you forget this and are back with the same issue.
Forget about fixing it second time.

#8 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 06 January 2022 - 12:46 PM

Here is the old topic on tsre forum: http://www.onrails.e...c.php?f=7&t=190
I made TSRE version for you, did test all your shapes. Everything worked great, but you just ignored it.

#9 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 09 January 2022 - 10:25 AM

As you can see, everything worked great in the version I gave you:

https://i.imgur.com/uy3so88.png

But, you ignored it, and meanwhile I did make a fix for this bug: http://www.onrails.e...c.php?f=7&t=247
This caused the solution to your problem to stop working.

Try TSRE version .7.007

#10 User is offline   Genma Saotome 

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

Posted 09 January 2022 - 02:12 PM

You might have asked if this is still a problem.

Checking this morning, yes, the generic roads are placed correctly. Offhand I don't recall what I saw before, it was 3.5 months ago. It had something to do with replacing shapes, specifically when the path was at a different height. I changed my approach sometime after writing the above posts and IIRC it works now. I would like to verify t hat again today.

FWIW I'm working with 465 different models, all of which have gone thru multiple versions and all of which must be identical in several points.

A request, if you have time: when changing the name of a shape AFAICT you have to know the correct .s file to type. Is there a place in TSRE where you can select a shape and copy it's .s file name? If not, could that function be added to the right mouse click menu? I could then copy/paste that name from the selected shape into the edit window and then there would not be any errors and I would not have to pull up windows explorer to find the name.

  • 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