Roads, overhead lines and wind turbines
The streets beside the track are roads — roads: on the line, one entry per
carriageway:
roads: [ ( name: "Gabrechten", points: [(lat: 51.598, lon: 8.160), (lat: 51.599, lon: 8.161)], width: 7.5, surface: Asphalt, // or Concrete center_line: Dashed, // None, Dashed, DashedUrban, Solid edge_lines: true, bridge: false, // flies over a dip tags: ["highway-primary"], ),],The points are the centre line OSM maps a street with; the carriageway is the
width either side of it, draped on the terrain when the tiles are built. width,
surface, center_line, edge_lines and bridge carry defaults, so a hand-written
entry can be as short as points alone.
The carriageway is built as a ribbon: one quad per segment of the way, mitered where two segments meet, and cut into cells as fine as the elevation grid the tile is drawn from — so the road follows every fold of the ground under it, and a bend holds together instead of tearing where a single buffered outline would cross itself. A hairpin on very short segments narrows into its corner rather than folding over, and a way that closes on itself — a roundabout, a loop — runs through its own first point instead of showing a notch there.
Junctions are worked out from the geometry, because OSM has no junction to import: two ways crossing, or one running out on another, is one. Where roads of comparable width meet, their carriageways are merged into one surface — the roads are cut back to its edge and the junction carries the ground between them itself, with its corners rounded the way a kerb is. That is what makes a junction one square of asphalt instead of two ribbons lying over one another, and it is what takes the seam out.
The merge is careful about what it will attempt, and leaves anything else alone:
- Peers only. A crossroads of two Landstraßen is merged. A field track running out on a Bundesstraße is not — the B-road runs through, its Leitlinie with it, and merging would take the through line out for the width of a track. Its mouth lies on the road instead.
- Room only. A junction never takes more than half the road between two nodes, and the kerb radius gives way where two of them are close — which is what keeps a village roundabout, whose mouths are a few metres apart, from being eaten by its own junctions.
- Never a bridge, and never a shape the construction cannot vouch for.
Where a junction is not merged, the markings still stop: both roads lose them over the mouth, and the surfaces are sorted onto layers a few millimetres apart so the one on top is on top everywhere instead of trading fragments along a torn edge. The edge lines break for anything that joins; the centre line only for a road at least as wide. Two ways that simply carry on from one another are not a junction at all — an extract splits a street at every change of tagging, and a street that lost its markings at each of them would be dashed rather than its centre line.
A roundabout (junction=roundabout) is one carriageway like any other one-way road,
so it carries no centre line. A module imported before this was so has the ring striped
down the middle; re-import its roads, or set center_line: None on the ring by hand.
A road with bridge: true flies: where the ground dips below the straight line
between the way’s own ends — a valley, a river, a cutting — the carriageway holds that
line instead of following the hollow, and its ends are measured on the shaped ground
(the elevation data as the tile grid samples it), so the deck meets the draped road at
the abutments and both tiles at a seam cut the same chord. A bridge way in OSM spans
abutment to abutment, which is exactly what this wants; a crossing where the elevation
data is flat shows no dip and no bridge.
Import. File ▸ Import roads asks Overpass for every highway=* way inside the
module envelope — the same extract a hand-downloaded Overpass Turbo query returns, so a
file picked with the dialog works too. The OSM class decides what the road is made of,
and the mapper’s own tags win where they say more: surface=* over the preset’s
surface — and where there is none, a field track’s tracktype=* (grade1 is solid and
reads as asphalt, everything below it is loose and reads as gravel) — width=*/lanes=*
over its width, oneway=yes and
junction=roundabout take the centre line out (a divided road is two one-way carriageways, and an Autobahn reads as
two of these rather than as one striped one), and any bridge=* but no flags the way as
flying. The
dialog’s two checkboxes opt the many-and-thin classes in:
field tracks (highway=track — what an agricultural module is stitched with) and
access ways (service, living_street, pedestrian). highway=track comes in
unpaved: the class says what a way is used for, not what it is built of, and the
German ones are gravel far more often than concrete — the paved ones say so themselves
(surface=*, tracktype=grade1), and only those come out paved — concrete slabs only
where a mapper wrote surface=concrete*, because that is how rare they are next to the
asphalt ones. An unpaved
carriageway carries no markings at all, whatever its class would have painted: nobody
draws a Randlinie on gravel. Nothing is written before
the summary’s Commit, and Commit is one undo step. import-module --tracks --narrow
runs the same query and the same filters headless (without the flags it takes the
dialog’s defaults, and it replaces the road list — the module is being rebuilt).
The presets are the German road system’s widths, and the road tool stamps them:
| Preset | Width | Markings |
|---|---|---|
| Autobahn, 2/3 lanes + shoulder (asphalt or concrete) | 11 / 15 m | edge lines only — one carriageway |
| Bundes-/Landstraße außerorts | 7.5 m | dashed centre, edge lines |
| Landstraße with overtaking ban | 7.0 m | solid centre, edge lines |
| Kreisstraße | 6.5 m | dashed centre, edge lines |
| Gemeindestraße | 5.5 m | dashed centre (innerorts), edge lines |
| Anliegerstraße | 4.5 m | edge lines only |
| Spielstraße | 3.0 m | none |
| Wirtschaftsweg (asphalt) | 3.5 m | none |
| Feldweg (gravel) | 3.0 m | none — what highway=track imports as |
| Feldweg (concrete slabs) | 3.0 m | none |
| Fußweg | 2.0 m | none |
The road tool (landscape category) draws one by hand for the track the import did not carry: clicks lay the centre line, Enter or a right click paves it, the preset combo and the width decide what it is made of, and a click on a drawn road takes it. The panel edits width, surface and markings of the selected road afterwards.
The look is the program’s, not the module’s: three surface scans (asphalt, concrete,
gravel — ambientCG, CC0, see THIRD_PARTY_LICENSES.md), their normal maps for the grain, and the
markings drawn by the shader in real metres, per the RMS (Richtlinien für die Markierung
von Straßen): 12 cm strokes, edge lines 25 cm off the kerb, the centre dash running 6 m
on and 12 m off outside built-up areas and 3 m on and 6 m off inside them (Dashed vs
DashedUrban), and Solid a line that never lifts. The surface texture tiles 4 m × 4 m
on every carriageway, so the grain keeps its shape whatever the road’s width; gravel is
rougher than the bound surfaces, so a wet Feldweg does not shine the way wet asphalt does. Every
marking is filtered over the pixel it falls in — a line that goes sub-pixel with distance
fades out instead of breaking into sparks. A module carries no road bitmaps, and two
clients of a multiplayer run agree on what a road looks like without a byte crossing the
network — roads are static module content, a pure function of the line file and the
elevation data.
Overhead lines
Section titled “Overhead lines”The power lines crossing the country are power_lines: on the line, one entry per
line — the masts in order, plus what stands at them:
power_lines: [ ( name: "Bahnstromleitung Musterstadt", object: "pylons:bahnstrommast_110_trag", // the suspension mast tension_object: "pylons:bahnstrommast_110_abspann", // the Abspannmast height: 27.5, // mast height over ground [m] root: 0.90, // half the body width at the arms arms: [(at: 23.93, half_width: 4.50, conductors: 4)], // top arm first sag: 0.03, // of the span tags: ["bahnstrommast-110"], points: [ (lat: 52.0042, lon: 9.9900, tension: true), (lat: 52.0042, lon: 9.9944), (lat: 52.0042, lon: 9.9988, tension: true), ], ),],Two things come out of one entry, and they take different routes. The masts are geo-positioned instances of a mod object standing on the terrain — which is what a tree is, so they stream, batch and drop levels of detail exactly as a wood does; three hundred Donaumasten cost what three hundred spruces cost. The conductors are geometry, cut to the terrain tiles the way the roads are, hung as catenaries between the mast tops: about 3 % of the span in sag, so a 400 m span dips twelve metres. A conductor drawn as a straight line is the single most obvious way to make a power line look wrong.
What the mesh carries is the wire’s centre line, not a ribbon around it. A conductor is always thinner than a pixel at the distance a power line is seen at, and a sub-pixel line is not thin but dotted — so the shader spreads the centre line into a band facing the camera, never under a pixel and a half wide, and gives back exactly what the widening took as coverage. A distant line stays a continuous grey hairline that fades away rather than a crawling dashed net. Nothing about it is declared in the line file.
A mast is turned so its crossarms stand across the line and it bisects the corner
where the line bends. A point with tension: true takes the tension_object — the
Abspannmast, whose insulator strings lie along the conductors instead of hanging under
them. arms is what the wire is hung on: at is the crossarm’s height over the mast’s
foot, half_width where its outermost conductor sits, and conductors how many it
carries in total, half of them each side.
The masts come from mods/pylons/, generated from the atlas in
tools/pylons/pylons.json — eighteen German types from the 380 kV Donaumast down to
the wooden low-voltage pole and the lineside telegraph pole, two role variants each,
four levels of detail. tools/pylons/README.md documents the catalogue and the
generator. They are ordinary track objects too, so the object tool places a single mast
by hand wherever a line is not what is wanted.
Import. File ▸ Import overhead lines asks Overpass for every power=line and
power=minor_line way inside the module envelope. design=* on the mast nodes says
what the mast picture is, voltage=* on the way how big it is, and frequency=16.7
that it is the railway’s own line rather than a public grid one; between them they pick
one of the atlas’s types, and the type stamps the objects, the crossarm heights and the
conductor positions into the entry. Every vertex of the way carries a mast — OSM does
not always tag them, and a bend without a mast is not a thing that exists — and a vertex
the line turns more than fifteen degrees at, like both ends of the way, carries a tension
mast. Nothing is written before the summary’s Commit, and Commit is one undo step.
import-module runs the same query headless; --no-power leaves it out.
Everything the import guessed stays editable: the mast object is a string, so a route
that wants a Tonnenmast where the import chose a Donaumast changes it there and nothing
else has to know. The select tool picks a line by any of its pylons — anywhere up the
mast, not only at its feet — and its panel carries the name, the two mast objects, the
mast height and the sag; Delete removes the line with its masts and its wires. It joins
a multi-selection like everything else, through Ctrl-click or the select circle, and the
catch filter’s Overhead lines narrows a sweep to them, which is how a bad import is
cleared in one gesture. Every line is outlined on the map, so whether the import chained
the ways or left them in pieces can be seen rather than guessed.
Overhead lines are scenery. Nothing about them is simulated, nothing is replicated, and two clients of a multiplayer run build the same masts and the same wires out of the same line file without a byte crossing the network.
Wind turbines
Section titled “Wind turbines”The turbines on the horizon are wind_turbines: on the line, one entry per machine:
wind_turbines: [ ( lat: 51.5852389, lon: 8.1421652, hub_height: 78.0, // the rotor's axis over the ground [m] rotor_diameter: 44.0, // [m] object: "wind:wea_50_enercon", // the 3D object; empty = nothing is placed yaw_deg: 250.0, // which way the nacelle looks, into the wind model: "Enercon E 44", // a label, not a key mastr: "SEE948327353778", // the unit in the Marktstammdatenregister tags: ["wea-50", "mastr"], ),],Two numbers are what a viewer perceives, so those are what the file carries: the hub height and the rotor diameter. A turbine is scenery with moving parts: it takes the same path through the tiles as a placed hut does — a scene instance on the ground, culled and levelled by its object’s own distances — but its nacelle yaws with the wind and its rotor turns, which is why it is a scene with named nodes and not an instance in the vegetation the way a mast is.
The models are mods/wind, generated by tools/wind/build_wind.mjs from the
catalogue in tools/wind/wind.json: four size classes — the German fleet’s generations,
a 600 kW machine of the nineties on a 50 m rotor, the 2 MW workhorse of the 2000s on
80 m, the 3 MW class on 115 m and today’s 5 MW machines on 150 m — in up to three builds
each: standard (the box nacelle of Vestas, Nordex, Senvion, GE and Siemens), enercon
(the drop-shaped nacelle and the green-ringed tower foot) and gitter (a lattice tower
under a 1990s Fuhrländer). Four levels of detail each, PBR maps painted rather than
photographed, the aviation marking on every machine whose tip reaches over 100 m: red
bands on the blade tips, a red band round the tower, two red lamps on the nacelle by
night. content::wind::PRESETS is a copy of the catalogue’s dimensions; the import picks
the class by the rotor and the build by the maker, and the placement scales the model to
the machine that actually stands there.
A model with moving parts is a glTF whose nodes the game moves by name — the same
convention as _LOD<n> and _NIGHT, and open to any mod that builds its own:
| node | what the game does with it |
|---|---|
nacelle |
yaws about its Y to the wind’s bearing, at a yaw drive’s half a degree a second, with a dead band |
rotor |
turns about its own Z at the speed the wind at hub height gives it — read off the node’s extras: {"rotor_diameter": 80, "rated_rpm": 18, "hub_height": 95} |
blink |
switched on the scenario clock, one second on and half a second off — under a _NIGHT node, so it is off by day. A screenshot of a lamp has to land in the lit second: --frames picks the moment |
The wind is sim_core::weather, a shared function of the scenario clock, so nothing
about the movement is in the line file and nothing crosses the network: two clients see
the same park turning the same way.
The import (File ▸ Import wind turbines…, import-module, --no-wind to skip) asks
two sources, because neither answers alone. OpenStreetMap has the position —
power=generator + generator:source=wind, surveyed by people who walked past — and
the machine’s name on about a third of them. The Bundesnetzagentur’s
Marktstammdatenregister has manufacturer, type designation, hub height, rotor
diameter and rated power for every unit in the country, and the import matches it to
what OSM mapped by the ref:mastr a mapper wrote or, failing that, by distance under a
hundred metres. A machine neither source sized is worked out from its rated power and
tagged estimated, so the file says which of its numbers were surveyed. --no-register
leaves the second question out, --small-turbines keeps the farmyard machines under a
20 m rotor that the import otherwise drops.
Which way a turbine faces is not a datum. It yaws into the wind and keeps no
direction of its own, so the import writes the prevailing German westerly (250°) for
every machine of a box, and the weather takes it from there. Change yaw_deg and that is
where the machine starts.