Mapping System Overview
OpenTrack uses spline curves to map input ranges to output ranges:How Mapping Works
The pipeline applies mapping curves after filtering:Rotation axes are mapped before relative translation, while position axes are mapped after. This ensures proper coordinate transformations.
Map Function
Spline Curves
OpenTrack uses Catmull-Rom splines for smooth interpolation:Catmull-Rom Interpolation
Splines are pre-computed into a lookup table for performance. The curve is evaluated at 250Hz, so fast lookups are critical.
Axis Configuration
Each axis has configurable parameters:Input Range (clamp_x_)
- Rotation
- Translation
- Yaw: ±180°
- Pitch: ±90°
- Roll: ±180°
Output Range (clamp_y_)
Similar ranges, but can be negative to invert:Common Curve Types
- Linear (1:1)
- Amplified (2:1)
- Reduced (1:2)
- S-Curve
- Deadzone
- Two points: (0, 0) and (max_input, max_output)
- Input range = Output range
Practical Mapping Examples
Flight Simulation
1
Yaw (Left/Right)
2
Pitch (Up/Down)
3
Roll
4
Translation
Racing Simulation
1
Yaw
2
Pitch
3
Roll
First-Person Shooter
1
Yaw & Pitch
2
Translation
Alternate Splines
Use different curves for negative values:- Asymmetric workspace (easier to turn one direction)
- Compensate for tracking issues on one side
- Different game mechanics per direction
Example: Asymmetric Yaw
Example: Asymmetric Yaw
Source Axis Mapping
Remap which physical axis controls each output:- Standard
- Swap Axes
- Disable Axis
Zero Position Offset
Shift the zero point of an axis:- Adjust for monitor not being centered
- Compensate for permanent head tilt
- Offset default view position in game
Inversion Options
- Invert Pre
- Invert Post
Use invert_pre for fixing tracker orientation.
Use invert_post for game-specific requirements.
Spline Point Management
Manipulate curve points programmatically:Example: Create Linear Curve
Example: Create S-Curve
Performance Considerations
Splines are highly optimized:The spline is pre-computed into a 16384-entry lookup table. Runtime evaluation is just a lookup and linear interpolation - very fast.
Troubleshooting
Mapping not applying
Mapping not applying
- Check “Apply mapping curves” is enabled:
- Verify curve has points defined
- Check input range (clamp_x_) covers your movement range
- Restart tracking after changing curves
Curve feels wrong
Curve feels wrong
- Check you’re editing the correct axis
- Verify curve points are sorted by X value
- Ensure first point is at or near (0, 0)
- Check for overlapping points (auto-removed but can cause confusion)
Jumps or discontinuities
Jumps or discontinuities
- Splines should be smooth - check for too-sharp corners
- Verify input range isn’t being clamped unexpectedly
- Check for axis remapping conflicts
- Look for points very close together
No output on one side
No output on one side
- Check if alternate spline is enabled but not configured
- Verify input range is symmetric (±X, not just 0-X)
- Check inversion settings
- Look for centering issues
Best Practices
Start simple - Begin with linear 1:1 curves, then adjust
Test incrementally - Change one axis at a time
Use S-curves - Generally provide best comfort and precision
Match your game - Racing needs different curves than flight sim
Next Steps
Configuration
Advanced tracking settings
Filters
Smooth data before mapping
Relative Translation
Advanced translation compensation