Jump to content

FreeTrack and A-10C (64bt) HeadTracker Implementation


Recommended Posts

Ok, so I finally cracked how to implement a custom HeadTracker.dll for the A-10C game :D It works on my machine, and that's about as much as can promise at the moment, I've literally just got it to work! But if anyone else wants to give it a try I'd be very interested to hear if it works for you.

 

If this works for you it will allow you to use the 32bit FreeTrack application with the 64bit version of DCS A-10C. Instructions are included in the zip file... There's a fairly simple one off setup, and then it should just work behind the scenes for you.

 

Please feel free to post questions here.

 

<DEPRECATED> HeadTracker Binaries.zip </DEPRECATED> SEE BELOW FOR AN UPDATED VERSION


Edited by samtheeagle
  • Like 2
Link to comment
Share on other sites

  • Replies 174
  • Created
  • Last Reply

Top Posters In This Topic

Wonderful!

 

It works perfectly, I had no issues at all installing or using it.

I saw no reason to change from your default values in the .prefs-file either, everything works very well and was very simple to use.

 

Thank you!

Core i5-760 @ 3.6Ghz, 4GB DDR3, Geforce GTX470, Samsung SATA HDD, Dell UH2311H 1920x1080, Saitek X52 Pro., FreeTrack homemade cap w/ LifeCam VX-1000, Windows 7 Professional x64 SP1.

FreeTrack in DCS A10C (64bit): samttheeagle's headtracker.dll

Link to comment
Share on other sites

Cool, I guessed that the default prefs values would be ok, a standard webcam at a "regular" sitting distance from the camera would yield the same kind of FOV. Still, I though it was important that people could tweak things to suit their setup.

Link to comment
Share on other sites

A good idea indeed, many people with freetrack don't use a webcam (but use wii remote or eyetoy instead) so it was a wise decision.

Core i5-760 @ 3.6Ghz, 4GB DDR3, Geforce GTX470, Samsung SATA HDD, Dell UH2311H 1920x1080, Saitek X52 Pro., FreeTrack homemade cap w/ LifeCam VX-1000, Windows 7 Professional x64 SP1.

FreeTrack in DCS A10C (64bit): samttheeagle's headtracker.dll

Link to comment
Share on other sites

Excellent news :)

 

Having exchanged some messages with V4Friend (of FreeTrackNoIr fame) it seems that my FreeTrack wrapper application is a bit superfluous, as FreeTrack already creates a shared memory area and a controlling mutex. That's what my wrapper does, via the FreeTrackClient.dll, but that's not really needed.

 

Of course my way seems to be working for people, but I've reinvented the wheel somewhat :D I could defo simplify things now knowing what I do now.

Link to comment
Share on other sites

Of course my way seems to be working for people, but I've reinvented the wheel somewhat :D I could defo simplify things now knowing what I do now.

 

 

Sounds great, is this something you're planning to do?

Core i5-760 @ 3.6Ghz, 4GB DDR3, Geforce GTX470, Samsung SATA HDD, Dell UH2311H 1920x1080, Saitek X52 Pro., FreeTrack homemade cap w/ LifeCam VX-1000, Windows 7 Professional x64 SP1.

FreeTrack in DCS A10C (64bit): samttheeagle's headtracker.dll

Link to comment
Share on other sites

Yes, definitely :) I've already had a quick tweak of the code, so once I get home from work I'll be able to do some testing to see if I've got it to connect into the native FreeTrack shared memory area...

 

Oh yeah, and once I've got that sorted and tested I'll post the code up here too.


Edited by samtheeagle
Link to comment
Share on other sites

Ok, so I've learned a thing or two today and from that I have made some updates to my HeadTracking system :smilewink: The FreeTrack wrapper application I developed was not really required, as FreeTrack already provided the same functionality already, I was just unaware of that fact :doh:

 

But that makes things even easier, as there's now only the HeadTracker.dll to worry about. If you used the earlier version you should remove the wrapper, and undo the change you made to your FreeTrack shortcut. There's no need for that with this new version.

 

Just place the HeadTracker.dll and HeadTracker.prefs into the bin/headtracker/ folder and you should be set.

 

<DEPRECATED> HeadTracker Binaries.zip </DEPRECATED>

 

And this time I'm including the source code, for those who are interested.

 

<DEPRECATED> HeadTracker Sources.zip </DEPRECATED>


Edited by samtheeagle
  • Like 2
Link to comment
Share on other sites

Great to hear it's working well for you guys :)

 

Errrm, yeah, I assume that BlackShark supports the same API from ED, so in theory it's just a case of recompiling it as a 32bit dll. I'll look in to doing that tomorrow and give it a quick test. If it works I'll post up a 32bit binary :)

Link to comment
Share on other sites

Edit: this is for the A10 binaries:

 

Awesome work bud. Worked straight away on my system. I now have a great looking cockpit, I can read the warning lamps and switches and have dynamic cockpit shadows.

 

Oh, and no more stuttering :-)

 

Feels like a new airplane!

 

Big Rep to you! and many thanks.

 

