Landscape Splines

The Spline tool creates a spline Actor that deforms a terrain mesh along it, such as for creating flat roads through mountainous terrain.

Landscape Splines are a flexible system for creating any linear feature that needs to conform to a Landscape, and can even push and pull the terrain to better facilitate building these features. They are created and edited using the spline tool in the Landscape tool.

The Spline tool is best used to make streets or paths in the environment, but in general, it can be used for any mesh that must conform to the terrain, such as cobblestone walls or long straight rows of corn.

Creating a Spline

To create a spline:

  1. In Manage mode, select the Edit Splines tool.

    Spline Tool

  2. On the currently selected Landscape, press Ctrl + Left-click to set your spline's first control point. The control point's sprite looks like a bumpy, brown-and-white boulder.

    A Spline control point

  3. Press Ctrl + Left-click again to create another control point, connected to the first by a spline segment. The selection changes to the new control point so that you can repeat this to add more control points.

    A second spline control point

To join two splines:

  • Select one spline and then Ctrl + Left-click on the other.

To split a spline:

  • Press Ctrl + Left-click on a segment. This splits the segment at that point and inserts a new control point.

You can assign a Static Mesh Actor to follow along your spline's segments.

To add a Static Mesh Actor to a spline:

  1. In the Content Browser, find and select the Static Mesh asset that you want to use with your spline.

  2. Click on a spline control point on your Landscape.

  3. In the Level Editor's Details panel, in the Landscape Spline section, next to Select all connected, click Segments. This will make sure that the Static Mesh is added to all the spline's segments.

    All Segments

  4. In the Landscape Spline Meshes section, under Spline Meshes, if there is no element, click the plus icon (Plus Icon) to add one.

    Add Mesh

  5. Expand the element you just added. Next to Mesh, click the Assign arrow icon (Assign) to assign the selected Static Mesh.

    Mesh Added

If you want to, you can also assign a Static Mesh to an individual control point by selecting that control point and assigning the Static Mesh in the Details panel, in the Mesh section.

Editing a Spline

Spline control points respond as you would expect to the translation and rotation tools, but the scale tool brings up a different UI:

Segment tangent scale tool

These are the spline tangents. If a segment is selected, it shows the tangents at each end of the segment, and if a control point is selected, it shows the tangents of all connected segments. You can adjust the scale of the tangent by dragging the end of it, which alters how curved the segment of spline is.

Applying Splines to the Landscape

The Apply Splines to Landscape button modifies the Landscape heightmap and layer weightmaps with the spline information. The heightmap is raised or lowered to fit the spline, with a smooth cosine-blended falloff on either side. This is controlled by the width and falloff properties of the spline control points, and the Raise/Lower Terrain option on the individual spline segments. The Texture layer that is painted (if any) is specified in the Layer Name property of the individual spline segments, and the painting is affected by the spline width and falloff settings in the control points.

Spline Properties

The properties of the selected control points or segments are displayed in the Level Editor's Details panel.

Control Point Properties

Property Description
Location Position of the control point relative to the Landscape it is attached to.
Rotation Rotation of the control point, controls the direction of the tangent of any attached spline segments at this point.
Width Width of the spline at this point. Shown as solid lines. Affects all connected segments.
Side Falloff The width of the cosine-blended falloff region on either side of the spline at this point. Shown as dotted lines.
End Falloff Only relevant at the end of a spline (a control point with only one attached segment), the length of the cosine-blended falloff region that smoothly ends the spline segment.
Layer Name Name of the blendmask layer to paint to when the spline is applied to the Landscape.
Raise Terrain Raises the Landscape to match spline when the spline is applied to the Landscape. Good for roads on embankments.
Lower Terrain Lowers the Landscape to match spline when the spline is applied to the Landscape. Good for rivers and ditches.

Spline Segment Properties

Property Description

Landscape Spline Segment

Connections Settings specific to the two control points this segment is attached to.
Connections Sub-Properties
Tangent Len Scale of the tangent at this point, controls how curved the segment is. Negative tangents cause the segment to connect to the back of the control point.
Socket Name Socket on the control point this segment end is connected to.
Layer Name Name of the blendmask layer to paint to when the spline is applied to the Landscape.
Raise Terrain Raises the Landscape to match spline when the spline is applied to the Landscape. Good for roads on embankments.
Lower Terrain Lowers the Landscape to match spline when the spline is applied to the Landscape. Good for rivers and ditches.

Landscape Spline Meshes

Spline Meshes The meshes to apply to the spline. Multiple meshes will be applied in random order controlled by the random seed.
Spline Meshes Sub-Properties (per mesh used)
Mesh The Static Mesh to use.
Material Overrides Overrides the Static Mesh's assigned Material with a different Material for the spline.
Center H Whether to horizontally center the mesh on the spline or use the mesh's origin.
Offset Offsets the mesh from the spline (units are in mesh-space, unscaled by the spline).
Scale to Width Whether to scale the mesh to fit the spline width or to use the mesh as-is.
Scale Multiplier to the size of the mesh. If Scale to Width is enabled, the Scale specified here is relative to the spline width; otherwise, it is relative to the mesh's natural size.
Forward Axis Chooses the forward axis of the Spline Mesh.
Up Axis Chooses the Up axis of the Spline Mesh.
Random Seed Controls the order multiple spline meshes are applied to the spline.
Enable Collision Enables collision on spline meshes.
Cast Shadow Enables the casting of shadows by the mesh.

Controls Reference

Controls Operation
Left Mouse Button Selects a control point or segment.
Shift + Left Mouse Button Selects multiple control points or segments.
Ctrl + A Selects all control points connected to the currently selected control points and/or all segments connected to the currently selected segment.
Ctrl + Left Mouse Button On Landscape, adds a new control point, connected to any selected control points.
^ With a control point or multiple control points selected, creates a segment joining any selected control points to the new control point.
^ With a segment selected, splits the segment at that point and inserts a new control point.
Del Deletes the selected control points or segments.
R Automatically calculate rotation for selected spline control points.
T Automatically flip the tangents for the selected control points / segments.
F Flips selected spline segments (only affects meshes on the spline).
End Snaps the selected control points to the Landscape below.