[suggestion] Multiple-model track types
CherubAgent1440 opened this issue ยท 0 comments
Overview
Currently, in IR, a modeler who makes a track type does so by making a 1-block segment of track, which IR then repeats indefinitely. I suggest that in addition, a track type can be defined with a list of models, which are either repeated in a loop (for example, for OLE catenary), or picked at random (such as American narrow gauge, where each sleeper is at a random angle)
Examples
Example 1
"repeat_style":"loop",
"track_models":{
1:"track/meter_gauge_catenary/pole_left.obj",
2:"track/meter_gauge_catenary/no_pole.obj",
3:"track/meter_gauge_catenary/no_pole.obj",
4:"track/meter_gauge_catenary/no_pole.obj",
5:"track/meter_gauge_catenary/no_pole.obj",
6:"track/meter_gauge_catenary/no_pole.obj",
7:"track/meter_gauge_catenary/no_pole.obj",
8:"track/meter_gauge_catenary/no_pole.obj"
}
In the above example, the block that the blueprint is placed on uses the pole_left.obj
track piece, then the next seven segments use the no_pole.obj
track piece, then it repeats again
Note the existence of the "repeat_style"
parameter. This would default to "loop"
, but could also be set to "random"
(each track segment uses a random model from the list), or "none"
(it goes through the items in sequence like "loop"
, but when reaching the last model it just repeats that model forever, rather than going through the entire sequence again)
Example 2
"repeat_style":"random",
"track_models":{
1:"track/us_narrow_gauge/left_45.obj",
2:"track/us_narrow_gauge/left_30.obj",
3:"track/us_narrow_gauge/left_15.obj",
4:"track/us_narrow_gauge/center.obj",
5:"track/us_narrow_gauge/right_15.obj",
6:"track/us_narrow_gauge/right_30.obj",
7:"track/us_narrow_gauge/right_45.obj"
}
Each track segment would use a random track piece, in this case representing different angles of sleeper rotation. The "random" formula would use a seed derived from the x, y, z co-ords, the track type (straight, curve, custom curve, etc.), the direction the track was placed, and how far from the first track block this segment is.
Example 3
"repeat_type":"none",
"track_models":{
1:"track/level_crossing/fishplate.obj",
2:"track/level_crossing/guide_rails_start.obj",
3:"track/level_crossing/crossing_track_with_guide_rails.obj"
}
The first track segment (the one where it was placed) would use the fishplate.obj
track piece, the second the guide_rails_start.obj
track piece, and the third and all thereafter the crossing_track_with_guide_rails.obj
track piece.
Associated stuff
In the track blueprint menu, there should be a toggle something along the lines of "use single model". This would use the first track piece for "loop"
and "random"
repeat types, and the final track piece for "none"
repeat type.