Author Topic: Trackir/Freetrack/analog viewpoint movement support?  (Read 14795 times)

0 Members and 1 Guest are viewing this topic.

Offline Deimos

  • 23
Trackir/Freetrack/analog viewpoint movement support?
Hi, I've been lurking around these boards for quite a while, and i must say I'm simply amazed by the progress made by SCP team since the retail game - Thanks for all your great job :D

And getting to the point - since there already is some basic cockpit functionality available, and there seem to be more advanced versions of it on the way, the ability to use some head tracking equipment to control player's point of view in freespace would be great.
There's already been some questions about TrackIR support in the past, but the strongest argument against that was trackIR's price - it's a quite expensive toy. However I've found an alternative to trackIR lately - it's called Freetrack:
http://www.free-track.org/english/
Basically, it offers the same functionality as TrackIR, but the software is free, open source, and all you need is a webcam, a few LED's, and some time to put together a headphone clip, or a cap that would allow to track your head movement, for example something like this:

And you can enjoy full 6 degrees of freedom head tracking, and to make things even better - it's compatibile with most TrackIR-supporting games. With a correct setup it works like a charm. I've been using it for a while in flight sims, but I'd really love to be able to use it in freespace once the cockpits are in.
I've heard some people complain about cockpits obstructing their view and say they usually disable them. But believe me, there's nothing like sitting in a cockpit of eg. helicopter and being able to look down on your MFD, by simply tilting your head down, zooming the view by moving your head closer to the monitor, being able too peek above the instruments panel by straightening up in your chair, or moving closer to the window of the cockpit to be able to look below the helicopter - all by just moving your head. It's something you just need to try to be able to fully appreciate.
Here are some videos of freetrack in action:
http://www.youtube.com/watch?v=R3FXBhEmLWM
http://www.youtube.com/watch?v=PwHX4wY1nyo

And if implementing real freetrack/trackir support is too hard or there are more features with higher priority then how about at leas adding the ability to bind cockpit POV movement/rotation to joystick axes? Both Freetrack and trackir can output head position data as a virtual joystick.

By the way, I know there's been some discussion about trackir in the past, but there wasn't a separate tread about it, and i didn't want to hijack some other treads, so i decided to post a new one.

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: Trackir/Freetrack/analog viewpoint movement support?
Woo, DIY-TrackIR! I'm just wondering - how accurate is this system actually with 640x480 (VGA) resolution webcam, and does the software compensate (and if yes, how well) for the typical low FPS speeds of (especially cheaper) webcams, or do I need to get a 50€ webcam before getting smooth and accurate end results?

At any rate, I'll have to check this out, thanks for the informative post!
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Trackir/Freetrack/analog viewpoint movement support?
before i bought my track ir i was using a software called cam2pan which was a total piece of crap in my opinion (or rather my webcam). anyway framerate is important, the camera needs a high fps. color depth is not important. i think the track ir is only a 1 bit camera with an infra red filter. in theory you could take any high performance webcam, stick an ir filter over it and use ir leds. the proper decoding software is important, you need to reverse-project the blips fast enough to provide axial deta and also keep it in good calibration. track ir's software is really good at this. this freetrack is rather impressive. can it utilize the track ir hardware?

as for the cockpits, ive been doing some experimental virtual cockpit features with lua scripting. heres a demo of what ive done so far:
http://www.youtube.com/watch?v=-PM69ICOhsE

its buggy but it works.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Deimos

  • 23
