Jump to content

[1.4.1] KerbTrack v1.5: Head tracking using your webcam, TrackIR, Oculus Rift, joystick (2018-03-14)


pizzaoverhead

Recommended Posts

From the solution file, looks like VS2012. Personally I use monodevelop, it's free and on every OS, but it probably won't open that solution file either - you'd have to add the files to a new project/solution. That won't be too much of a hassle though, there is only one source (.cs) file.

Link to comment
Share on other sites

I'm having trouble compiling this. visual studio 2010 is unable to open .csproj files. Is there a free and easy way to get this compiled?

Thanks

Open the .sln file rather than the .csproj file. If that doesn't work, just add KerbTrack.cs to a new project, then add Assembly-CSharp.dll and UnityEngine.dll as references.

Link to comment
Share on other sites

Hi. I finally tried this mod with my FTNoIR Pointtracker setup. Works fairly well. It was a lot of fun to fly my planes like that.

I found one problem though: The camera sometimes assumes a wrong orientation for just a frame or so. It happens in irregular intervals i think and i'm not sure what the cause of the problem is. The tracking was not disrupted, judging from what i could see in the FTNoIR window. I'll check it with other games later on.

Regarding FTNoIR vs. Freetrack: For me the face tracking hardly ever works. It depends a lot on lighting conditions. But, FTNoIR comes with a point tracker like Freetrack. And this works quite stable and accurately, provided that you can give it the proper dimensions of your point model.

Link to comment
Share on other sites

Open the .sln file rather than the .csproj file. If that doesn't work, just add KerbTrack.cs to a new project, then add Assembly-CSharp.dll and UnityEngine.dll as references.

Thanks for the suggestions however

Neither Assembly-Csharp.dll or UnityEngine.dll appear to be present on my System.

I had a quick google but none of the download sources I've found look legit.

I have already tried to open the .sln file but I get the "unable to open .csproj files".

Link to comment
Share on other sites

Thanks for the suggestions however

Neither Assembly-Csharp.dll or UnityEngine.dll appear to be present on my System.

I had a quick google but none of the download sources I've found look legit.

I have already tried to open the .sln file but I get the "unable to open .csproj files".

Assembly-CSharp.dll and UnityEngine.dll are the main KSP DLLs. They're in KSP_Data. I've never seen the "Unable to open .csproj files" error, is that the exact text of it? Make sure you're opening the .sln from Visual Studio and not the file itself in explorer.

Link to comment
Share on other sites

icemonkey, the .dll file that's called FreeTrackClient has to go into the general KSP folder. Not into gamedata, not into plugins, but into the folder that CONTAINS that gamedata folder and all the other ones. The folder with KSP.exe in it

Link to comment
Share on other sites

i just got this working and then spent literally the next hour moving my head in stupid ways around my lap top playing with it, it is honestly the most interesting mod it takes a bit of set up but it is so worth it. the best mod i have ever downloaded.

BTW just a note the dll file that needs to be copied into the ksp root directory is the facetrackclient.dll (took me like half an hour to find that out)

Link to comment
Share on other sites

I just got this set up and it seems like it would work really well, but what feels like every second frame the camera goes back to the default forwards view of the capsule. At first I thought it could be my 120hz monitor, but after trying it on 60hz the issue still appears to be there (and worse at 60hz). I know the setup is fine, I'm using FaceTrackNoIR with the point tracker and a home made LED hat thing which works really well for other games, and apart from the flickering the head tracking here appears to be really smooth too. Really awesome work, and I hope this can get fixed too. I'm gonna try the same setup with freetrack to see if that helps soon.

Link to comment
Share on other sites

Hi. I finally tried this mod with my FTNoIR Pointtracker setup. Works fairly well. It was a lot of fun to fly my planes like that.

I found one problem though: The camera sometimes assumes a wrong orientation for just a frame or so. It happens in irregular intervals i think and i'm not sure what the cause of the problem is. The tracking was not disrupted, judging from what i could see in the FTNoIR window. I'll check it with other games later on.

