[4] Spline Editor

Spline Editor [Spline] is a set of tools for creating and editing linear objects on the map: roads, fences, power lines, shorelines, as well as for applying terrain deformation.

Spline is a curve along which linear objects are constructed. When placed, the spline automatically adjusts to the terrain, ensuring precise conformity to the surface curvature and its variations.

Spline editor window

In Gem RTS only the Road tab is available, intended for creating roads.

Road Editor

The road creation tool is part of the spline editor and is used to build the road network on the map. It allows creating roads of any shape, automatically adjusting to the terrain, and controlling their appearance through road surface material parameters.

The road editor is located on the Road tab in the spline editor window spline [4].

The tool is intended for:

  • building roads of various widths and shapes;

  • flexible configuration of road materials and textures;

  • managing the rendering priority of roads on the terrain when they intersect;

  • integrating the road network into the overall scene structure.

General Information

Work in the road editor is organized through road containers. A container stores data about a specific road and may be empty — in which case the road will not be displayed on the map. The road visually appears only after spline nodes are added to the container.

Spline — a curve constructed along defined nodes. It may include any number of nodes and precisely follows the terrain curvature, defining the shape of the road surface.

Spline nodes — control points that form the road. Each node is displayed as a wireframe sphere and has two handles for curvature adjustment.

Curvature handles — manipulators around the selected node that allow controlling the smoothness of the road bend. The handle length can be adjusted by dragging with LMB.

Legend:

  • Yellow wireframe sphere — spline nodes.

  • Blue wireframe sphere — active node: the last added or selected (current).

  • Yellow lines with small red spheres at the ends — road curvature handles.

Legend illustration for spline elements

Road Editor Interface

Road editor window

The Road window in the spline [4] tab contains the following elements:

  1. Display settings — a set of checkboxes for configuring the display of nodes and spline lines of roads.

  2. Spline list — a list of all road containers on the map. Each container stores information about one road surface.

  3. Properties panel — a list of parameters for configuring the appearance of the selected road container (width, texture density, material, etc.).

  4. Hint window — located under the Properties panel, displays the description of the selected parameter in the Properties window.

  5. Workspace

Context Menu of the Road Container List

The list of all road containers is located in the Spline list window. The context menu is used for container management. The context menu is opened with RMB in two ways depending on the action context:

  • on empty space in the list — to add a new container or clear the list of containers;

  • on the name of an existing container — to open the management menu for the selected object.

Calling the context menu for managing road containers
Illustration of invoking the context menu for managing road containers

Description of the context menu commands:

Add..

Adds a new road container to the list. To create a road, select the container and add spline nodes (control points of the selected container).

Rename..

Renames the selected road container.

Copy..

Creates a copy of the selected road container.

Delete

Deletes the selected container along with all points.

Up

Moves the selected container up in the list.

Down

Moves the selected container down in the list.

Select control points

Selects all spline nodes of the selected road, allowing simultaneous movement.

Clean points

Deletes all nodes from the selected road container. After deletion, the road can be rebuilt.

Clean a road list

Deletes all created containers from the map and the list.

The selected node can be moved along the map surface. The entire road surface can also be moved by selecting all spline nodes using the Select control points command in the container context menu.

Hotkeys for working with spline nodes:

Control
Description

LMB

Selects a node on the map. Dragging while holding LMB on the selected node moves it along the map surface.

Ctrl + LMB

Adds a new node. If the edge node is selected — a new node is added at the specified map location. If clicked on a line between nodes — a new node is inserted into the spline.

RMB

Opens the context menu.

Context menu commands for spline nodes

The context menu opens with RMB on a node sphere.

Join nodes

Delete the selected node and connect the adjacent ones.

Split road

Split the spline into two parts.

Cancel

Cancel the action.

Creating a Road

1

Create a road container

  1. RMB on empty space in the -Spline list- window → call the context menu and select Add...

  1. In the Input dialog, enter the container name and confirm — the name will appear in the -Spline list- window.

2

Add road nodes to the container

  1. Select the name of the created container from the list.

  2. In the editor workspace, use Ctrl + LMB to add the first control point on the terrain at the desired map location — a blue sphere of the first spline node will appear.

  1. Hold Ctrl and use LMB to add more nodes, shaping the road line as required. The selected node is displayed as a blue sphere, all others as yellow.

3

Adjust road curvature and add detail at turns

  1. Add, delete, or move spline nodes to refine the road shape.

  2. Use handles to adjust road curvature smoothness at turns.

  1. To properly display the road on sharp turns, increase the terrain mesh density. Go to the land [3] tab and select the Polygons tool. Adjust the Level parameter and use the brush to add polygons at the road turn area, improving rendering accuracy.

4

Configure road surface appearance

  1. Select a material for road surface visualization.

  1. Adjust other spline parameters.

Road Surface Parameters

The Properties panel displays road surface parameters for the selected container. Below the panel is a hint window with a short description of the selected parameter.

Parameter
Description

Road Width (Half Width)

Road width, displayed as solid lines. Depends on the selected texture size. When the texture or Pixel Density changes, the width recalculates automatically. Measured in meters.

Pixel Density

Texture pixel density per meter. When the texture or Road Width changes, the value recalculates automatically.

Alpha Distance

Distance from the road edge to the falloff point. Measured in meters. Not supported in ground materials (no alpha channel).

Order

Defines the rendering priority of the road relative to other roads and decals on the terrain.

Materials

Road surface material. Supports PBR and legacy Phong (for backward compatibility). The list of fine-tuning parameters depends on the selected material.

Diffuse Texture

File name of the road surface diffuse texture.

Diffuse Color

Diffuse color of the texture, set manually.

Opacity

Transparency coefficient from 0.0 to 1.0. 0.0 — fully transparent surface, 1.0 — fully opaque.

AO Rate

Influence of the Ambient Occlusion (shading) map.

Metallic

Level of metallic reflection of the road material.

Roughness

Surface roughness parameter.

Name

Road name displayed in the spline list.

Falloff (folder)

Additional falloff properties. Currently under development and unavailable for editing in the current engine version.

Road Editor Features

Last updated