Train Sim World® 4

Train Sim World® 4

Not enough ratings
Headtracking with a webcam or phone
By Mac6
You can use a simple webcam as a good head tracker to look around the cab and improve your sim experience without spending money on any hardware. You can also use a phone if you don't have a webcam.

You'll need to download two free applications: OpenTrack and AITrack (the latter is optional).

AITrack is a popular AI-based software for head tracking, it accurately captures the movements of your head. OpenTrack receives the information from AITrack and translates it into in-game camera movements. OpenTrack is now also capable of operating on its own, using its AI-based Neuralnet, instead of AITrack. Neuralnet was created with machine learning, programmed to recognise human faces and their features.

Neither app requires installation, you can simply unzip them after downloading and run directly from the unzipped folders.

You can follow this guide step by step or try the video guide (although it's getting old).

You're welcome to reuse the text in this guide to adapt to another game; this guide is presented under CC BY-SA 4.0 licence (Attribution-ShareAlike 4.0 International ).
   
Award
Favorite
Favorited
Unfavorite
Prerequisites
- A webcam capable of 720p resolution or better
- OpenTrack software
- AITrack software

No camera? No problem, you can also use your Android phone as a camera, scroll below for details.
Setting up AITrack
  • Download and install AITrack from the official repository at https://github.com/AIRLegend/aitrack/releases (Releases->Assets).
  • Launch AITrack and go to the Settings tab.
  • In the camera settings, select your webcam from the dropdown.
  • Adjust other settings like Model sensitivity and Model scale according to your preference. These settings determine how sensitive the software is to your head movements and the scale of the 3D model used.
  • Go back to the Main tab and click Start. You should see a camera feed with the software tracking your face.



You can also watch this video created by AITrack's developer:

Setting up OpenTrack
  • Download and install OpenTrack from the official source at https://github.com/opentrack/opentrack/releases (Releases->Assets).
  • Launch OpenTrack.
  • For Input, select UDP and set the port (default is 4242 for AITrack).
  • For Output, choose the protocol that's compatible with the game you're playing. For TSW, use the freetrack 2.0 Enhanced option.
  • Optional - for Filter, select Accela.
  • Optional - click the Options (gear icon) and navigate to the Output tab. Ensure the Yaw, Pitch, and Roll axes are mapped correctly. Adjust other settings if necessary.

Connection and testing
  • In AITrack, ensure that the Output is set to send data to the same UDP port as OpenTrack's input (this is already preset by default)).
  • Click Start in AITrack to start head tracking.
  • In OpenTrack, click the Start button. OpenTrack should now receive data from AITrack.
  • Move your head to see if the octopus icon in OpenTrack replicates your movements. This indicates that AITrack's data is being properly received and processed by OpenTrack.
  • Start TSW, drive a train, and see if the in-game camera corresponds to your head movements.
Calibration and fine-tuning
  • If the head tracking feels too sensitive or sluggish, you can adjust the settings in both AITrack and OpenTrack.
  • In OpenTrack, you can modify the Filter settings to smoothen out any jitters.
  • In AITrack, tweaking the Model sensitivity and Model scale can enhance tracking accuracy.
Using a phone instead of a webcam
Instead of using a webcam, you can install an app compatible with OpenTrack from Google PlayStore or Apple App Store. The downside is slight latency, as you're now relying on your WiFi connection.

I use the SmoothTrack app (unfortunately it does cost about $10, which is arguably a high price); there are many other apps like this, but I like this one. Let me know in the comments if there's a better option, especially if it's free.

These instructions are applicable to other phone apps, they all work roughly the same.


Getting it to work is similar to what I wrote above, except for AITrack - we won't be using that.

  • Make sure your PC and Android/iOS phone are on the same WiFi network
  • Download SmoothTrack or a similar app
  • Make sure OpenTrack is running
  • Get the IP address of your PC: hit the Windows button, type cmd and ENTER, then ipconfig and ENTER. Look for a WiFi or Ethernet connection, the IP address is likely to be something like 192.168.x.x - write it down
  • Launch SmoothTrack on your phone, and edit the IP address - put in the IP address of your PC
  • Hit Start

If it didn't work, make sure the Port (usually 4242) is the same as in OpenTrack.
Using Neuralnet instead of AITrack
Many users report that the AI-based head tracking in OpenTrack is superior to AITrack. To enable Neuralnet, set the input in OpenTrack to neuralnet tracker .

Make sure AITrack is closed and click on Start in OpenTrack. Align your camera and chair, and explore the options (the tool icon next to Input dropdown).

Disable head tracking
Simply stop OpenTrack and quit the application to return to mouse/controller look movements.
6 Comments
Mac6  [author] Feb 26, 2024 @ 11:49pm 
I don't know, sorry.
Frankyboy Feb 26, 2024 @ 5:02pm 
Hmm, I have a Tobii Head Tracker 5. Will that work for TSW4?
[D.C.] Ronny Feb 16, 2024 @ 7:28pm 
Hi, in my case the octopus is moving using ai tracker or Neuralnet and it works in war thunder but doesn't work in any steam game , do you know why?
Mac6  [author] Nov 6, 2023 @ 6:14pm 
I agree, @trainsimulatordriver
trainsimulatordriver Nov 6, 2023 @ 5:44pm 
I had been down this path. It does work, somewhat. You get a much better experience with Track-IR Pro. It just works. You get what you pay for sometimes.
What's up Doc Oct 9, 2023 @ 4:05pm 
Thanks for this!