Roads and Rivers
A Road, River or Rail spline is one of Rust's own paths. RustEdit draws it with Rust's mesh, and its Apply switches shape and paint the ground along it, the way Rust's map generator does. This page explains the settings that roads, rivers and rails share. Rail roles, branches and sidings are on Rails.
Make a road, river or rail
- Make a spline entity and draw the line. See Editing Splines.
- In the Inspector, click Path in the component buttons.
- In the Splines table, set the spline's Type to Road, River or Rail. RustEdit draws Rust's mesh along the line. The new path has all its Apply switches on, so the ground along it changes too.
- Click the row, and set the options in its tabs. See Options.
The mesh and the export
RustEdit draws a road, river or rail with Rust's own mesh. While you drag a knot, a tangent or the spline entity, the mesh stays where it was and the spline line shows the new shape. RustEdit makes the mesh again when you let go of the mouse button.
On the nodes or on the terrain
In the game, a road sits on the terrain: Rust puts both edges of the road on the ground all along it. Rivers and rails follow their nodes, and only their very ends sit on the ground. RustEdit draws rivers and rails the same way.
A road follows its nodes, so you can move a knot up or down to change the road's height. Switch on Snap Mesh to see the road on the terrain, the way it looks in the game. A road on the terrain is made again when the ground under it changes: a brush stroke, a prefab or monument with terrain modifiers, a path's Apply Height, or an undo. After an edit it waits until the new terrain is built, so it does not jump.
Like the game, roads and rails have three levels of detail. In RustEdit the full mesh shows up to 150 m, a simpler mesh from 150 m, the simplest mesh from 400 m, and nothing past 2000 m. The game uses shorter distances, because its camera is lower. After an edit, RustEdit makes the full mesh first and the simpler meshes a moment later. Rivers have one mesh.
When you export the map, each one goes into Rust's path list with its settings. Rust finds paths by name, so RustEdit names them by type and number: "Road 0", "Road 1", "River 0" and so on.
When a server loads the map, Rust builds the road, river and rail meshes from these paths. Rivers get their water, and trains run on the rails. A server does not change the terrain from the paths: the height, splat and topology stay as they are in the exported map. To shape the ground under a path, use its terrain modifiers.
Options
| Option | What it does |
|---|---|
| Type | What the spline is. |
| View Nodes | Shows the points spaced along the path, the points the export writes. Not saved. |
| Snap Mesh | Roads only. On: the road sits on the terrain, as in the game. Off: it follows its nodes. See On the nodes or on the terrain. |
| Snap Start, Snap End | Rails only. On: that end of the track sits on the terrain, as in the game. Off: it goes into a tunnel or a monument. Not used on a closed spline. |
| Width | The width of the path, in meters. |
| Random Scale | The width changes along the path, between the full width and the width times this value. |
| Mesh Offset | The height of the mesh over the spline. Negative values put it lower. |
| Inner Padding, Outer Padding | The padding from the edges of the path for terrain modifiers. |
| Inner Fade, Outer Fade | The fade distance from the inner and outer edges of the path for terrain modifiers. |
| Terrain Offset | How far the ground goes over or under the spline's height in the middle of the path. Negative values put it lower. |
| Splat Layer | The splat of the path. |
| Topology Layer | The topology of the path. |
| Topology Side Layer, Topology Side Width | The topology beside the path and its width. |
| Apply Height, Apply Splat, Apply Topology, Apply Topology Side | Change the terrain along the path, live. See Terrain modifiers. |
| Bake | Writes the applied terrain modifiers into the terrain and turns them off. |
The export writes Snap Start, Snap End, Width, the paddings and fades, Random Scale, Mesh Offset, Terrain Offset, Splat Layer and Topology Layer into the map. The side topology, Snap Mesh and the Apply switches stay in the scene file only. On a server, a road always sits on the terrain.
Roads in a map you open follow their nodes. Switch on Snap Mesh on a road to see it as in the game.
Rust uses the terrain settings (the paddings and fades, Terrain Offset, Splat Layer and Topology Layer) only on maps it generates itself. On a map that a server loads, they change nothing.
Terrain modifiers
A road, river or rail can change the terrain along it, the way Rust's map generator does, with its Apply switches. A new road, river or rail has all four switches on. Paths from an opened map, and paths in a saved scene, keep the switches they had.
| Switch | What it does |
|---|---|
| Apply Height | Moves the ground to the spline's height, plus Terrain Offset in the middle of the path. The offset is full inside Inner Padding and Inner Fade. Past Outer Padding the change fades out over Outer Fade. |
| Apply Splat | Paints the Splat Layer along the path, out to Outer Padding. |
| Apply Topology | Adds the Topology Layer along the path. |
| Apply Topology Side | Adds the Topology Side Layer out to Topology Side Width from the path's own topology, the way Rust's map generator does. Only Field, Beach and Forest ground gets the side layer. Ground steeper than 40° in that band gets Cliff. |
While a switch is on, the change is live. Move a knot or change a setting, and the terrain follows when you let go of the mouse button. RustEdit builds only the ground that the changed paths reach, where they were and where they are now. Turn the switch off, and the terrain is as it was. The change is not written into the map's own terrain until you click Bake.
Bake writes the switched-on changes into the terrain and turns the switches off. After that, the change stays when you edit the path. Each switch and each bake is one undo step. For how bake works for every kind of terrain change, see Terrain Overview.
- The width changes along the path with Random Scale, as Rust's does. A river also gets wider along its length.
- Each end of an open path fades in over half its width. A closed path has no ends.
- The changes go on after your terrain edits and the terrain changes of placed prefabs. Rivers go first, then roads, then rails. Terrain splines go over them.
- The export writes the changes into the map's terrain. The paths in the map come back with their switches off, so opening the map does not change the terrain a second time.
Older versions of RustEdit 2 saved the wrong layer when you picked a Splat Layer, Topology Layer or Topology Side Layer. RustEdit corrects most of these paths when it opens the scene or map. A few cannot be told apart from a real layer: in files from an older version, check the roads, rivers and rails that show Dirt, Snow or Sand as the splat, or Field, Cliff, Summit, Beachside or Beach as a topology, and pick the layer again if it is wrong.
Defaults
A new path starts with Rust's values for its type.
| Setting | Road | River | Rail |
|---|---|---|---|
| Width | 10 | 8 | 4 |
| Snap Mesh | Off | – | – |
| Snap Start, Snap End | – | – | On |
| Random Scale | 0.75 | 0.75 | 1 |
| Mesh Offset | 0 | -0.5 | 0 |
| Terrain Offset | -0.125 | -1.5 | -0.125 |
| Inner Padding, Outer Padding | 1, 1 | 1, 1 | 1, 1 |
| Inner Fade, Outer Fade | 1, 8 | 16, 64 | 1, 32 |
| Splat Layer | Gravel | Stones | Gravel |
| Topology Layer | Road | River | Rail |
| Topology Side Layer | Roadside | Riverside | Railside |
| Topology Side Width | 8 | 8 | 8 |
| Apply Height, Apply Splat, Apply Topology, Apply Topology Side | On | On | On |
A road, river or rail that a procedural run makes gets Rust's own side width: 6 points of the topology map, which is about 8.8 m on a 3000 m map.
Path objects
Rust's map generator places objects along its roads, rivers and power lines. RustEdit can place the same objects along your path, with Rust's own settings, from the path's Objects tab. Rails have none: Rust places no objects along rails.
| Path | Object sets |
|---|---|
| Road | Road Substations (at the road's ends), Telephone Poles, Road Objects (signs, bus stops, electrical boxes) |
| River | River Objects (the river's sounds, its source and its splash) |
| Power line | Power Line Substations (at both ends), Transmission Towers |
- Select the spline entity and click the path's row in the Splines table.
- Click the Objects tab.
- Switch off the sets you do not want.
- For a road or river, set At Start and At End: only an end with its switch on gets end objects, such as a substation.
- Click Spawn Objects.
The objects go under an empty entity under the path's spline entity in the Hierarchy, for example "Road 3 objects 1". They move, hide, lock and delete with the path. They are normal prefabs, so you can move or delete one of them.
- Respawn Objects removes the path's objects and places them again along the path as it is now. Use it after you change the path. The same path gets the same objects.
- Remove Objects deletes them.
- Each click is one undo step.
The objects follow Rust's rules. Like Rust, RustEdit skips places where the ground does not fit, for example on a road, beside a road, on a monument or on a river. Rust places objects along main and side roads, not along trails (roads narrower than 5 m). The objects are placed on the terrain as it is now, with its live terrain changes.
A duplicated path takes its own copy of the objects. An exported map keeps them as normal prefabs. With the RustEdit data in the map, opening it again puts them back under their path.
Roads
- A road narrower than 5 m has no mesh.
- A road wider than 10 m uses the asphalt of Rust's ring road.
- Rust gives each road a rank: a closed road or one wider than 10 m ranks like the ring road, and one narrower than 5 m ranks lowest.
- To make an APC path that follows a road, use Copy Shape From Road on the APC path. See APC Paths.
Rivers
Like Rust's rivers, a river gets wider along its length, and widest at its last knot. Draw a river from its source to the sea. Rivers also set the way water flows, for example for water wheels.