Car Physics for rFactor 2

Introduction to rFactor 2 Car Physics

Car physics in rFactor 2 represent the culmination of decades of racing simulation development. The physics engine calculates every aspect of vehicle dynamics in real-time: engine power delivery, suspension geometry changes through travel, weight transfer, aerodynamic forces, and how all these systems interact through the tires.

Professional rFactor 2 mod development requires understanding multiple file types that work together to create authentic vehicle behavior. This guide focuses on two critical areas: engine development and suspension geometry.

Credits & Expertise

The car physics methodology presented in this guide has been developed through years of collaboration with April Carlsvard, whose deep expertise in rFactor 2 vehicle dynamics has been invaluable. Her knowledge of HDV file structure, engine development, suspension geometry, and professional physics practices has shaped the comprehensive approach detailed throughout this guide.

File Types Overview

Required Research Data

Creating accurate vehicle physics requires extensive real-world data. Unlike simplified simulation approaches that estimate values, professional rFactor 2 development demands research and validation. The following data is essential:

Mass and Inertia Data

Aerodynamic Data

Chassis and Suspension Data

Brake System Data

Powertrain Data

Tire Data

Research is Not Optional

The most common mistake in physics development is estimating values without research. Every parameter should be justified with real-world data or engineering calculations based on similar vehicles. Guessing creates unrealistic behavior that experienced drivers immediately notice.

Engine Development

Engine files define the heart of vehicle performance: power delivery characteristics, fuel consumption, thermal behavior, and engine braking. Unlike simple power/torque multipliers, rFactor 2 engine files model the complete torque curve with compression losses and thermal management.

Engine File Structure

Engine files use a plain text format with RPM/Torque data points and various operational parameters:

// Engine data generated by PhysicsEditor RPMTorque=(0.0, 0.0, 0.0) RPMTorque=(250.0, -12.7, 32.4) RPMTorque=(500.0, -15.5, 64.2) ... RPMTorque=(7500.0, -75.0, 33.0) FuelConsumption=3.810e-05 EngineInertia=0.16500 IdleRPMLogic=(650, 850) RevLimitRange=(7100, 0.0, 0.0)

Understanding RPMTorque Lines

Each RPMTorque line contains three values: RPMTorque=(RPM, Compression_Torque, Power_Torque)

Power Torque (Third Value)

This is the actual torque produced by combustion at this RPM. These values should come from a wheel horsepower dyno chart, not crank horsepower. Using wheel horsepower eliminates the need to model driveline friction losses separately.

To convert dyno data to RPMTorque format:

  1. Obtain wheel HP dyno chart with RPM on X-axis and torque on Y-axis
  2. Sample data points every 250 RPM from idle to redline
  3. Enter torque values in Newton-meters (convert from lb-ft if necessary: Nm = lb-ft x 1.356)
  4. Use rFactor 2 Physics Editor to visualize the curve and ensure smoothness

Compression Torque (Second Value)

This represents engine braking force - the resistance from compressing air in the cylinders when the throttle is closed. Compression torque increases steadily with RPM and depends on:

As a reference point, a typical 4-cylinder naturally aspirated engine with 9.5:1 compression might have compression torque values ranging from -12.7 Nm at 250 RPM to -75.0 Nm at redline. A 6-cylinder engine would have roughly 50% higher values; an 8-cylinder would have double.

Critical Engine Parameters

Engine Inertia

EngineInertia=0.16500

Rotational inertia of all rotating engine components (crank, flywheel, pistons, rods). Higher values mean the engine rev changes more slowly. This affects:

Typical values: Small 4-cylinder = 0.10-0.15, Large V8 = 0.18-0.25, with heavy flywheel = +0.05-0.10

Fuel Consumption

FuelConsumption=3.810e-05 FuelEstimate=1.07

FuelConsumption: Liters of fuel consumed per Nm of torque per second. This value is affected by throttle position and RPM. Smaller, more efficient engines have lower values (~3.0e-05), while large displacement or forced induction engines have higher values (~4.5e-05).

FuelEstimate: Multiplier used by AI for pit strategy calculations. Typically 1.0-1.1 for most engines.

Idle and Rev Limit

IdleThrottle=1 IdleRPMLogic=(650, 850) RevLimitRange=(7100, 0.0, 0.0) RevLimitLogic=0

IdleRPMLogic=(min, max): The ECU attempts to maintain idle speed between these RPM values. Most street cars idle at 600-900 RPM; race cars at 1200-1800 RPM.