Re: Trackir/Freetrack/analog viewpoint movement support?
Freetrack is quite accurate with any camera running 320x240 (you actually don't really need to go to to 640x480, even if you can) @ 30FPS - most of them can do this, even the ones for ~10EUR . The movement is really smooth when all the LEDs are clearly visible to the camera. And they are they're bright enough and there isn't much sunlight shining directly at the picture background, or if you use some infrared LEDs and swap IR filter present in all webcams for visible light filter - then it works perfectly even in brightly lit room. Here's a captured frame from my IR-modified labtec webcam - 320x240, 30FPS, minimal exposure and gain setting, brightly lit room:

(sorry for image artifacts, a bit too much compression :D )
Anyway, if you're interested in trying it out, make sure to check this forum:
http://freetrack.online.fr/forum/index.php?showtopicgroup=8

Also, the head movement is constantly being filtered, so you don't have to keep your head exactly still to look in one place, but all actually intentional movements are easily being picked out, you can also set deadzone and sensitivity to your liking. Really, it's worth giving it a try, especially if you own a webcam - it doesn't take much effort to build a tracking clip, and using it is a lot of fun :D

Freeetrack is really high quality open source software - all the more important for other high quality open source project - FSO to support it :D

Nuke - that looks simply amazing, and great cockpit model too :) By the way - maybe head tracking possibility should be considered when modeling cockpits, so that they have all the walls in place?

[EDIT]
Just noticed - there's a nice article on wikipedia with some tech details, pros and cons of Freetrack.
http://en.wikipedia.org/wiki/FreeTrack
[/EDIT]
« Last Edit: November 26, 2007, 06:21:44 am by Deimos »

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Trackir/Freetrack/analog viewpoint movement support?
unlike most ships in the game i designed my cockpits from the start to be visible from the inside. most were just modeled for external views. nukemod has several cockpitted ships. the chimera, the satyr, the sepulture (in video), the shagrath, the phoenix all have cockpits and im currently working on revisions of the seker, and vulture which will include cockpits and normal maps. im also contemplating doing a full bridge for the rumrunner and all the ragnarok varients. my long term plan is to include cockpits with fulling working panels and animated flight controls in alll nukemod ships. and to be able to look around with head tracking hardware.

il post my lua script after i smash a few more bugs.

head tracking is definately something i enjoy messing around with. im curious about using other weabcams perhaps as hand trackers, using different colored leds so as not to cause any cross-interferance. parhaps add the possibility of reaching out and flipping switches on the panels and manipulating other controls. one thing i was disapointed in with the track ir was how everythnig was proprietary. no linux support and no build in joystick emulation (though ive recently discovered tir2joy). all the config apps for my ch gear and my head trackers take up a rather large chunk of my processing power. usually running ppjoy, trackir, and ch control manager all at once on some games (mechwarrior 2 for example). most of the time im still at the mercy of the game's input code.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Re: Trackir/Freetrack/analog viewpoint movement support?
Nuke, why don't you join the SCP? Or do you not know C++?

This FreeTrack thing looks cool, though it would probably be too much for my PC. I think that my camera could handle it, though.

And
:welcomeorange:
Deimos!
Gettin' back to dodgin' lasers.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Trackir/Freetrack/analog viewpoint movement support?
i know enough c++ to write a simple line drawn 3d game engine. the problem is that freespace is mostly written in c, and im not so good at c. i looked at the code once and it traumatized me for life. its probibly alot cleaner now but still, the memories, the horrid memories :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Deimos

  • 23
Re: Trackir/Freetrack/analog viewpoint movement support?
3D bridge on a starship - aaah, that brings sweet memories of my Boron Ray from X2 :D Would be nice to be able to sit on a bridge with working panels and indicators in freespace, and to be able to use head tracking in them :)

@colecampbell666 - I don't know what you computer is, but on my Sempron 2800+ it takes 2-5% CPU power (usually closer to 2).

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Re: Trackir/Freetrack/analog viewpoint movement support?
P4 @ 1.5 Ghz.

What we need is fully humanoid AI for every person/Shivan/Vasudan in the game. It might be a few petabytes, at the most.
Gettin' back to dodgin' lasers.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Trackir/Freetrack/analog viewpoint movement support?
This looks cool.
* jr2 does want.

