Master Spline - Homologation
Analyses and optimizes a master spline against road design presets to ensure geometric compliance (slope, corner radius, banking, width gradient). Provides per-frame iterative optimizers.
Analyses and optimizes a master spline against road design presets to ensure geometric compliance (slope, corner radius, banking, width gradient). Provides per-frame iterative optimizers.
Public API
| Function | Signature | Description |
|---|---|---|
M.getOptimisationIterationsPerFrame | () → number | Returns iterations per frame (default 5) |
M.analyseSpline | (spline) | Analyses spline for current metric mode, populates error arrays |
M.optimiseSpline | (spline, numIter) | Runs the optimizer for numIter iterations on the current metric |
Spline Analysis Modes
| Mode | Index | Analyser | Optimizer | Error Array |
|---|---|---|---|---|
| Slope | 0 | analyseSlope | optimiseSlope | spline.eSlopeNorm |
| Corner Radius | 1 | analyseRadius | optimiseRadius | spline.eRadiusNorm |
| Banking | 2 | analyseBanking | optimiseBanking | spline.eBankingNorm |
| Width Gradient | 3 | analyseWidth | optimiseWidth | spline.eWidthNorm |
Analysis Details
- Slope: Computes forward/backward slopes at each div point; normalizes excess over
maxSlope - Corner Radius: Uses look-ahead/behind window to compute turning radius; flags violations of
minRadius - Banking: Measures signed bank angle from normals vs tangent; flags excess over
maxBanking - Width Gradient: Checks width change per meter between consecutive div points against
maxWidthGradient
Optimization Techniques
- Slope: Random interior node selection → lerp Z toward geometric ramp
- Radius: Laplacian smoothing in XY plane
- Banking: Rotate normal around tangent by clamped step
- Width: Nudge adjacent widths toward gradient limit
-- Analyse the spline for the current metric
homologation.analyseSpline(spline)
-- Run optimizer iterations
homologation.optimiseSpline(spline, 5)Dependencies
editor/toolUtilities/geomeditor/toolUtilities/roadDesignStandards
See Also
- Master Spline - Auto Road Generation - Related reference
- Master Spline - Jump Tables - Related reference
- Master Spline - Layer Manager - Related reference
- World Editor Guide - Guide
Master Spline - Auto Road Generation
Generates roads between waypoints using A* pathfinding on the terrain heightmap grid. Handles slope avoidance, turning radius constraints, hairpin widening, and elevation optimization against road des
Master Spline - Jump Tables
Utility module containing jump tables (dispatch maps) for fast cross-tool operations between the Master Spline and compatible linked spline tools (Mesh, Assembly, Decal, Road splines).