RevLimitRange=(limit, increment, steps): Maximum RPM and adjustability. For stock cars, typically only one value (no adjustment). Race cars may have adjustable limits.

RevLimitLogic: RPM range for limiter operation. Lower values = harder bouncing off limiter; higher values = softer limiting. A value of 0 means immediate hard cut.

Launch Control

LaunchEfficiency=0 LaunchRPMLogic=(3500, 4250)

LaunchRPMLogic: Even if the vehicle doesn't have launch control (LaunchEfficiency=0), this value is used by AI for launch RPM. Set this to the engine's peak torque RPM or slightly above for optimal launches.

Thermal Management

OptimumOilTemp=100.50 CombustionHeat=50 EngineSpeedHeat=8.000e-04 OilMinimumCooling=0.00440 OilWaterHeatTransfer=(0.14000, 7.990e-05) WaterMinimumCooling=0.00300 RadiatorCooling=(2.400e-06, 4.400e-06)

Engine thermal model affects oil temperature, which influences engine performance and longevity:

Engine Life and Failure

LifetimeEngineRPM=(3000, 4000) LifetimeOilTemp=(120, 20) LifetimeAvg=1296000 LifetimeVar=2000

These parameters model engine wear and failure over time:

HDV File - General Section

The HDV (Vehicle) file [GENERAL] section contains fundamental vehicle properties that affect all other systems. These values define the vehicle's mass, inertia, center of gravity, and fuel system.

Mass and Inertia

[GENERAL] Mass=1250 Inertia=(2128, 2425, 432) CGHeight=0.350 CGRightRange=(0.500, 0.005, 1) CGRearRange=(0.450, 0.005, 1)

Mass

Mass=1250: Total vehicle curb weight in kilograms, excluding fuel. Use manufacturer's published curb weight.

Inertia Calculation

Inertia=(Pitch, Yaw, Roll): Rotational resistance in each axis. These values determine how quickly the vehicle rotates around each axis:

For a vehicle approximated as a rectangular mass distribution, calculate inertia using:

Important: Height should be the body height MINUS the ride height, because rFactor 2's reference plane is the bottom of the chassis, not the ground.

Material construction affects these values:

Center of Gravity

CGHeight=0.350: Height of the vehicle's center of mass above the reference plane (bottom of chassis), in meters. This value critically affects weight transfer and handling:

To calculate: Find the vehicle's published CG height (often around crankshaft centerline), then subtract the ride height. If unavailable, typical values: Sports cars 0.30-0.35m, Sedans 0.35-0.42m, SUVs 0.45-0.55m, Race cars 0.25-0.32m.

CGRightRange=(0.500, 0.005, 1): Lateral weight distribution as fraction on left tires. 0.500 = perfect 50/50 left/right. The increment (0.005) and number of steps (1) define adjustability - in this case, not adjustable.

CGRearRange=(0.450, 0.005, 1): Longitudinal weight distribution as fraction on rear tires. 0.450 = 45% rear, 55% front. This is critical for handling balance. Use manufacturer's published weight distribution.

Fuel System

FuelTankPos=(0.00, 0.10, 0.50) FuelTankMotion=(150.0, 0.25) FuelRange=(1.0, 1.0, 72)

FuelTankPos=(left/right, up/down, front/back): Fuel tank location relative to the center of the rear axle in the reference plane. Requires photos of vehicle underside or technical diagrams. Fuel positioning affects weight distribution as fuel load changes.

FuelTankMotion=(spring_rate, damping): Simple model of fuel sloshing. Higher spring rate = fuel moves less freely; higher damping = fuel settles more quickly. These values rarely need adjustment from defaults.

FuelRange=(starting_amount, increment, max_units): Fuel capacity in liters. In this example: starts at 1L, increments of 1L, max 72L capacity.

HDV File - Suspension Parameters

The HDV [SUSPENSION] section and wheel-specific sections ([FRONTLEFT], [FRONTRIGHT], [REARLEFT], [REARRIGHT]) define spring rates, damping, geometry, and all adjustable parameters. These work in conjunction with the UltraChassis INI file to create the complete suspension system.

Basic Geometry

[SUSPENSION] UltraChassis=Vehicle_Chassis.ini FrontWheelTrack=1.465 RearWheelTrack=1.46 LeftWheelBase=2.475 RightWheelBase=2.475

UltraChassis: References the modern INI file containing suspension geometry. For legacy vehicles, you may see PhysicalModelFile=Vehicle.pm instead.

Front/RearWheelTrack: Distance between left and right wheel centers in meters. Wider track = more lateral stability but potentially slower direction changes.

