Latest news
TutorialsUnreal Engine

Cleaning Splines and Creating Spline Meshes with Unreal Engine PCG

This guide explains how to reduce unnecessary control points on splines and configure mesh generation along spline segments in Unreal Engine PCG. The examples are based on official Python API documentation for different engine versions.

Modular edging arranged along a winding spline in an architectural terrain modelAI image
Representative image, generated with AI.Image: 3dsınıfı / FCA AI

In brief

  1. PCGCleanSplineSettings provides options for removing redundant control points at overlapping locations or along straight sections.
  2. PCGSpawnSplineMeshSettings creates a Spline Mesh Component for each segment of a spline.
  3. The cleaning documentation is for Unreal Engine 5.7’s experimental Python API, while the mesh generation documentation is for 5.5.
  4. Mesh setting overrides are supported at the data level; per-control-point overrides are not supported.

What will you learn in this guide?

This guide covers options for editing spline data and creating meshes along splines using Unreal Engine’s Procedural Content Generation (PCG) tools. In the first section, we’ll look at PCGCleanSplineSettings, which helps remove redundant control points that overlap or lie along the same straight line. Then we’ll explain how the PCGSpawnSplineMeshSettings class creates mesh components on spline segments.

The goal here is not to build a specific architectural model step by step, but to understand what the two sets of settings do and which decisions they affect in a production workflow. The documentation describes the classes’ properties, but does not provide a complete Python script or editor menu path for setting up a specific PCG graph. The steps below are therefore a suggested workflow based on the documented properties.

Requirements and version notes

The two API pages cited here cover different Unreal Engine versions: the spline-cleaning class appears in the experimental Python documentation for Unreal Engine 5.7, while the spline mesh generation class is documented in the experimental Python documentation for 5.5. This does not mean the features are available in the same form in the same version, or that the two classes have been tested together. Check the API documentation for the version used in your project.

Both classes are defined under the PCG module. The cleaning class is based on PCGSettings, as are the mesh generation settings. The documentation does not specify account or licensing requirements. If you plan to use PCG settings through Python, refer to the Python API documentation for your chosen version. Since the documentation does not include a ready-to-use script example, no executable code is provided here.

Workflow

  1. Define the spline data and your goal. First, determine what geometric purpose the spline serves and what kind of mesh you want to generate along it. For example, a landscape boundary, road edge, or linear architectural element could be represented with a spline; however, the mesh to use and the project setup are not specified in this documentation. At this stage, the goal is to consider which points or sections actually affect the shape before editing the spline.

  2. Choose the cleaning behavior. PCGCleanSplineSettings handles two main cases for removing redundant control points along a spline: points at the same location, and points lying on the straight section between the previous and next points. remove_collinear_control_points controls whether points that do not affect the final spline calculation on straight sections are removed. fuse_colocated_control_points merges points that fall within a specified distance threshold in world space.

  3. Set thresholds carefully. colocation_distance_threshold sets the distance threshold for deciding whether two control points count as being at the same location. collinear_angle_threshold sets the angle threshold used to determine whether a point is collinear with the line segment between the previous and next points. The documentation describes the type and function of these properties, but does not recommend specific values for a given project. Test the thresholds against your scene data to ensure they preserve the spline’s shape.

  4. Check the measurement space and angle units. use_spline_local_space selects whether distance is measured in the spline’s local space instead of world space. When use_radians is enabled, the angle threshold is interpreted directly in radians; when the property changes, the current CollinearAngleThreshold value is converted automatically. Keep this unit conversion in mind when transferring values manually.

  5. Evaluate mesh generation along the cleaned spline. PCGSpawnSplineMeshSettings creates a Spline Mesh Component for each segment on the given spline. If the goal of cleaning is to remove ineffective points without changing the geometry, evaluate the cleaning settings before mesh generation. The source documentation does not show how to connect these two classes in a specific graph, so this ordering is a workflow suggestion, not a ready-made connection diagram.

  6. Review mesh properties and loading. spline_mesh_descriptor provides the mesh component descriptor, while spline_mesh_params provides the spline mesh parameters. When synchronous_load is enabled, synchronous loading of meshes and materials is forced. Consider how this option affects loading behavior in your project; the documentation gives no performance results or guidance on when it should be used.

  7. Note the limits on overrides and post-processing. spline_mesh_override_descriptions specifies overrides for the spline mesh descriptor. The documentation explicitly states that, for now, only data-wide attributes are supported and per-control-point overrides do not work. post_process_function_names accepts a list of functions to call on the target actor after the mesh is created. These functions must have no parameters and must be marked CallInEditor.