Just one question - The axes need a bit of tweaking. Do I do this via the freetrack control panel as normal?

 

Hope to test the Black shark binaries soon.

Link to comment
Share on other sites

You can adjust the axes just as you would in Free-track previously.

Only the bounds of the translational axes (X, Y, Z) might need to be adjusted in the headtracker.prefs file provided with the dll.


Edited by Boulund
removed irrelevant information

Core i5-760 @ 3.6Ghz, 4GB DDR3, Geforce GTX470, Samsung SATA HDD, Dell UH2311H 1920x1080, Saitek X52 Pro., FreeTrack homemade cap w/ LifeCam VX-1000, Windows 7 Professional x64 SP1.

FreeTrack in DCS A10C (64bit): samttheeagle's headtracker.dll

Link to comment
Share on other sites

Yes, generally speaking the axes should be adjusted in FreeTrack as normal. The slight exception to this is the translation stuff. Let me try to explain how the data is mapped...

 

For the rotational values FreeTrack outputs values in radians, which when converted max out at 160 degrees in each direction.

 

Translation values however are expressed in terms of millimeters. There is no fixed limit as to what the maximum translation values can be, as they will vary from user to user. It will depend on the camera FOV and how far you sit from the camera.

 

Knowing the maximum extents of the FreeTrack data is important as the Head Tracker dll needs to send data the the game in the range of -1 .. +1 for each of the axes. And with known maximum values we can simply divide by that to scale the values as required.

 

It is because the Translation ranges are not fixed that I introduced the HeadTracker.prefs file. It allows you to define what the maximum translation values are (You can find this out via the FreeTrack GUI).

 

So as long as the max bound specified in the prefs file reflect your set up then the FreeTrack adjustments should be perfectly ok. But if the prefs values are waaaaaay out of whack then the adjustments in FreeTrack wont be very good.

 

Does that help clear things up?


Edited by samtheeagle
Link to comment
Share on other sites

@Boulund: Heh heh, you beat me to it. I was waffling too much me thinks :D The thing with the translations is that the prefs file defines the maximum possible values for each axis. If it is set incorrectly you'll find that the movements will either be excessive, or not enough. The prefs define the scaling factor, so if it's not right all the outputs from FreeTrack will be scaled using the wrong value, and so will be wrong :doh: Setting the bounds should be a one time task when you initially setup. Of course if you changed your camera or seating arrangement it may need updating... And with the bounds set you can then adjust the sensitivity within the FreeTrack GUI too.

 

Hmmmm, I hadn't noticed that about BlackShark. Thanks for the heads up :D In which case that dll probably wont work right now. I am currently adding in some code to find the folder that the HeadTracker.dll file resides in at the point it gets loaded into the games process. With that implemented I wont have anything hardcoded, so it should be more robust.

 

Thanks again, I'll finish off the new version once I get home from work :)


Edited by samtheeagle
Link to comment
Share on other sites

I just tested with BlackShark and it doesn't seem to be working. I don't have time to perform an extensive test to determine why though. :(

 

In the scripts/input/input.lua it still refers to the headtracker.dll in the location ./bin/headtracker/ so it's seems alright to put it there anyway samtheeagle.

Core i5-760 @ 3.6Ghz, 4GB DDR3, Geforce GTX470, Samsung SATA HDD, Dell UH2311H 1920x1080, Saitek X52 Pro., FreeTrack homemade cap w/ LifeCam VX-1000, Windows 7 Professional x64 SP1.

FreeTrack in DCS A10C (64bit): samttheeagle's headtracker.dll

Link to comment
Share on other sites

Thanks for that chaps. The problem I have is when I try to look square-on at the MFDs. I have to lead so much to one side that I go out of my camera's view. I'm guessing that this is the Translational X axis. I too am at work ATM so wont be able to try it until later.

Link to comment
Share on other sites

@bacongrabber: Yes, that sounds like you need to verify your HeadTracker values, and then once those are correct play with the sensitivity sliders in FreeTrack.

 

And I've still not got the HeadTracker.dll (32bit) to work with BlackShark yet. I'm a bit stumped atm.

Link to comment
Share on other sites

If that were the case, then headtracking would work anyway eh?

 

Of course it'd be nice with a headtracker.dll solution for Black Shark as well but it is really a non-issue since there is already a working free-track solution for Black Shark. The obvious benefit of the headtracker.dll-solution is the avoidance of file alteration and semi-legal issues.

Core i5-760 @ 3.6Ghz, 4GB DDR3, Geforce GTX470, Samsung SATA HDD, Dell UH2311H 1920x1080, Saitek X52 Pro., FreeTrack homemade cap w/ LifeCam VX-1000, Windows 7 Professional x64 SP1.

FreeTrack in DCS A10C (64bit): samttheeagle's headtracker.dll

Link to comment
Share on other sites

Heh heh :) Thanks for the suggestion, but I have undone the TrackIR Fixer mod. All I'm getting in the log files is a message that the head tracker failed to load... So it perhaps suggests that the file location is ok, and that it's the dll that's the issue. No idea why tho atm.


Edited by samtheeagle
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...