Left/RightWheelBase: Distance between front and rear axle centers. Usually identical unless the vehicle has asymmetric geometry.

Anti-Sway Bars (Anti-Roll Bars)

SpringBasedAntiSway=0 AllowNoAntiSway=1 FrontAntiSwayBase=0.0 FrontAntiSwayRange=(0.025, 0.0, 2) FrontAntiSwayRate=(6.2e10, 4) RearAntiSwayRange=(0.017, 0.002, 2) RearAntiSwayRate=(6.2e10, 4)

SpringBasedAntiSway=0: Use diameter-based calculation (0) or spring-based (1). For stock vehicles with known sway bar diameters, use 0.

AllowNoAntiSway=1: When enabled, the first setting represents "no sway bar" (0mm diameter). This is useful for vehicles where sway bars are removable upgrades.

FrontAntiSwayRange=(diameter, increment, steps): Base diameter in meters, size increment, number of increments. Example: (0.025, 0.0, 2) means starts at 25mm diameter, 0mm increment, for 2 total positions - so 0mm (no bar) and 25mm (stock bar).

FrontAntiSwayRate=(base, power): Stiffness calculation formula: rate = base x (diameter ^ power). For hollow/tubular steel sway bars, use base=6.2e10, power=4. For solid steel bars, use base=1.1e11.

Alignment Settings

FrontToeInRange=(-0.45, 0.01, 56) FrontToeInSetting=44 RearToeInRange=(-0.20, 0.01, 31) RearToeInSetting=21 LeftCasterRange=(6.5, 0.1, 1) LeftCasterSetting=36 RightCasterRange=(6.5, 0.1, 1) RightCasterSetting=36

ToeInRange=(start_degrees, increment, steps): Toe angle range. Negative values = toe-out, positive = toe-in. Example: (-0.45, 0.01, 56) provides range from -0.45,to +0.55,in 0.01,increments.

ToeInSetting=44: Default setting index. Calculate actual toe: -0.45 + (44 x 0.01) = -0.01,(slight toe-out).

CasterRange=(start_degrees, increment, steps): Caster angle for each front wheel. Higher caster increases self-centering force and can affect camber gain in steering. Most street cars: 3-7°, performance cars: 6-9°, race cars: 7-12°.

Per-Wheel Parameters

Each wheel corner (FRONTLEFT, FRONTRIGHT, REARLEFT, REARRIGHT) has identical parameter structures but different values. Here's an explanation using FRONTLEFT as the example:

Suspension Travel

[FRONTLEFT] BumpTravel=-0.10 ReboundTravel=-0.320

BumpTravel=-0.10: Maximum compression distance (negative value) in meters before hitting the bump stop. When the suspension compresses 0.10m (100mm) from ride height, it contacts the bump stop.

ReboundTravel=-0.320: Maximum extension distance (negative value) before reaching full droop. Total suspension travel = |BumpTravel| + |ReboundTravel| = 0.10 + 0.320 = 0.420m (420mm).

The ride height setting must fall between these two values, typically closer to rebound than bump to allow more compression travel for bumps.

Bump Stops

BumpStopSpring=280000.0 BumpStopRisingSpring=1.20e7 BumpStopDamper=2000.0 BumpStopRisingDamper=9.00e5

Bump stops are progressive - they get stiffer as they compress:

Pushrod Attachment Points

PushrodSpindle=(-0.12, 0.00, 0.0) PushrodBody=(-0.18, 0.46, 0.06)

Critical for motion ratio calculation: These coordinates define where the spring/damper attaches to the suspension.

PushrodSpindle=(X, Y, Z): Attachment point on the spindle/suspension arm, relative to wheel center.

PushrodBody=(X, Y, Z): Attachment point on the chassis, relative to wheel center.

The distance and angle between these points determines motion ratio - how much the spring compresses for a given wheel movement. If the spring is 70% of the distance from the body mount to the spindle, the motion ratio is 0.7, and SpringMult should be 0.7.

Springs

SpringMult=1.00 SpringRange=(17862.0, 0.0, 1) SpringSetting=1

SpringMult=1.00: Motion ratio multiplier. If spring is directly on the spindle (perpendicular to travel), use 1.0. If spring is inboard, calculate the geometric motion ratio.

SpringRange=(rate, increment, steps): Spring rate in N/m. Factory springs are typically non-adjustable (increment=0, steps=1). This example: 17862 N/m ≈ 1.82 kg/mm, typical for a 1250kg street car.

Dampers (Shock Absorbers)

