Jump to content

[1.12.5] KerbTrack v1.6 Head tracking using your webcam, TrackIR, opentrack, joystick (2024-07-08)


pizzaoverhead

Recommended Posts

KerbTrack

This plugin lets you look around in-game by moving your head. To do this, it can use a joystick, gamepad, your webcam with a TrackIR camera, a gamepad, or opentrack and all the tracking options it supports, from LED hats to webcams. KerbTrack supports all six degrees of freedom in IVA (yaw, pitch, roll, forward/backward, up/down and strafe left/right), and two degrees of freedom in external views. Other input methods can be added in future.

 

 

Downloads

CurseForge | GitHub | Spacedock / CKAN

Requires Harmony, available here.
Source  available on github, licenced under GPL v2.

 

Quick start guide - webcam

  • You will need a webcam (even an old one should work, e.g. the PlayStation Eye, install details here: https://github.com/opentrack/opentrack/wiki/PS3-Eye-open-driver-instructions).
  • Install KerbTrack.
  • Install the latest release of opentrack: https://github.com/opentrack/opentrack/releases
  • Download the latest pre-release of aitrack, and extract it to a folder somewhere (not in the KSP directory).
  • Make sure your webcam is plugged in.
  • Run aitrack.exe inside the aitrack folder.
  • Press "Start tracking" and you should see a view from your webcam with pink dots around your face.
  • Start opentrack.
  • Set opentrack's input to "UDP over network", and its output to "freetrack 2.0 Enhanced".
  • Face forwards and click "Start" in opentrack. You should see "no video", and the pink octopus should move when you move your head.
  • Run KSP and go to any craft in flight or on the launchpad.
  • Pause the game, and the KerbTrack window will appear.
  • Under Tracker Settings, make sure TrackIR is selected, and the top of the window says "Enabled (ScrollLock)". If it's disabled, press the Scroll Lock key on your keyboard to enable it.
  • You should now be able to look around using your head in flight, IVA and the map view.

Every time you want to use webcam tracking with KSP, you need to run aitrack, "Start tracking", run opentrack, "Start".
Once you have head tracking working above, this setup works with lots of other games too: https://beam.eyeware.tech/games-opentrack-webcam-head-tracking-software/

Tracker descriptions

TrackIR/opentrack

Supports TrackIR and other systems which emulate it, such as opentrack.
When using opentrack, select TrackIR as the tracker in KerbTrack. In the opentrack, set the Input tracker appripriate to your hardware setup, and select "freetrack 2.0 Enhanced" as the Output.In the Output settings, ensure "Use TrackIR" or "Enable both" is selected. Thanks to Stilton for the info and Medsouz for the plugin for TrackIR support.

opentrack supports many different input methods, with new ones being added regularly. Check out their website to see whether support for your hardware is available. Here's what it supports out of the box at the time of writing:

ic3Nw0K.png

Joystick

Joystick mode can be used to assign the axes of a joystick or gamepad to camera orientation. This can also be used in conjunction with headtrackers not directly supported by KerbTrack, such as LinuxTrack, by setting the head tracker to operate as a virtual joystick. Open the KerbTrack toolbar in the game, go to Tracker Settings and select "Joystick" mode. The menu then allows configuring which joystick to use and which axis to assign to which direction.

Version History

v1.6 (2024-07-08)

  • Updated for KSP 1.12.5.
  • Moved UI to toolbar.
  • Fixed saving settings.
  • Fixed Linux support and axis inversion. (thanks to Unit327 for this)
  • Fixed movement joystick in flight view orbit camera and in map view.
  • Added button to reset sliders to default.
  • Set up defaults for gamepad.
  • Improved the UI.

v1.5 (2018-03-14)

  • Updated for KSP 1.4.1.
  • Added support for opentrack.
  • Added position axes to joystick tracker.
  • Added description text for trackers.
  • Removed defunct trackers: use opentrack with the TrackIR setting, or set your tracker to output to the Joystick setting.

v1.4 (2017-03-12)

  • Updated for KSP 1.2.2.
  • Added improved handling for TrackIR errors.
  • Improved accuracy for position scale editor.
  • Updated GUI.

v1.3 (2016-10-24)

  • Updated for KSP 1.2.
  • Added FTNoIR zeroed data fix (thanks to @DaMichel for this).
  • Changed logging to use [KerbTrack] to take advantage of the new KSP log colorising system.

v1.2 (2015-08-09)

  • Added support for joystick camera control.

v1.1.3 (2015-08-09)

Oculus Rift-only release.

  • Fixed Oculus Rift quaternion tracker.
  • Upgraded to OVR SDK 0.6.0.1.

v1.1.2 (2014-10-16)

  • Fixed persistence for scene toggles.

v1.1.1 (2014-10-14)

v1.1 (2014-10-13)

  • Added support for FeepingCreature's IQuatTracker for more accurate Oculus Rift tracking.
  • Added the ability to disable tracking in external and map views.

v1.0.1 (2014-09-23)

  • Fixed dependency errors when not using TrackIR.

v1.0 (2014-09-13)

  • Full release.
  • Added support for TrackIR and the Oculus Rift.

v0.1 (2014-03-27)

  • Alpha release.

Usage tips

  • Scroll Lock enables/disables headtracking.
  • Sensitivities are adjustable in the toolbar menu.
  • Rotation and movement limits are adjustable in the settings.cfg at:
     
    GameData\KerbTrack\Plugins\PluginData\KerbTrack\settings.cfg

     

  • You can interact with IVA controls like the throttle as normal when using KerbTrack.

Known issues

  • Using the close-up window views is supported, but looks a bit weird with the kerbal whose eyes you're meant to be seeing through sitting behind you.
  • Two-axis control is working in external views (pitch and rotation around the craft), but it's difficult to see the far side of the craft for any given camera position. This makes EVA piloting very difficult as you can't turn back the way you came from. More work on the cameras is needed. Pressing the key to disable the tracker (Scroll Lock by default) and then moving the camera normally can be useful in this situation.
  • Not currently added to other scenes such as the Tracking Station, VAB or KSC.
  • There are currently no limits on the range of the magnified head motion, so you can stick your head out of the window and view your craft from the outside, or do the Exorcist head twist. Now configurable.
  • Head tracking requires a good frame rate. With a single-figure FPS, you can't judge when to stop moving your head to look in a particular direction, making it completely unusable.

Potential future projects

  • Linux and Mac support via Linux track.
  • Head-controlled joystick
  • Alternative input systems.
  • Shaky-cam / g-force movement effects. Done by KerbQuake.
Edited by pizzaoverhead
1.6 release.
Link to comment
Share on other sites

So you can look around an IVA that much while still having your face pointed at the screen? or do you need a big screen?

It magnifies your movements so you can look slightly to one side and have the character in-game look over their shoulder. It's all configurable in FreeTrack and FaceTrackNoIR. They have curves, deadzones and smoothing to set it up whatever way you like. I'll include some sensible defaults too.

Link to comment
Share on other sites

hey cool. i tried to get this to work, i had limited success around 0.13 so i gave up (c# is not my language).

glad to see someone else give it a shot. if you can find it, there is a version of freetrack that supports trackir cameras, and wiimotes also work fairly well. this should all be taken care of freetrack side if you are using the freetrack api.

Edited by Nuke
Link to comment
Share on other sites

freetrack used to support trackir through the optitrack sdk. ive used it and its better than the official trackir software. up till the point that natural point threw a fit and hit the freetrack developers with a cease and desist. ultimately they removed support for the device to comply, but the older version is still clinking around the intertubes. freetrack was already stable at the time, and the update just removed the optitrack support. it uses the same api and is forward compatible with the newer version (and the only reason they put it out was to comply with naturalpoint's demands). ive used it and its better than the official trackir software.

there is kind of a grey area about the legality of using it, so im not going to post a link because im not sure if it would break forum rules or not.

to support the trackir officially, you need to sign an nda and make your code closed source. which means you wouldn't be able to comply with squad's post your source policy.

Edited by Nuke
Link to comment
Share on other sites

What about TrackIR? I've been asking for this feature since I first heard of KSP.

Edit: I should read initial posts more carefully.

I second the TrackIR support. I use it all the time for Arma and flight sims. Would love that in KSP. Would give me more reason the use IVA's

Nuke is correct. Natural Point have disallowed using the Track IR interface with FreeTrack. See the 11.20.2008 update here:

This is a maintenance release.

Natural Pointâ„¢ requested us to remove Track-IRâ„¢ cameras support from FreeTrack.

Of course, FreeTrack still supports all webcams and Nintendo Wiimote cameras.

It looks like Track IR support could be done another way however, like in this project:

http://forum.unity3d.com/threads/59345-TrackIR-Support

I don't have a Track IR to use for developing this, but it would be a good project for someone who does.

Edited by pizzaoverhead
Link to comment
Share on other sites

I'm sad that trackIR support is no longer on the cards but I'll only be using that for Arma 3 once I get an Oculus Rift [consumer version].

How does it work with interactive IVA's? I haven't played KSP in a while, but isn't there a "look around mode" and a "drag the throttle lever around" mode? Can you do both at the same time with this?

It would be neat to add Razer Hydra support, so you could reach out and toggle switches, but maybe that's a bit out of this projects scope.

Link to comment
Share on other sites

if you supported joystick input you could use something like tir2joy or freepie as an in-between (thats how i was able to get trackir support into mechwarrior 2).

actually i think you can use free pie to push trackir data onto freetrack's api.

Edited by Nuke
Link to comment
Share on other sites

Couldn't a basic conversion software work for TrackIR? Sort of the same way there is a driver I used to convert TrackIR into joystick for Planetside 2 freelook in vehicles.

Hey, could you point me toward that info? I've been getting back in PS2 and would love to get TIR working with it.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...