Skip to main content

Splines Overview

A spline is a smooth line through points that you place, called knots. In RustEdit you use splines for Rust's roads, rivers, rails and power lines, for APC and cargo ship routes, and, with RustEdit Pro or higher, to shape the terrain or place prefabs along a line.

A map with a selected road spline in spline edit mode, its knots and the spline widget

How to make a spline​

  1. In the Content Browser, open the Splines folder and drag a shape into the scene view, for example Linear Spline. RustEdit places a new spline entity and selects it. See Make a spline entity.
  2. In the Inspector, click the component button for what the splines are for, for example Path.
  3. In the Splines table, pick the spline's Type in its row, for example Road. See Set a spline's type.
  4. Click the row to see the spline's settings under the table, in tabs.
  5. To change the line, turn on spline edit mode and move its knots. See Editing Splines.

To draw your own line instead of a shape, place Empty Spline and draw it.

note

The component buttons, the Splines table and the settings of the selected spline show when you select a spline entity. The knot list in the Knots tab shows only in spline edit mode. See Spline Entity.

Spline entities​

Splines live in a spline entity. A spline entity is an object in the scene, like a prefab. It shows in the Hierarchy, you can move and rotate it, and it is saved with the scene.

  • One spline entity can hold several splines. For example, a road network can be one entity with many splines whose ends are linked.
  • Each spline is a list of knots. The curve goes through the knots. Each knot has two tangents: handles that set how the curve bends at the knot.
  • The Path, Terrain, Prefab and None buttons in the Inspector set what the entity's splines are for. Each spline of the entity then gets its own type, such as Road or River.

A spline entity has one of these buttons picked at a time. To have roads and a terrain shape, use two spline entities.

The kinds of spline​

Component buttonTypesWhat the splines doTier
NonenonePlain splines. They only draw a line. With RustEdit Pro or higher, the terrain graph's Spline Mask node can use them as a mask.Free
PathRoad, River, Rail, Powerline, APC, Cargo Path, Cargo Stop, NPC PathRust's own paths, and the routes of the APC, the cargo ship and NPCs. See Path Types.Free
TerrainRoad Bed, Ridge / Canyon, Shape Area, Paint Area, Graph ProfileShape and paint the terrain along the line or inside it. See Terrain Splines.RustEdit Pro
PrefabPrefab Line, Prefab AreaPlace prefabs along the line or inside it. See Prefab Splines.RustEdit Pro

Without RustEdit Pro or higher, the terrain and prefab types are not in the Type list. A scene that has them still opens: the splines stay and show their type, but they do not change the terrain or place prefabs.

Show or hide all splines​

Splines can hide the map while you work on other things. Click the arrow next to the Show gizmos button in the scene view's header, and tick or untick Splines. See Gizmos.

  • On: every spline is drawn.
  • Off: only the splines of the selected spline entities are drawn. The Show gizmos button does the same for splines and all other gizmos.

This hides the spline lines and the drawings that paths add, such as the cargo ship's arrows and the APC checks. Road, river and rail meshes stay. RustEdit keeps the setting for the next time you start it.

Spline lines far from the camera fade out. Overlay Distance in the Camera settings sets where, 1000 m by default. See Settings. On a big map with many paths, a lower value or hiding the splines makes the scene view faster. See The Performance Panel.

Saving and exporting​

Spline entities are saved in the scene file with all their knots and settings. When you export a map, each kind goes to its own place:

SplineIn the exported map
Road, River, Rail, PowerlineRust's own path list, which the game reads.
APC, Cargo Path, Cargo Stop, NPC PathRustEdit's data in the map, as points spaced along the spline. See APC Paths, Cargo Paths and NPC Paths.
Terrain splinesTheir changes are part of the exported terrain. The splines themselves go into RustEdit's data in the map, so RustEdit can open them again.
Prefab splinesThe placed prefabs are exported like any other prefab, in their group. The splines themselves go into RustEdit's data in the map.
Plain splines (no type)RustEdit's data in the map, as their curves in the world, so the server can follow them.

RustEdit's data is only written when you export with In RustEdit data. With In the map, the APC, cargo and NPC splines and the other splines that are not Rust paths are lost. See In the map or in RustEdit data.

When you open a map, RustEdit turns each road, river, rail and power line of the map into a spline entity named after it, for example "Road 1". A map that RustEdit 2 exported with In RustEdit data also gets these back:

  • The APC and cargo splines, made from the exported points with fewer knots.
  • The NPC paths, made from their curves, with their stop points and speeds.
  • The terrain splines, with Apply off. The terrain already has their changes, so they do not change it a second time. See Terrain Splines.
  • The prefab splines, with their prefabs in their group. See Prefab Splines.

For what else comes back when you open an exported map, see Scenes and Maps.