For each of the line segments - uses the pathfinding algorithms on the terrain heightmap to connect it's start and end. Pathfinding takes into account terrain height and incline, and tries to find a bias between the resulting path total elevation, it's length and it's curvature. Tries to make the line not too long, not too winding and as much flat as possible. If there is a mountain or a in a line's way it will try to get around it. If one of the line's ends is in the mountain it will create a serpentine to make the line not too inclined.
Internally uses A-Star pathfinding algorithm.
Pathfinding will add additional nodes to spline. The nodes density is determined by A-Star grid resolution: for each of the grid cells it will create a new node. Each of the created nodes is placed on the terrain level. Since the A-Star grid is made of square cells, the resulting path bending could be a bit uniform - it will be either strait or will make only 45 or 90 degree tirns. This is usually fixed by applying the Relax generator, that will make a spline lokk more natural.
Pathfinding is one of the slowest spline nodes, so try keepoing it's settings optimized, especially the resolution one.
- Draft: the initial line segments that determine how pathfinding source and destination points. Usually it will be the Interlink segments, but in some cases it could be handy to use Pathfinding on already existing splines - for example, to add some detail to roads.
- Height: the map that determines the terrain height. This re-scaled map will be used as A-Star grid, and each of the cell will estimate it's "value" based on heightmap elevation.
- Resolution: the density of the A-Star grid. Determines the precision of the pathfinding algorithm, but at the same time greatly affects it's perfformance
- Distance Factor: determines the role of the p[ath length in a length/incline/curvature bias. If set 0, the spline length doesn't matter, and pathfinding will just try to find most flat and straight line, no matter if it will go through all of the map. The maximum value is not limited, and set relativly to other factors - for example, setting all actors to 1000 will give the same effect as setting them all to 1.
- Elevation Factor: determines the role of the incline elevation in a length/incline/curvature. When set to 0 will not take terrain elevation change into account, and with value increase will try to find more flat path. The maximum value is not limited, and set relativly to other factors.
- Straighten Factor: determines the role of the number of line turns and their sharpness. When set to 0 will not take turns into account, with value increase will try to find more straight lines. The maximum value is not limited, and set relativly to other factors.
- Max Elevation: will count the pixels with this incline (and higher) as impassable. Will not lay the spline on these cells. Note that in some cases there could be no path found (for example, when one of the points is placed on a top of steep peak). The lines with no path found won't be included in the result.