I just got this set up and it seems like it would work really well, but what feels like every second frame the camera goes back to the default forwards view of the capsule. At first I thought it could be my 120hz monitor, but after trying it on 60hz the issue still appears to be there (and worse at 60hz). I know the setup is fine, I'm using FaceTrackNoIR with the point tracker and a home made LED hat thing which works really well for other games, and apart from the flickering the head tracking here appears to be really smooth too. Really awesome work, and I hope this can get fixed too. I'm gonna try the same setup with freetrack to see if that helps soon.

I've confirmed this as an issue with KerbTrack. I'm not sure what's causing it. It doesn't happen on all launches. You may be able to work around it by switching scenes or flights.

I'll see if I can track down the problem. Thanks for the reports!

Link to comment
Share on other sites

I've confirmed this as an issue with KerbTrack. I'm not sure what's causing it. It doesn't happen on all launches. You may be able to work around it by switching scenes or flights.

I'll see if I can track down the problem. Thanks for the reports!

Just so you know, it happens on all launches for me (or it would appear so). I've tried probably 25+ launches to try and make this work, and still nothing. Thanks for the info though, I'll be waiting impatiently for this to get fixed :D

EDIT: After playing about with nearly every KSP setting, the V-SYNC option fixed it! I had to set it to "Every Second V-Blank", and then the next flight I tried worked fine!

Edited by Rureglathon
Link to comment
Share on other sites

icemonkey, the .dll file that's called FreeTrackClient has to go into the general KSP folder. Not into gamedata, not into plugins, but into the folder that CONTAINS that gamedata folder and all the other ones. The folder with KSP.exe in it

Where do you find this file? I don't have it in my Freetrack install location, is it somewhere else? I am using FreeTrack 2.1.2 Because 2.2 wont work for me on Win 8! Please help, :-) Thx

Link to comment
Share on other sites

Face tracking is probably good enough for anything you would do in KSP, but if you want to use IR tracking on-the-cheap here are some tips I've picked up:

The absolute best camera for this is a Playstation Eye. It's high resolution, high frame rate, and you can get it for $12. The new ones with the big microphone array on top are made for tracking the PS Move and have essentially no IR filtering, so you don't have to make any modifications. You do have to add a visible-light filter, but that's REALLY easy. Get a 10 cent pair of cardboard red-cyan anaglyph glasses and fold them in half. It's probably the best filter you can get without paying for professional photo gels, and it's leagues better than overexposed film negative or old floppy disk material.

Make sure you put the camera on its own USB bus (or a USB3 port). Basically just keep plugging into different ports until it works at full speed. That goes for face tracking too.

For IR leds you probably want wide-angle variants. The Osram SFH 485 P is the old recommendation from the FreeTrack forums. You can get a bunch of them and whatever resistors you need from Digikey or something similar for a couple bucks. If you're brave you can power your LEDs from USB, but you'll probably want to put a resettable fuse in the circuit. You'll also supposed to declare any USB power draw on the bus and support USB sleep if you do that, but desktop PCs don't usually care as long as it's well under 100 mA. Laptops I'm not sure about.

I sewed three SFH 485 P into a baseball cap with a pair of AA batteries in the back, but I'm not sure I'd do that if I was doing this again. I had to cut the bill of the cap down to about 2" before I could look down comfortably, and that put the LED plane too close to vertical. (The LED plane shouldn't be allowed to go perpendicular to the camera, or there's a good possibility of losing tracking.)

I also just found a break in my cap wiring somewhere that makes the LEDs turn off whenever I put it on... and come back on whenever I take it off... so I haven't tested it with this mod yet. :(

I've been using OpenTrack (on Windows) since it's in active development and works better than FaceTrackNoIR with the PointTracker (make sure to turn "Dynamic Pose Resolution" on), but I can't tell you if it works with KerbTrack yet.

