Hello,
I’ve been working on a program that generates track shapes from decompressed MSTS/OR shape files.
The workflow starts with a known reference shape—for example, a 10 m straight track such as a1t10mstrt.s. From there, the user can specify track spacing and number of parallel tracks to generate. At the moment the program is hard-coded to a maximum of eight tracks, though that limit may change.
Spacing can be entered as:
16.35 ft (default MSTS track spacing)
14 ft (common North American spacing)
meters (fully supported)
Using these inputs, the program generates new track shapes to the requested length, spacing, and track count. This allows a user to model a simple straight track (for example, a 10 m segment) in SketchUp or Blender and then procedurally generate the desired multi-track configuration from it.
Curved track generation is also supported. The same logic applies as with straight track: spacing, number of tracks, radius, and angle are derived from a known curve template.
I plan to attempt switches/points next, though I’m cautiously pessimistic about how cooperative those will be.
Future iterations will likely include:
Batch (mass) shape generation, rather than one-at-a-time output
Possibly bypassing .s files entirely and generating directly from formats like OBJ or 3DS
The UI is admittedly rough and not currently the main focus.
Testing so far has been done using:
User-created track
ScaleRails
Default MSTS track
USTracks / DBTracks
ShapeGenerator01.jpg
ShapeGenerator02.jpg
I’ve been working on a program that generates track shapes from decompressed MSTS/OR shape files.
The workflow starts with a known reference shape—for example, a 10 m straight track such as a1t10mstrt.s. From there, the user can specify track spacing and number of parallel tracks to generate. At the moment the program is hard-coded to a maximum of eight tracks, though that limit may change.
Spacing can be entered as:
16.35 ft (default MSTS track spacing)
14 ft (common North American spacing)
meters (fully supported)
Using these inputs, the program generates new track shapes to the requested length, spacing, and track count. This allows a user to model a simple straight track (for example, a 10 m segment) in SketchUp or Blender and then procedurally generate the desired multi-track configuration from it.
Curved track generation is also supported. The same logic applies as with straight track: spacing, number of tracks, radius, and angle are derived from a known curve template.
I plan to attempt switches/points next, though I’m cautiously pessimistic about how cooperative those will be.
Future iterations will likely include:
Batch (mass) shape generation, rather than one-at-a-time output
Possibly bypassing .s files entirely and generating directly from formats like OBJ or 3DS
The UI is admittedly rough and not currently the main focus.
Testing so far has been done using:
User-created track
ScaleRails
Default MSTS track
USTracks / DBTracks
ShapeGenerator01.jpg
ShapeGenerator02.jpg








Comment