返回项目目录
epalosh

epalosh

openfov

Open-source webcam head tracking for iRacing. Achieve VR-style POV with any standard webcam!

视觉 / 图像computer-visionhead-trackingiracingiracing-setupsiracing-usersmediapipe
Stars
103
Forks
4
Watchers
103
Issues
4

README

项目介绍

3965 bytes

OpenFOV

CI Latest release License: MIT Python: 3.11+ Platform: Windows

Webcam head tracking for iRacing.

Install

Download OpenFOV-x.y.z-setup.exe from Releases and run it. The installer also fetches the Microsoft Visual C++ Runtime if your machine doesn't already have it.

On first launch Windows may show "Windows protected your PC." Click More info → Run anyway. OpenFOV is currently shipped unsigned. Once signed, this prompt goes away for new downloads.

See docs/INSTALL.md for the full install + setup + uninstall walkthrough.

Quick start

  1. Run OpenFOV.
  2. The first-run wizard walks you through: pick a webcam → calibrate your neutral pose (look straight, press the button) → read the in-game tips → done.
  3. Launch iRacing. TrackIR should be enabled by default!
  4. Drive.

To recenter your view at any time, press F9.

Troubleshooting

"OpenFOV tracks my head but iRacing doesn't move." Releases up to and including 0.2.1 wrote the NaturalPoint registry pointer in the wrong place, so no game could ever locate OpenFOV's NPClient64.dll — silently, with no error. Update to the latest release; it corrects the key and cleans up the stale one on first launch.

To confirm it is registered correctly, this key must exist and the path must end in a slash:

HKEY_CURRENT_USER\Software\NaturalPoint\NATURALPOINT\NPClient Location
    Path = C:/Program Files/OpenFOV/resources/bin/

%APPDATA%\OpenFOV\openfov.log now records this on every launch — look for NPClient registration verified. If it says BROKEN or MISSING, attach the log to an issue.

Antivirus. Some Defender definitions flag the bundled TrackIR.exe as malware (a false positive — it does nothing but sleep) and quarantine it out of resources\bin\. If tracking stopped working after an AV scan, check that folder still contains NPClient64.dll and TrackIR.exe.

Architecture

Webcam → MediaPipe FaceLandmarker → One Euro filter
                                      ↓
                         per-axis Bezier curve + invert
                                      ↓
                          FT_SharedMem (FreeTrack proto)
                                      ↓
                      bundled NPClient64.dll (loaded by iRacing)
                                      ↓
                                 iRacing

OpenFOV writes the FreeTrack shared-memory section directly, and a bundled NPClient64.dll (clean MIT source, originally from linux-track) exposes the NaturalPoint TrackIR API to iRacing.

Tech stack

  • Python 3.12 with PySide6 (Qt 6) for the UI
  • MediaPipe FaceLandmarker for 478-landmark face tracking
  • One Euro Filter for low-lag / low-jitter smoothing
  • Compiled to a standalone Windows binary with Nuitka
  • Wrapped in Inno Setup for installation

License

MIT. See LICENSE. Third-party attributions are in NOTICE.

Trademarks

TrackIR is a trademark of NaturalPoint, Inc. OpenFOV is not affiliated with, endorsed by, or sponsored by NaturalPoint. Mentions of TrackIR and the NPClient API exist only to describe interoperability with third-party games that implement support for that API.