Road Spline Types

The editor offers the user some different ways by which roads can be represented, each of which have their advantages and disadvantages.

Spline Types Spline Types

The type can be toggled using the dedicated button on the Road Edit Window, highlighted in the following image.

Spline Type Toggle Button Spline Type Toggle Button

Cubic Spline Roads:

This type of road is the default used when ‘spline road’ is selected. As the user draws nodes, adding them to the road which is being built, a cubic polynomial spline is fitted through the nodes. Specifically, we use splines of the Catmull-Rom type. These splines have favourable stability properties, which make them very useable for representing roads. The elevation component of the spline is computed separately, which is done to enforce monotonicity (this prevents vertical overhanging in the road’s appearance).

Roads created with cubic splines are very malleable, and these splines can represent most curvatures. They are good general choice. However, the constraints used when fitting the road to the nodes can force some places on the road into positions which make the road less-realistic. The driving experience of such roads can also be awkward.

The following image highlights some key properties of spline roads.

Spline Roads Spline Roads

Line-Spiral-Arc-Spiral-Line Roads:

A second type of road spline attempts to provide a straighter, more-realistic road. This is done using some of the same types of geometric primitives used by civil engineers when designed modern road networks, and is also supported by ASAM OpenDRIVE.

This type of road is built in sequences: Line -> Spiral -> Arc -> Spiral -> Line.

The benefit of creating roads in this way is due to the curvature properties:

Lines have zero curvature, which corresponds to a steering wheel position of zero when driving (wheel centered, wheels straight ahead).

Circular Arcs have a constant curvature, which corresponds to a fixed steering wheel position (not zero, centered) when driving.

Clothoid Spirals have a linearly-changing curvature, which corresponds to a smooth hand transition on the steering wheel, optimising the driver’s comfort.

The spirals are used to transition between the lines (zero curvature) and the arcs (constant curvature), and vice versa.

The following image highlights some key properties of LSASL roads.

LSASL Roads LSASL Roads

Roads which are rendered with this spline type will appear straighter on their edges, and can be more rectilinear if required (eg allowing nice 90 degree corners).

The Node Edit Window contains an extra slider for LSASL nodes. This is the Arc Radius Slider, which allows the tightening/slackening of the road corners. This is not available for the first or last nodes of LSASL roads, since there are no arcs there. The effect of changing this slider can be seen in the image below.

Arc Radius Arc Radius

To switch between cubic splines and Line-Spiral-Arc-Spiral-Line splines, a convenient toggle button is provided on the Road Edit Window. This can be done before the road is drawn, or an already-created road can be changed over to use the different spline type.

Note: Our implementation does not actually use true Clothoid spirals, but instead approximates these with cubic splines (fitting Clothoid spirals often has a lot of error involved outside of special cases). The difference should be fairly negligable to the user, however.

Arc Roads:

A third type of road is singular arc sections. A dedicated button on the Roads List Window is used to create these, as illustrated below.

Create Arc Road Button Create Arc Road Button

Arcs a generated in a similar way to spline roads, but are limited to having three nodes only. This is because it requires three (non-collinear) points to define a circle, and from there the circular arc section can be computed. The nodes can be translated (moved on the map), which will change the nature of the arc and its curvature/length, and elevations at each end can be changed to generate upwards or downwards arc slopes. Note, though, that the elevation of the center node is not used.

Since the road is represented discreetly (piecewise-linear polyline), the user may need to alter the granularity with the ‘arc granularity’ slider, in order to get a better representation of the curved nature of the arc - if this is too high, the arc may obviously look like a connection sequence of line sections (which it is - the user can make them small enough, however, so as not to be very noticeable).

The following image highlights some key properties of Arc Roads.

Arc Roads Arc Roads

Last modified: May 17, 2024

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.