BumpStage2=0.025 ReboundStage2=-0.025 DamperMult=1.00 SlowBumpRange=(5000.0, 0, 1) FastBumpRange=(2000.0, 0, 1) SlowReboundRange=(12000.0, 0, 1) FastReboundRange=(3000.0, 0.0, 1)

BumpStage2/ReboundStage2: Shaft velocity (m/s) where the damper transitions from "slow" to "fast" valving. At velocities below ±0.025 m/s, slow damping applies; above this, fast damping applies. This models the actual blow-off behavior of shock valving.

DamperMult: Same as SpringMult - motion ratio for damper if it's not directly on the spindle.

Damper force = Rate x Velocity, so these are damping coefficients in N/(m/s):

Typical relationship: SlowRebound ≈ 2-3× SlowBump, FastRebound ≈ 1.5× FastBump. This creates the classic "firm on compression, controlled on extension" shock behavior.

Ride Height

RideHeightRange=(0.180, 0.005, 1) RideHeightSetting=1

RideHeightRange=(height, increment, steps): Height of inner suspension pivot points above reference plane, in meters. This is NOT ground clearance - it's the actual height of the suspension geometry attachment points on the chassis.

To determine this value: Take the vehicle's ground clearance, add the distance from the ground to the lower suspension pivot point. For most cars, this is 0.15m to 0.25m.

Camber

CamberRange=(-0.5, 0.5, 1) CamberSetting=15

CamberRange=(start, increment, steps): Static camber adjustment range in degrees. Negative camber tilts the top of the tire inward. Example: (-0.5, 0.5, 1) means -0.5,camber with no adjustment range (steps=1).

Tire Pressure

PressureRange=(120.0, 2.0, 131) PressureSetting=55

PressureRange=(start_kPa, increment, steps): Tire pressure adjustment range in kilopascals. Example range: 120 to 380 kPa (17.4 to 55.1 PSI).

Brakes

BrakeDiscRange=(0.024, 0.000, 0) BrakeResponseCurve=(-20,20,160,200) BrakeTorque=1682.0 BrakeHeating=0.0003 BrakeCooling=(0.006,0.0004)

BrakeDiscRange=(thickness, increment, steps): Brake rotor thickness in meters. For stock vehicles, typically not adjustable.

BrakeResponseCurve=(cold_temp, min_optimal, max_optimal, hot_temp): Temperature curve defining brake performance. At cold_temp (-20 °C), brakes are at 50% effectiveness. Between min_optimal and max_optimal (20-160 °C), brakes are 100% effective. At hot_temp (200 °C), brakes fade to 50%. These values should match brake pad specifications.

BrakeTorque=1682.0: Maximum brake torque in Nm at optimal temperature and zero wear. Adjust by feel to allow threshold braking without locking up (with proper tires).

BrakeHeating/Cooling: Thermal model parameters. Vented rotors cool faster (higher cooling values); track pads generate more heat (higher heating values).

UltraChassis - Modern Suspension Geometry

UltraChassis is the modern suspension geometry system in rFactor 2, replacing legacy PM files. It uses INI file format and is referenced in the HDV with UltraChassis=filename.ini. If both UltraChassis and PhysicalModelFile lines exist in the HDV, UltraChassis takes precedence.

Legacy PM Files

Older rFactor 2 vehicles used PM (Physical Model) files with BODY, BAR, JOINT, and HINGE definitions. Modern vehicles use UltraChassis INI files instead. The PM system is still supported but deprecated for new development.

UltraChassis File Structure

UltraChassis INI files define suspension geometry using a more accessible format than legacy PM files. The system calculates camber curves, bump steer, roll centers, and all geometric effects throughout suspension travel.

Coordinate System

rFactor 2 uses this coordinate system for all position values:

All measurements are relative to the wheel center position in the reference plane (ride height).

HDV Integration

[SUSPENSION] UltraChassis=Vehicle_Chassis.ini // PhysicalModelFile=Vehicle.pm // Legacy PM file (ignored if UltraChassis exists)

Reference the UltraChassis file in your HDV [SUSPENSION] section. The system automatically handles spindle masses, wheel connections, and suspension geometry calculations.

Key Advantages of UltraChassis

Suspension Types in rFactor 2

UltraChassis supports all common suspension types:

Fully Supported:

Important Limitations:

Measuring Suspension Geometry

Creating accurate UltraChassis files requires real-world suspension measurements:

