Section 10. Spline Tools

Section 10.1. Introduction

rdInst contains functions to Split, Join, Trim, Populate and Manipulate splines – both while Editing and during run-time.

During runtime, the Spline Population routines recycle the SplineMeshComponents and doesn’t change any that haven’t moved – so it can provide some impressive speeds.

During Editing, there are still speed improvements over Blueprint population and it provides an easy-to-use function to quickly get your splines populated.


Section 10.2. How to use

There’s 3 main categories for the Spline editing, covered below:

Section 10.2.1. Populating Splines

There are two methods of populating splines with SplineMeshComponents.

  1. The first simply populates the spline with the specified mesh:

You can specify a start and end distance to populate – leaving the end at 0 populates the entire spline.

Specify a Material to override the default meshes material.

The Return value is the number of SplineMeshComponents created.

2. The second function uses a list of “rdSplinePopulateData” to choose the correct Mesh and details to use for the SplineMeshComponent at the time.

If you tick “Random”, a random item from the list is selected each time – otherwise they are sequentially added, looping if needed.

Section 10.2.2. Splitting/Joining Splines

You can split a spline into multiple sub-splines – each with their own actor attached to us. This can be done at runtime or during editing.

Ticking “Call BPFunctions” calls the Split event for the SplineBlueprint from where you can update anything regarding the split.

The function returns an array of SubSplines, the first spline in that list is our own spline.

You can Manipulate the Spline now as a whole (rdInst works out which subspline to manipulate) or directly on a subspline.

If you want, you can join the splines back together with the rdJoinSpline function.

Section 10.2.3. Manipulating Splines

rdInst provides routines for changing spline points in similar ways as a normal spline – but also provides a layer above to handle subsplines.

For details on the various routines, check the Spline Reference.


Section 10.3. Tutorials

Tutorial 30 – Real-time Spline Splitting and Joining

Tutorial 32 – Populating Splines