Skip to content
Connected RailsConnected Rails

Track objects and buildings

A track object (objects/*.ron) is a 3D object placed relative to the track — catenary masts, kilometre boards, platform lamps. The object carries the pose its author meant, so the editor’s object tool drops it correctly with one click:

(
name: "Mast",
model: "example/assets/mast.gltf", // glTF below mods/, like vehicle models
lateral_offset: -3.5, // m, positive = right of increasing arc length
yaw_deg: 0.0, // about up, clockwise from above; 0 = front along the track
height: 0.0, // m above the railhead
tags: ["mast", "catenary", "epoch-4"], // optional, for the library's search and filters (see Tags)
)

Seasonal variants are optional. An object may name an autumn or a winter glTF next to its year-round one; each brings its own textures, and whatever is left out falls back to model. A mast, a board or a lamp names neither and looks the same all year:

(
name: "Birke",
model: "example/assets/birke.gltf",
autumn_model: Some("example/assets/birke_herbst.gltf"),
winter_model: Some("example/assets/birke_winter.gltf"),
)

Which one is spawned follows the scenario’s start date (see Seasons below): the winter variant while snow lies, the autumn one while the leaves have turned, the year-round model otherwise. An object that ships no variant is never treated as a mistake.

Walkways in the model. A platform, a footbridge or a station forecourt brings the places its people walk along with it, as empty nodes in the glTF (in Blender: empties, named in the outliner):

Nodes Meaning
wp_<name>_0, wp_<name>_1, … the vertices of a footpath <name>, in walking order; people walk it up and down
wa_<name>_0, wa_<name>_1, … the corners of a walk area <name> in ring order; people wander inside it, the rest stand

Custom properties on the _0 node (exported as glTF extras) size the crowd: people (how many, default 4 on a path and 6 in an area), width (metres, a path’s; default 2) and walking_share (0 … 1, the share of an area’s people that wander; default 0.5). The positions are the model’s own, so the way follows the object wherever a line places it, and the people stand at the height the nodes are at — on the platform’s surface, not on the ground under it. mods/example/assets/platform.gltf (tools/gen_platform.py) is the worked example: a 210 m platform with wp_edge_* along its length and wa_middle_* as its waiting area, placed on the example line at the stop at km 1.98.

A line places instances under objects:; each placement stores concrete values (stamped from the object’s defaults, editable per instance), so the file stands on its own:

objects: [
(object: "example:mast", edge: 0, s: 500.0, lateral_offset: -3.5),
// Free of the track: at a point on the earth, on the ground there, the front
// turned clockwise from north. `edge`, `s` and `lateral_offset` say nothing here.
(object: "cars:kleinwagen", geo: Some((lat: 52.4234, lon: 10.7865)), yaw_deg: 120.0),
],

Not every object belongs beside a track: a car, a pylon or a landmark stands wherever it is put. The route editor’s object tool tells the two apart by the object’s own data — an object that names a lateral_offset was measured from the rail and is aligned to the nearest track by default; one without is dropped free where the click is. A trackside object whose offset happens to be zero (a board on the axis of a siding) says so with the tag trackside. The builder can flip either way per placement.

The simulator spawns the glTF at the track pose plus offset, rotation and height — or on the ground at its point, for a placement with geo: — floating-origin safe like the signal models; an unknown object name gets a placeholder block and a warning. In the route editor the object tool (key 4 in the lineside equipment box) picks an object kind and shows a ghost of it under the cursor, turned with Ctrl and the wheel, and drops it on the nearest track or free where the click is; the library’s object cards can also be dragged onto the map. The selection panel edits position, lateral offset, rotation and height (rotation and height over the ground for a free one), and the rule check flags placements outside their track or naming an object no installed mod has. Repeat in a row stamps copies of the selected instance along its track — spacing (default 65 m, the standard catenary span) and end position, each copy carrying the instance’s own offset and rotation and staying individually editable, so a mast that collides with a tree is simply moved. Nothing in the simulation reads objects — they are the line’s furniture, and deleting or splitting tracks carries them along like devices.

A placement with snap_to_terrain: true stands on the terrain surface instead of the rail plane — height then measures from the ground. The strip beside the track is blended toward rail height, so a snapped object next to the ballast still meets it. The editor’s selection panel has the checkbox, and both programs resolve the height the same way: an object is placed by the terrain tile it stands on, so it streams in and out with that tile and its feet meet the ground the tile actually has.

The bundled wolfsburg landmark mod supplies eight specific exterior buildings around Wolfsburg Hbf for a 2026 route: the VW power station, phaeno, CinemaxX, Markenhochhaus, station reception building and green DigitalCube, Volkswagen Arena and the 1200 × 260 m canal works hall. Each is a normal objects/*.ron entry with four authored LODs, metre scale, one PBR atlas material and editable Blender sources. Their dimensions, reference confidence and review gallery are documented with the mod. The current Wolfsburg materials opt into shared metric surface detail via glTF material extras; the standard PBR atlas remains the generic glTF fallback. See the texture pipeline for that shader/UV contract.

The route editor’s building tool places an editable building recipe, not a reference to a glTF. Static houses under objects: remain supported and are the right choice for a specific landmark. A generated building is stored under buildings::

buildings: [
(
edge: 0,
s: 540.0,
lateral_offset: -18.0,
yaw_deg: 90.0,
snap_to_terrain: true,
spec: (
use_kind: Residential,
width: 12.0,
length: 10.0,
floors: 3,
floor_height: 2.9,
roof_style: Gable,
roof_height: 3.2,
facade: Plaster,
facade_color: (0.82, 0.72, 0.58),
roof: ClayTile,
window_spacing: 2.6,
window_width: 1.25,
window_height: 1.45,
lit_window_share: 0.38,
balconies: true,
balcony_every: 2,
balcony_depth: 1.4,
seed: 1384,
),
),
],

use_kind is Residential, Commercial, Industrial or CarPark; roofs are Gable, Hip, Flat, Shed, Mansard and Sawtooth. Facades use Plaster, RedBrick, YellowBrick, Clinker, Sandstone, WoodSiding, Concrete or MetalPanel, and roofs use ClayTile, ConcreteTile, Slate, StandingSeam, CorrugatedMetal, Bitumen or Membrane. Width and length go up to 250 m each and a floor up to 14 m, so a distribution centre is one body. Every field has a default, so a recipe only needs to name what differs. The editor constrains dimensions to valid ranges and exposes the same values after placement. Copy/paste clones the complete recipe, including seed, so the copy has the same design and lit-window pattern.

A recipe is one rectangular body with a roof, and everything else is added to it:

  • Roof — roof_overhang (m), dormers per long slope with dormer_style: Gable or Shed (pitched roofs only), chimneys, roof_vents, a grid of skylights per row times skylight_rows, solar_panels (tilted arrays on flat roofs, laid on the slope of pitched ones), parapet_height for a flat roof’s upstand, and rain_gutters. On a flat roof roof_house: true puts a plant room or stair head on the slab (roof_house_width along the front, roof_house_depth, roof_house_height, roof_house_offset along the front from the centre), walled in the facade material with its own slab in the roof material.
  • Facade ornaments — plinth_height (a stone base band, 0 = none), string_courses (a raised band at every floor line), cornice (frieze and moulding under the eaves) and corner_pilasters, all in ornament_color. Set it to the facade colour for relief in the same tone, or to white for the classic bands on coloured plaster.
  • Open ground floor — ground_recess (m, 0 = none) sets the ground floor back behind the upper floors on every outside wall; the overhang is closed with a soffit and stands on square columns along the wall line at the window spacing. Ground-floor windows, shop front, door and canopy move onto the set-back wall, the plinth follows it, and corner pilasters start at the first floor. The colonnaded office and department store of the 1960s and 70s.
  • Louvre screen — louvres: true stands a screen of vertical fins in louvre_color in front of every wall that carries windows, at a 60 cm pitch over the full height. Above a recessed or shop-front ground floor the screen starts at the first floor, around the entrance and under its canopy the fins stop above the ground floor, and a front with balconies stays open.
  • Windows and doors — window_spacing, window_width, window_height, lit_window_share, window_faces: All, Front, FrontAndBack or Sides, clerestory (one strip of glazing under the eaves per floor instead of single windows), shutters (hinged leaves beside every window with room for them), and for commercial buildings shop_front: ground-floor display windows under a fascia band. Shutters and fascia take accent_color. entrance_canopy places a canopy over every door side. An industrial building has loading_doors (up to 40) per side named in loading_sides: Front, Back or Both, and with dock_shelters every gate gets a shelter hood and bumpers.
  • Balconies — balconies with balcony_every (floors) and balcony_depth. balcony_layout: Centre is one balcony in the middle of the front, EveryBay one in every window bay and AlternateBays one in every second bay, each with a glazed door in place of the bay’s window. balcony_parapet: Railing is posts and a handrail, Panel closes the balcony with solid infill in balcony_color under a handrail — the coloured panels of the post-war slab block.
  • Car park — use_kind: CarPark is an open-deck multi-storey car park: one slab per floor with an upstand along every deck edge, the open top deck behind a concrete parapet of parapet_height, and columns on the wall line at window_spacing with a second row down the middle. There are no walls, windows or doors, so the decks are seen through; the roof is always flat, and a roof_house makes the stair tower.
  • Cross wing — wing: true projects a section from the front facade (wing_width, wing_depth, wing_offset along the front, wing_roof: Gable or Hip). Its roof has the pitch of the main roof and is run into it; the entrance, canopy and balcony doors move onto the wing. On a flat, shed or sawtooth roof the wing is a flat-roofed bay.
  • Annex — annex: true attaches a lower body to annex_side: Left, Right or Back (annex_width along that wall, annex_depth, annex_floors, annex_offset, annex_roof: Hip, Gable, Flat or Shed). A shed roof leans against the main wall; the others run into the main roof where it covers them and stand on their own where it does not.
// The villa of the example settlement: hipped cross wing, one-storey annex,
// cornice, string course and corner pilasters in the facade tone.
spec: (
width: 16.0, length: 11.0, floors: 2, floor_height: 3.2,
roof_style: Hip, roof_height: 3.4, roof_overhang: 0.35,
facade_color: (0.52, 0.55, 0.50),
window_spacing: 3.2, window_width: 1.6, window_height: 1.5,
balconies: false, chimneys: 2, rain_gutters: true,
wing: true, wing_width: 6.5, wing_depth: 1.6, wing_offset: 3.5, wing_roof: Hip,
annex: true, annex_side: Right, annex_width: 7.0, annex_depth: 4.0,
annex_floors: 1, annex_roof: Hip,
plinth_height: 0.6, string_courses: true, cornice: true, corner_pilasters: true,
ornament_color: (0.56, 0.59, 0.54),
seed: 1515,
),

The editor’s presets cover the common German types — detached house, bungalow, terraced house, farmhouse, barn, villa, town house, Gründerzeit tenement, apartment block, inn, station building, shops with flats above, office block, retail row, supermarket, car dealership, workshop, warehouse, factory hall, logistics hall, distribution centre (a 180 m membrane-roofed hall with a parapet, a skylight grid, solar arrays, a light band and eighteen docked gates), slab block (a 60 m flat-roofed “Wohnzeile” with a balcony in every second bay behind red panels), ribbon-window office (light bands, a recessed ground floor on columns, a plant room and solar arrays on the roof), louvred office block (a louvre screen over a recessed ground floor) and multi-storey car park (four open decks with a stair tower). A preset only fills in the fields; every one of them stays editable afterwards.

The simulator receives only the normalised, tile-local recipe. It reuses one generated three-level mesh set for every identical recipe and global PBR materials for every building; it does not carry the editor’s selection or authoring state. LOD0 includes window surrounds, shutters and the columns inside a car park, LOD1 retains the facade rhythm, balconies, louvres, dormers and ornaments, and LOD2 is the silhouette with wing, annex and roof house. The emissive share is selected deterministically from seed and switched by the normal day/night system, so loading the route never rearranges illuminated apartments.

Levels of detail work as for vehicles and signals: nodes named <name>_LOD0, _LOD1, … are shown by camera distance. A model without the suffix is one level, drawn up to the cull distance. This matters most for trees: every tree of a wood is drawn as an instance of its model’s mesh parts — not as its own scene — so a thousand firs sharing one glTF are a handful of draw calls, and a coarse _LOD2 is what keeps a whole hillside cheap. Keep a level to one material where you can: the renderer spawns one entity per mesh part per level, so bark and leaves in one atlas is half the entities and half the draw calls of two separate materials.

The bands are 80, 260 and 800 m, and an object is culled at 2.5 km (3 km for scenery objects). An object may name its own, which is what vegetation does:

// Visible in full to 20 m, then coarser twice, gone at 700 m.
lod_distances: [20, 60, 120, 700],

The list is finest first and its last entry is the cull distance. A model with fewer levels than the list has entries runs its last level on to the cull distance. Scale them to how big the plant is: a level pays for its triangles only while the plant covers enough pixels, so a forty metre fir hands over at a hundred metres and is drawn to two and a half kilometres, while a two metre blackthorn hands over at twenty and is gone at seven hundred — and a hedge of blackthorn drawn to two kilometres is tens of thousands of draw calls for nothing.

How much ground it covers. Optional, and it decides nothing for an object a person places by hand — but the imagery detection has nothing to go on but a box measured off a photograph, and it is what stops a seven-metre van being dropped into a space that holds a hatchback:

// Length along the model's own front-to-back axis, width across it.
footprint: Some((length: 6.30, width: 2.35)),

Width is over whatever sticks out: a van’s mirrors are what touches the car in the next bay. A mast, a board or a hut states neither and is never measured.

For a plant the footprint is the crown, broadest span first, because the crown is the whole of what a photograph shows of a tree: the detection compares the disc it measured against this number to choose the species, and then grows the one it chose the rest of the way. tools/trees/import_mantissa.py writes it out of the built mesh, so what the file says is what the tree actually spans.

A crossed-quad impostor as the coarsest level wants a late hand-over, not an early one. Two quads at a right angle are the least that works — a single fixed billboard vanishes the moment the camera looks along it — and the pair has a seam: whichever blade is edge-on is drawn as a narrow strip through the other. Hand over where the plant is a few dozen pixels tall and the strip is under a pixel; hand over early and the tree looks sliced. mods/trees uses about eighteen times the plant’s height.

Lit windows at night. A node whose name ends in _NIGHT is shown after dusk and hidden by day — lit windows in a house, a glowing sign, the light pool under a platform lamp. Nothing is declared in the RON: model a second window pane with an emissive material, call it fenster_NIGHT, and it switches like a signal’s lamp node. The convention holds for every glTF the world is drawn from (scenery objects, trees, signal parts, vehicles), and a model without such a node simply never lights up. It is a hard switch at dusk, not a fade — the glow lives in your material, and it stays yours.

Haus.gltf
├── mauern always there
├── fenster the dark pane by day
└── fenster_NIGHT the emissive one, shown after dusk

People need places to be: footpaths and walk areas are line content, geo-positioned like the trees, with the height taken from the terrain:

walk_paths: [
// A footbridge from the forecourt to the platform, walked up and down by four
// people at a time; `height` lifts a way that is not on the ground.
(name: "Zugang", points: [(lat: 52.0002, lon: 10.0210), (lat: 52.0004, lon: 10.0214)],
width: 2.0, people: 4, height: 0.0, tags: ["station"]),
],
walk_areas: [
// The forecourt: twelve people about, half of them wandering between spots
// inside the polygon, the rest standing.
(name: "Vorplatz", polygon: [(lat: 52.0000, lon: 10.0205), (lat: 52.0000, lon: 10.0212),
(lat: 52.0003, lon: 10.0212), (lat: 52.0003, lon: 10.0205)],
people: 12, walking_share: 0.5),
],

A path needs two points, an area three corners (the rule check says so), and both have to lie inside the module envelope — a corner dragged outside is reported. The route editor’s footpath and walk area tools (the People group of the palette) draw them with clicks — Enter or right-click finishes, Esc cancels — and edit them like the envelope: drag a vertex, click a side of the selected way to add one, Delete removes the held vertex or the way. The people themselves are the app’s (see People): which character walks where, and at what pace, is decided from the line and the scenario clock, never stored. A platform that is a model carries its own walkways (see Track objects), so a line only draws what no model brings.