Required Data:

  1. Suspension Photos: High-quality photos from multiple angles showing all control arm mounting points, with wheels removed
  2. Factory Service Manual: Often contains suspension diagrams with critical measurements
  3. Technical Drawings: Manufacturers sometimes provide suspension geometry specifications in homologation documents
  4. Physical Measurements: If you have vehicle access, measure from wheel center to each mounting point

Critical Measurements:

Geometry is Vehicle-Specific

Never copy suspension geometry from another vehicle - even similar cars have unique suspension designs. Incorrect geometry creates unrealistic camber curves, improper roll center movement, and wrong weight transfer characteristics that experienced drivers immediately notice.

Best Practices for Car Physics Development

Research Methodology

  1. Start with Official Sources: Manufacturer specs, technical manuals, racing homologation documents
  2. Cross-Reference Multiple Sources: One source may have errors; verify critical values from multiple publications
  3. Use Engineering Calculations: When exact data isn't available, calculate from known values (e.g., calculate inertia from dimensions)
  4. Study Similar Vehicles: If your target vehicle lacks data, find a similar vehicle (same platform, similar weight) with published specs
  5. Document Everything: Keep notes on where each value came from and why you chose it

Development Workflow

  1. Gather All Required Data: Don't start building until you have at least 80% of required specifications
  2. Start with Basic HDV: Get the car driving with basic values - worry about perfection later
  3. Validate Against Known Benchmarks: Real-world 0-60 times, braking distances, skidpad G-force, top speed
  4. Iterate One System at a Time: Don't change engine, suspension, and tires simultaneously - you won't know what fixed or broke the behavior
  5. Test at Multiple Tracks: A car that feels good at one track might expose problems elsewhere
  6. Get Driver Feedback: Experienced drivers can identify unrealistic behavior that numbers can't reveal

Validation Techniques

Performance Validation

Dynamic Behavior Validation

Telemetry Comparison

For professional development, compare simulation telemetry to real-world data:

Common Mistakes to Avoid

1. Using Crank HP Instead of Wheel HP

Always use wheel horsepower dyno data for engine files. If you use crank HP, you'll need to model driveline friction separately, which is complex and error-prone. Wheel HP data already includes all losses.

2. Incorrect Inertia Calculations

Remember to subtract ride height from vehicle height before calculating rotational inertia. Also account for construction type - a carbon fiber chassis has less inertia than steel for the same dimensions.

3. Misunderstanding Motion Ratios

If the spring isn't directly on the spindle, you must calculate and apply the motion ratio with SpringMult/DamperMult. Ignoring this makes the suspension too soft or too stiff.

4. Unrealistic Bump Stop Settings

Bump stops should be progressive and firm but not infinitely stiff. If BumpStopRisingSpring is too high, the car will violently bounce when bottoming. If too low, the car will bottom harshly.

5. Copying Suspension Geometry

Every vehicle's suspension geometry is unique. Copying another car's UltraChassis file and adjusting only the track width will create unrealistic camber curves and roll center behavior. Always measure the actual vehicle's geometry.

6. Ignoring Thermal Models

Engine oil temperature, brake temperature, and tire temperature all affect performance. A car with poor cooling setup should overheat and lose performance - this adds realism and strategic depth.

7. Overly Simplified Testing

Testing only at one track or in one car configuration won't expose problems. Test with different fuel loads, different tracks (smooth and bumpy), different weather conditions, and different setup extremes.

Advanced Development Topics

For teams pursuing the highest level of accuracy:

Aerodynamic Mapping

Beyond basic drag coefficient, map downforce and drag at different ride heights, pitch angles, and speeds. This requires either CFD data or wind tunnel testing from the real vehicle.

Tire Model Correlation

Work with tire development specialists to ensure tire behavior matches real-world data. The interaction between vehicle dynamics and tire physics is critical for realism.

Suspension Compliance

While rFactor 2 doesn't model rubber bushings, you can approximate compliance effects by slightly adjusting anti-squat/dive characteristics through geometry to match real vehicle behavior under acceleration and braking.

Professional Development Services

MotorLaps provides professional car physics development for racing teams and simulation projects. Our physics work has been validated through collaboration with professional racing teams using real telemetry data. For consultation on professional rFactor 2 mod development, including complete vehicle physics packages, contact us through our development services page.

Reference Files

Skip Barber Example Files: rFactor 2's ModDev package includes fully commented Skip Barber physics files in ModDev\Vehicles\SkipBarber\. These professional-grade files demonstrate proper HDV structure, mass/inertia setup, aerodynamics, suspension configuration, and all critical vehicle physics parameters. Use them as a reference when developing your own vehicles.