« Last Edit: November 26, 2007, 01:49:28 pm by jr2 »

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Trackir/Freetrack/analog viewpoint movement support?
Right now, the BTRL project has a TrackIR SDK from NaturalPoint. I'm currently working on implementing TrackIR support in the game. So far, I've gotten freelook views to work independently from the ship controls (Nuke seems to have done it as well) and so now I'm working on creating a DLL that will abstract all the calls to the TrackIR drivers (Since NaturalPoint won't allow us to make explicit calls to the NaturalPoint client DLL visible to the public).

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Trackir/Freetrack/analog viewpoint movement support?
id rather have it work in c than in lua. also my implementation is stuck with using mouse emulation so i dont get 6dof. also the refresh is framerate dependant.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Deimos

  • 23
Re: Trackir/Freetrack/analog viewpoint movement support?
can it utilize the track ir hardware?
Sorry, but somehow i missed this question before. If by hardware you mean the trackir 3-point headphone clip, it should work without problems, you'd just have to measure it and input its dimensions into the software. With 3-reflector cap clip (vector extension, or whatever they call it) you would need a few strong IR LEDs illuminating you, and a camera with removed IR filter or else it won't pick the reflected light (and some measurements again). Same thing with 1-point reflective cap, but i don't know why would anyone want to use 2DOF control if they can get 6DOF almost as easily.
If by hardware you mean the TIR camera, right now it doesn't work with it. From what the main freetrack developer says, it could, but he doesn't have TIR hardware, so he can't test or develop it.

colecampbell666 - Your computer should handle it , but i guess you should simply try and see how much CPU power will it take. You can always take 3 flashlights attached to something in trinaugular formation, measure distance between bulbs, input them into FT sowtware ans see how it runs (minimize and see CPU usage in task manager - it has much more CPU usage when its window is open). If its performance is satisfactory, you could try building a LED clip...

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Trackir/Freetrack/analog viewpoint movement support?
i recorded another video. this time i added a gunsight.
http://www.youtube.com/watch?v=QEu60IjiGfI
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Trackir/Freetrack/analog viewpoint movement support?
@Deimos, you like over torquing those engines, eh?  XD

 

Offline n0s

  • 24
  • happy to have FS2O
Re: Trackir/Freetrack/analog viewpoint movement support?
thanks for the infos, looks awesome.

finally, i've got a good reason to buy a webcam^^

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Trackir/Freetrack/analog viewpoint movement support?
Right now, the BTRL project has a TrackIR SDK from NaturalPoint. I'm currently working on implementing TrackIR support in the game. So far, I've gotten freelook views to work independently from the ship controls (Nuke seems to have done it as well) and so now I'm working on creating a DLL that will abstract all the calls to the TrackIR drivers (Since NaturalPoint won't allow us to make explicit calls to the NaturalPoint client DLL visible to the public).

Will you be committing the the code for the FS2_Open exe to CVS?
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Trackir/Freetrack/analog viewpoint movement support?
i think the rules are the dll must be closed source, but the interfaces to that dll can be open. the dll code itself would be seprate. really theres nothing that says that you cant put the interface to the dll into cvs. even if only btrl is allowed to use the dll, theres really nothing that can stop users from dropping the dll into the freespace dir.

then again theres nothing stopping you from getting youre own sdk. im sure natural point wouldnt mind adding another title to the compatability list.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Deimos

  • 23
Re: Trackir/Freetrack/analog viewpoint movement support?
@Deimos, you like over torquing those engines, eh?  XD
Not my movie ;) Actually, i thought the same about the guy who posted it :D

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Trackir/Freetrack/analog viewpoint movement support?
i think the rules are the dll must be closed source, but the interfaces to that dll can be open. the dll code itself would be seprate. really theres nothing that says that you cant put the interface to the dll into cvs. even if only btrl is allowed to use the dll, theres really nothing that can stop users from dropping the dll into the freespace dir.

then again theres nothing stopping you from getting youre own sdk. im sure natural point wouldnt mind adding another title to the compatability list.

Based on the process that BtRL had to go through to get TrackIR support, I'm pretty sure they would frown on another mod just tossing the DLL into their own game files, or if it were widely distributed with FS2_Open itself, unless somebody contacted them about using it.

I was working on the TrackIR stuff for BtRL at one point, so I did have access to the SDK.
-C