# \[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.

<figure><img src="/files/O7qjHIiQI5DY88VGzNAs" alt="Spline editor window"><figcaption></figcaption></figure>

{% hint style="info" %}
In Gem RTS only the `Road` tab is available, intended for creating roads.
{% endhint %}

## 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.

<figure><img src="/files/91t1GO6EuxTA2gAATSIq" alt=""><figcaption><p>Legend illustration for spline elements</p></figcaption></figure>

### Road Editor Interface

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252F6M3SyZgN910Ei2Czo20M%252F20250917132124_1.jpg%3Falt%3Dmedia%26token%3Dd6bcfd61-1f04-4a98-a8cf-9c8a265321cb&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=67c30ef7&#x26;sv=2" alt=""><figcaption><p>Road editor window</p></figcaption></figure>

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.

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252F3fXj9c7tzEl1dS0w0xxn%252F%25D0%2592%25D1%258B%25D0%25B7%25D0%25BE%25D0%25B2%2520%25D0%25BA%25D0%25BE%25D0%25BD%25D1%2582%25D0%25B5%25D0%25BA%25D1%2581%25D1%2582%25D0%25BD%25D0%25BE%25D0%25B3%25D0%25BE%2520%25D0%25BC%25D0%25B5%25D0%25BD%25D1%258E%2520%25D1%2583%25D0%25BF%25D1%2580%25D0%25B0%25D0%25B2%25D0%25BB%25D0%25B5%25D0%25BD%25D0%25B8%25D1%258F%2520%25D0%25BA%25D0%25BE%25D0%25BD%25D1%2582%25D0%25B5%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B5%25D1%2580%25D0%25B0%25D0%25BC%25D0%25B8%2520%25D0%25B4%25D0%25BE%25D1%2580%25D0%25BE%25D0%25B3.jpg%3Falt%3Dmedia%26token%3D1ae05629-2d39-4237-af39-a302dc2e6ed3&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=d65fa2aa&#x26;sv=2" alt="Calling the context menu for managing road containers"><figcaption><p>Illustration of invoking the context menu for managing road containers</p></figcaption></figure>

#### Description of the context menu commands:

<table data-header-hidden><thead><tr><th width="249.62890625" valign="top">Command</th><th>Description</th></tr></thead><tbody><tr><td valign="top"><code>Add..</code></td><td>Adds a <strong>new road container</strong> to the list.<br>To create a road, select the container and add spline nodes (control points of the selected container).</td></tr><tr><td valign="top"><code>Rename..</code></td><td>Renames the selected road container.</td></tr><tr><td valign="top"><code>Copy..</code></td><td>Creates a copy of the selected road container.</td></tr><tr><td valign="top"><code>Delete</code></td><td>Deletes the selected container along with all points.</td></tr><tr><td valign="top"><code>Up</code></td><td>Moves the selected container up in the list.</td></tr><tr><td valign="top"><code>Down</code></td><td>Moves the selected container down in the list.</td></tr><tr><td valign="top"><code>Select control points</code></td><td>Selects all spline nodes of the selected road, allowing simultaneous movement.</td></tr><tr><td valign="top"><code>Clean points</code></td><td>Deletes all nodes from the selected road container.<br>After deletion, the road can be rebuilt.</td></tr><tr><td valign="top"><code>Clean a road list</code></td><td>Deletes all created containers from the map and the list.</td></tr></tbody></table>

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**        | <p>Selects a node on the map.<br>Dragging while holding LMB on the selected node moves it along the map surface.</p>                                                                         |
| **Ctrl + LMB** | <p>Adds a new node.<br>If the edge node is selected — a new node is added at the specified map location.<br>If clicked on a line between nodes — a new node is inserted into the spline.</p> |
| **RMB**        | Opens the context menu.                                                                                                                                                                      |

#### Context menu commands for spline nodes