Link to comment
Share on other sites

for best results rough up the lens on the leds with some sand paper. powering your leds from usb is easy. according to usb spec you are supposed to short both of the data pins (this tells the host controller that you are just using it for power), then you are able to source up to 500ma@5v. since most ir leds have a voltage drop of about 1.5v, you can power about 3 in series off of usb, but i usually do the leds in parallel each with its own current limiting resistor. usb is kind of overkill for this application, i personally use a rechargeable lipo cell.

Link to comment
Share on other sites

Well, the rev 2.0 spec page 171:

Devices must also ensure that the maximum operating current drawn by a device is one unit load, until configured. Any device that draws power from the bus must be able to detect lack of activity on the bus, enter the Suspend state, and reduce its current consumption from VBUS (refer to Section 7.2.3 and Section 9.2.5.1).

One unit load is 100 mA. Section 7.2.3 furthermore goes on to say that you can only draw 500 uA in suspend mode unless you have specifically enumerated as a high-power device that provides wakeup, in which case you're allowed 2.5 mA. Section 9.2.5.1 says that hosts are allowed to veto your power requests (an iPad definitely will).

Of course, the spec is over a thousand pages long. Nobody who makes USB devices actually reads the whole thing, so USB hosts have to deal with a lot. Like devices that draw 550 mA without enumerating, or people who short the data pins together (I think charge-only hosts are the only ones allowed to do that). A lot of desktop PC motherboards just put a resettable fuse across several ports, rate it to a couple amps, and don't even check if devices are drawing the amount of power that they say they are.

So yeah, you can do it, but there's always a chance (a small chance) that your PC has a specification-compliant port -- in which case it won't work. I'd still put a PTC in the circuit so you don't trip the one in your PC when your wiring shorts. Mostly because it will be annoying when your mouse stops working because your hat shorted out, not because you're likely to damage anything.

Link to comment
Share on other sites

usb spec is notoriously overcomplicated. its just a piece of information that you see a lot in electronic hackery blogs. the truth is in the specs (that nobody wants to read).

Link to comment
Share on other sites

Please take these feature requests:

1) Add a pitch offset for the external camera which does just this

FlightCamera.fetch.camPitch = -pitch * pitchScaleFlight + pitchOffsetFlight;

Because i like to look at my plane from an angle without having to lower my head.

2) Make the on/off state persistent. Because when i don't play with KerbTrack i don't want to have to turn it off on every launch.

P.S. The VSync setting fixed it for me too. I wonder if that is because the games fps now coincide with the camera frame rate.

Link to comment
Share on other sites

Please take these feature requests:

1) Add a pitch offset for the external camera which does just this

FlightCamera.fetch.camPitch = -pitch * pitchScaleFlight + pitchOffsetFlight;

Because i like to look at my plane from an angle without having to lower my head.

2) Make the on/off state persistent. Because when i don't play with KerbTrack i don't want to have to turn it off on every launch.

P.S. The VSync setting fixed it for me too. I wonder if that is because the games fps now coincide with the camera frame rate.

I put together a test DLL for the camera issue. See if it has any effect on the flicker without VSync. It also persists the on/off state:

Download

Link to comment
Share on other sites

Just spent a couple hours tracking down old software versions and troubleshooting the install. This mod works for me, using TrackIR 4 equipment, but is very very rough. Lots of flickering, and the Vsync fix posted earlier didn't fix it. I want to use it... but it just isn't playable for me right now. :(

Link to comment
Share on other sites

Why would trackIR 5 not be supported? There are successful trackIR mods for both freespace 2 and IL-1942 (neither of which supported it in the base game) that both work perfectly with my TrackIR5.

Edited by Phearlock
Link to comment
Share on other sites

Because NaturalPoint made changes after version 4 to prevent the equipment from being used with FreeTrack. Those other mods for the other games you mention are adapting the TrackIR software. (I know, I've used them.)

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...