Common mistakes

  • Treating the 5.5 and 5.7 documentation as guarantees for a single version: The two classes are documented for different versions. Verify each feature separately in the version you use.

  • Increasing thresholds without considering their effects: Distance and angle thresholds affect cleaning decisions. The sources do not specify universally ideal values; check whether the spline’s shape is preserved.

  • Expecting per-control-point overrides: The mesh override documentation says this use is not supported. Account for the data-wide limitation when planning your requirements.

  • Overlooking changes to use_radians: When the angle unit changes, the current threshold is converted automatically. When transferring a value from another setting or workflow, check which unit is being used.

  • Assuming editor steps that are not documented: These sources describe classes and properties; they do not provide a specific node layout or executable Python example.

What does this offer architecture, interior design, and archviz workflows?

Teams that use splines to generate roads, curbs, railing-like linear elements, or landscape boundaries may benefit from removing ineffective control points and creating meshes along segments. Use the cleaning settings with the goal of preserving the geometry, and evaluate the chosen descriptor, parameters, and loading behavior separately for mesh generation. API compatibility is especially important for teams working across multiple Unreal Engine versions.

The documentation does not specify hardware requirements, performance gains, or licensing terms. As a result, it is not possible to draw conclusions about how spline cleaning or synchronous loading will perform on a particular computer. The most cautious approach is to test settings for large scenes in the actual project and target version, and to verify compatibility before adding experimental Python API features to a production workflow.

Next steps

First, open the PCG Python API documentation for your chosen Unreal Engine version and compare the properties of both classes in that version. Then, change the control-point cleaning settings on a small test spline and observe the effect on its shape. For mesh generation, review the descriptor, parameters, and limits on data-wide overrides. Before moving to a production scene, verify that the functions are available and produce the expected results in the version used by your project team.

Sources and licensing

This guide was adapted into Turkish using the PCGCleanSplineSettings description in Epic Games’ Unreal Engine 5.7 experimental Python API documentation and the PCGSpawnSplineMeshSettings description in the Unreal Engine 5.5 experimental Python API documentation. Both sources are official documentation, and their source records list the license as free.

Sources

2 sources
D
dev.epicgames.comdev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGCleanSplineSettings
Summary
D
dev.epicgames.comdev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/PCGSpawnSplineMeshSettings
Summary

Source texts are not republished; short quotes are marked, everything else is our own summary and commentary.

3dsınıfı’s take
3dEditor’s assessment

Evaluating spline cleaning and segment-based mesh generation in the same production pipeline may make it easier to edit repeated linear elements. For architecture and archviz teams, the main value lies in testing the settings against the scene and the spline’s intended purpose; the documentation provides no ready-made threshold values or performance measurements.

It is not possible to draw conclusions from these sources about the initial cost for offices and students in Turkey; licensing terms and hardware requirements are also not specified. Before making a production decision, consider the version differences—particularly that the 5.5 and 5.7 documents cover separate classes—and note that the API appears in the experimental Python documentation.

Frequently asked questions

What is Unreal Engine PCGCleanSplineSettings used for?

It provides settings for removing control points that are at the same location or are redundant along straight sections of a spline. Distance and angle thresholds determine which points are included.

How does PCGSpawnSplineMeshSettings generate meshes along a spline?

It creates a Spline Mesh Component for each segment of the given spline. The documentation covers settings such as the mesh descriptor, spline mesh parameters, and synchronous loading.

Can spline mesh overrides be applied per control point?

According to the documentation, overrides currently support data-wide attributes only; per-control-point overrides do not work.

Comments and the forum are in Turkish.Join the discussion
+

Related news