The context menu opens with RMB on a node sphere.

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252FzG3t6saJFa2GGdW4wDto%252F%25D0%259A%25D0%25BE%25D0%25BD%25D1%2582%25D0%25B5%25D0%25BA%25D1%2581%25D1%2582%25D0%25BD%25D0%25BE%25D0%25B5%2520%25D0%25BC%25D0%25B5%25D0%25BD%25D1%258E%2520%25D1%2583%25D0%25B7%25D0%25BB%25D0%25B0%2520%25D1%2581%25D0%25BF%25D0%25BB%25D0%25B0%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B0.png%3Falt%3Dmedia%26token%3D0982faa3-e393-420b-b500-e288ae2e137e&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=c1c2791c&#x26;sv=2" alt=""><figcaption></figcaption></figure>

| `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

{% stepper %}
{% step %}
**Create a road container**

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

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252FRIFfBpsdwXxrUcFLL3lv%252F%25D0%2594%25D0%25BE%25D0%25B1%25D0%25B0%25D0%25B2%25D0%25BB%25D0%25B5%25D0%25BD%25D0%25B8%25D0%25B5%2520%25D0%25BD%25D0%25BE%25D0%25B2%25D0%25BE%25D0%25B3%25D0%25BE%2520%25D0%25BA%25D0%25BE%25D0%25BD%25D1%2582%25D0%25B5%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B5%25D1%2580%25D0%25B0%2520%25D0%25B4%25D0%25BB%25D1%258F%2520%25D1%2581%25D0%25BF%25D0%25BB%25D0%25B0%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B0%2520%25D0%25B4%25D0%25BE%25D1%2580%25D0%25BE%25D0%25B3%25D0%25B8.png%3Falt%3Dmedia%26token%3D4bc5678d-f175-4016-b5a0-b3bbf3386a64&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=f792176c&#x26;sv=2" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252FYvWLdGGL2M2vouff4hYT%252F%25D0%2592%25D0%25B2%25D0%25BE%25D0%25B4%2520%25D0%25B8%25D0%25BC%25D0%25B5%25D0%25BD%25D0%25B8%2520%25D0%25BA%25D0%25BE%25D0%25BD%25D1%2582%25D0%25B5%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B5%25D1%2580%25D0%25B0%2520%25D1%2581%25D0%25BF%25D0%25BB%25D0%25B0%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B0%2520%25D0%25B4%25D0%25BE%25D1%2580%25D0%25BE%25D0%25B3%25D0%25B8%2520%25D0%25B2%2520%25D0%25B4%25D0%25B8%25D0%25B0%25D0%25BB%25D0%25BE%25D0%25B3%25D0%25BE%25D0%25B2%25D0%25BE%25D0%25B5%2520%25D0%25BE%25D0%25BA%25D0%25BD%25D0%25BE%2520Imput.png%3Falt%3Dmedia%26token%3D6dd857cd-31de-436f-a91d-7a506fc725eb&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=5c757a3e&#x26;sv=2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**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.

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252FziKnhFQaBgd3xWTs3zR9%252F%25D0%2594%25D0%25BE%25D0%25B1%25D0%25B0%25D0%25B2%25D0%25BB%25D0%25B5%25D0%25BD%25D0%25B8%25D0%25B5%2520%25D1%2583%25D0%25B7%25D0%25BB%25D0%25BE%25D0%25B2%2520%25D1%2581%25D0%25BF%25D0%25BB%25D0%25B0%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B0%2520%25D0%25B2%2520%25D0%25BA%25D0%25BE%25D0%25BD%25D1%2582%25D0%25B5%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B5%25D1%2580.png%3Falt%3Dmedia%26token%3D09ff63b1-8cb8-48f6-9f88-4a7db5758f60&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=ad9eadc3&#x26;sv=2" alt=""><figcaption></figcaption></figure>

3. 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.

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252Fgd0RO6oUatTjfgxWARWv%252F%25D0%2594%25D0%25BE%25D0%25B1%25D0%25B0%25D0%25B2%25D0%25BB%25D0%25B5%25D0%25BD%25D0%25B8%25D0%25B5%2520%25D1%2583%25D0%25B7%25D0%25BB%25D0%25BE%25D0%25B2.png%3Falt%3Dmedia%26token%3Db87e6b26-1352-482c-91b4-203e87431a5f&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=6f6f8ac6&#x26;sv=2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**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.

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252FVfqJ6SeucEUmaI4SEzn8%252F%25D0%2598%25D0%25BB%25D0%25BB%25D1%258E%25D1%2581%25D1%2582%25D1%2580%25D0%25B0%25D1%2586%25D0%25B8%25D1%258F%2520%25D1%2583%25D0%25B7%25D0%25BB%25D0%25BE%25D0%25B2%2520%25D1%2581%25D0%25BF%25D0%25BB%25D0%25B0%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B0%2520%25D0%25B4%25D0%25BE%25D1%2580%25D0%25BE%25D0%25B3%25D0%25B8.png%3Falt%3Dmedia%26token%3D8dcd10b6-0933-44cf-9836-fdf8acb539fc&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=59c602f8&#x26;sv=2" alt=""><figcaption></figcaption></figure>

3. 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.

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252F3HGbU7GxeBz2EBVlkkST%252F%25D0%2594%25D1%2580%25D0%25BE%25D0%25B1%25D0%25BB%25D0%25B5%25D0%25BD%25D0%25B8%25D0%25B5%2520%25D0%25BF%25D0%25BE%25D0%25BB%25D0%25B8%25D0%25B3%25D0%25BE%25D0%25BD%25D0%25BE%25D0%25B2%2520%25D0%25BD%25D0%25B0%2520%25D0%25BF%25D0%25BE%25D0%25B2%25D0%25BE%25D1%2580%25D0%25BE%25D1%2582%25D0%25B0%25D1%2585%2520%25D1%2581%25D0%25BF%25D0%25BB%25D0%25B0%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B0.jpg%3Falt%3Dmedia%26token%3D08c72f31-ebc2-4a19-ad0e-4a6ced1861e1&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=715ae9ab&#x26;sv=2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Configure road surface appearance**

1. Select a material for road surface visualization.

<figure><img src="https://bestway-1.gitbook.io/dokumentaciya/~gitbook/image?url=https%3A%2F%2F2052154247-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fx2fkAZ6oKGGdByFhKPpa%252Fuploads%252FOfM5oIrROVDaO33t1Y9j%252F%25D0%2592%25D1%258B%25D0%25B1%25D0%25BE%25D1%2580%2520%25D0%25BC%25D0%25B0%25D1%2582%25D0%25B5%25D1%2580%25D0%25B8%25D0%25B0%25D0%25BB%25D0%25B0%2520%25D1%2581%25D0%25BF%25D0%25BB%25D0%25B0%25D0%25B8%25CC%2586%25D0%25BD%25D0%25B0%2520%25D0%25B4%25D0%25BE%25D1%2580%25D0%25BE%25D0%25B3%25D0%25B8.jpg%3Falt%3Dmedia%26token%3De00927e4-3b33-4aa0-9a40-b788e88585e3&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=9714c590&#x26;sv=2" alt=""><figcaption></figcaption></figure>

2. Adjust other spline parameters.
   {% endstep %}
   {% endstepper %}

### 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.

{% hint style="warning" %}
Some parameters will become available in the road editor with the next update of **Men of War II**.
{% endhint %}

| Parameter                   | Description                                                                                                                                                                                |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Road Width` (`Half Width`) | <p>Road width, displayed as solid lines. Depends on the selected texture size.<br>When the texture or Pixel Density changes, the width recalculates automatically. Measured in meters.</p> |
| `Pixel Density`             | Texture pixel density per meter. When the texture or Road Width changes, the value recalculates automatically.                                                                             |
| `Alpha Distance`            | <p>Distance from the road edge to the falloff point.<br>Measured in meters.<br>Not supported in ground materials (no alpha channel).</p>                                                   |
| `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)          | <p>Additional falloff properties.<br>Currently under development and unavailable for editing in the current engine version.</p>                                                            |

{% hint style="warning" %}
The list of spline parameters depends on the selected material.
{% endhint %}

### Road Editor Features

{% embed url="<https://youtu.be/jxXq2UUWL9k?autoplay=1&_loop=1>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bestway.com.ua/editor/map-editor/4-spline-editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
