Struct SurfaceProperties
- Namespace
- LibreRally.Vehicle.Physics
- Assembly
- LibreRally.dll
Physics properties for a driving surface. These values scale the tyre model's grip envelope and energy dissipation.
Surface friction is decomposed into two texture-scale contributions following The Contact Patch, C1603:
- FrictionCoefficient: overall peak µ multiplier relative to the tyre model's internal reference surface. Values near 1.0 are neutral; rally asphalt may be slightly above 1.0. This is the combined result of microtexture and macrotexture contributions.
- Microtexture: adhesion-dominant grip from sub-0.5 mm asperity peaks (0–1 scale). Provides dry and light-wet grip. Polished surfaces have low microtexture. Reference: The Contact Patch, C1603, §Microtexture.
- Macrotexture: hysteresis grip and water-evacuation capacity from 0.5–20 mm scale aggregate texture (0–1 scale). High macrotexture drains water from the contact patch, delaying hydroplaning onset. Reference: The Contact Patch, C1603, §Macro-texture.
- WaterDepth: surface water film thickness (m). Zero for dry surfaces. Values above ~0.0025 m (2.5 mm) trigger hydroplaning risk at speed. Reference: The Contact Patch, C1603, §Aqua-planing.
- RollingResistance: rolling-resistance force coefficient (N per N of load).
- SlipStiffnessScale: scales the tyre's pure-slip stiffness and brush stiffness. Lower values make loose surfaces feel compliant rather than like low-grip asphalt.
- RelaxationLengthScale: scales carcass relaxation lengths. Higher values delay force buildup on deformable or rough surfaces.
- PeakSlipRatioScale: scales the longitudinal slip ratio at which peak traction occurs. Higher values allow more wheelspin before the tyre saturates.
- DeformationFactor: how much the surface deforms under load (0 = rigid, 1 = fully deformable). Affects longitudinal slip behaviour — deformable surfaces tolerate higher slip before saturation.
- NoiseFactor: road roughness amplitude (0 = smooth, 1 = very rough). Drives deterministic per-frame micro-variation in grip based on road-surface power spectral density, giving the feel of aggregate texture at the contact patch. Reference: The Contact Patch, C1603, §Power spectral density curves.
public readonly struct SurfaceProperties
- Inherited Members
Properties
DeformationFactor
Deformation factor (0 = rigid, 1 = fully deformable).
public float DeformationFactor { get; init; }
Property Value
FrictionCoefficient
Peak friction multiplier relative to the tyre model's internal reference surface.
public float FrictionCoefficient { get; init; }
Property Value
Macrotexture
Macrotexture level (0–1). Represents 0.5–20 mm aggregate texture depth. High macrotexture provides hysteresis grip and drains water from the contact patch. Positive texture (surface dressing) ≈ 0.9; polished concrete ≈ 0.2. Reference: The Contact Patch, C1603, §Macro-texture.
public float Macrotexture { get; init; }
Property Value
Microtexture
Microtexture level (0–1). Represents sub-0.5 mm asperity peaks that provide adhesion grip. Higher values = grittier surface = better dry and light-wet grip. Fresh calcined bauxite ≈ 1.0; polished stone ≈ 0.3. Reference: The Contact Patch, C1603, §Microtexture.
public float Microtexture { get; init; }
Property Value
NoiseFactor
Road roughness amplitude (0 = smooth, 1 = very rough).
public float NoiseFactor { get; init; }
Property Value
PeakSlipRatioScale
Scale factor for the longitudinal slip ratio at peak traction. Higher values allow more wheelspin before reaching peak force.
public float PeakSlipRatioScale { get; init; }
Property Value
RelaxationLengthScale
Relaxation-length scale applied before tyre carcass and operating-point modifiers. Higher values delay force buildup across the contact patch on loose or rough surfaces.
public float RelaxationLengthScale { get; init; }
Property Value
RollingResistance
Rolling-resistance force coefficient (N per N of load).
public float RollingResistance { get; init; }
Property Value
SlipStiffnessScale
Slip-stiffness scale applied to the tyre force-curve slope and brush stiffness. Dry asphalt ≈ 1.0, gravel ≈ 0.5, snow ≈ 0.3.
public float SlipStiffnessScale { get; init; }
Property Value
WaterDepth
Surface water film thickness (m). Zero for dry conditions. Light rain ≈ 0.0005 m, moderate ≈ 0.001 m, heavy ≈ 0.003 m. Hydroplaning onset ≈ 0.0025 m at highway speeds. Reference: The Contact Patch, C1603, §Aqua-planing.
public float WaterDepth { get; init; }
Property Value
Methods
ForType(SurfaceType)
Returns the default SurfaceProperties for the given surfaceType.
Values are tuned for rally driving conditions.
Friction coefficients calibrated from The Contact Patch, C1603, Table 1:
dry tarmac 0.8–1.0, wet 0.2–0.65, icy 0.15.
Microtexture/macrotexture values represent typical UK road aggregate.
public static SurfaceProperties ForType(SurfaceType surfaceType)
Parameters
surfaceTypeSurfaceTypeSurface type to resolve.
Returns
- SurfaceProperties
The default physics properties for the requested surface type.
Lerp(in SurfaceProperties, in SurfaceProperties, float)
Linearly interpolates two surface property sets for contact blending.
public static SurfaceProperties Lerp(in SurfaceProperties a, in SurfaceProperties b, float t)
Parameters
aSurfacePropertiesPrimary surface properties.
bSurfacePropertiesSecondary surface properties.
tfloatBlend factor in the range [0, 1].
Returns
- SurfaceProperties
The blended surface properties.