📜 ⬆️ ⬇️

Free Track DIY

image

Hello. I will talk about such an interesting program as FreeTrack - a program for head tracking in computer games. But first, a small prehistory.

Somehow watching a video on a well-known YouTube resource stumbled upon an interesting video. In it, a man with an unknown device on his head was playing an aircraft simulator. It seems to be nothing special, but I noticed that turning my head to the sides, the gaze in the game turned in the same direction as the head. Having a little polaziv on the Internet I understood that people themselves make such devices using a special program. Its essence is as follows: there is a webcam and three (or four LEDs) located on the frame at some distance from each other. The program evaluates the video stream from the camera and, depending on the position of the points in space, “moves the eye” in computer games. Then I thought that the people also wrote this program, figured HOW it was difficult (especially with my initial level of knowledge of programming languages) and scored somehow.
')
But, having recently googled this topic, I realized that the people themselves make only this framework. And the program is ABSOLUTELY FREE and free to download (incidentally written in Delphi). It is called FreeTrack . Soon, I purchased a webcam specifically for this program to try on the A4Tech PK-835MJ Camera (I’ll say right away that the main criterion for choosing a camera is the frame rate per second. For the program to work correctly, the camera must output 30 fps. but in general, the list of compatible cameras is present on the official website of the developers of the program).

Next is the turn of the hardware.

Having installed the program, climbing through its options, I found, in fact, the scheme of the framework and the location of the LEDs on it. Their 4. So:
1) Just one LED (by the way, it may be infrared. The camera perceives this wave range, but the human eye does not). In this case, it turns out only 2 degrees of freedom. Which is very good for mouse emulation (there is such an option in the program), but in games that support 6 degrees of freedom is not very good.
2) Three LEDs are on the same vertical line. This frame is attached to the headphones (I chose this particular scheme). Provides 6 degrees of freedom.
3) There are also three LEDs, but they are located at the vertices of the triangle and at different distances from each other. Also 6 degrees of freedom.
4) Four LEDs. The same arrangement as in point 3, but only one LED in the center was added.

I understand that it is difficult to understand how it looks. Therefore, anyone interested, download the program - there everything is drawn and similarities are given for self-assembly drawings. Well, then there will be a few photos. Everything will be immediately clear to them.

Here is the "similarity of drawings" in the program. all required dimensions are given.
image

So, choosing option number 2, I went to the pope with a request to make such a frame. Actually, half an hour and now such a device is made
image

This foil textolite with soldered LEDs through current-limiting resistors, and with a connector for the power supply.

Next, double-sided adhesive tape secured on the headphones. This is how it looks.
image

It is worth noting the following: in the forums dedicated to flight simulators, it is advised to disassemble the camera and pull the infrared radiation filter out of it. Instead, put a filter of visible light (since the program must "understand" only clear points from the LEDs. There should be no glare in the camera lens, otherwise the program will perceive them as points and will not work correctly). But I did not do anything with the camera. Just when I use this device, turn off the light in the room. But who wants to play in very bright rooms, people advise to insert a filter into the camera - either an illuminated film, or a piece of floppy disk.
And yet - in the manual for the camera it is written that it does not require a driver. Running without a driver turned out to be few settings and it was not possible to reach 30 frames per second. Therefore, I installed the driver from the a4tech pk camera - 335. Everything worked as expected.

Program setting

For each individual case, you need to apply your settings. Let me just say that the camera needs to be configured in such a way that nothing could be seen on the screen, except for the LEDs. That is “darkness” on the screen and three (in my case) white dots. The following are my screenshots of the program settings for the camera A4Tech PK-835MJ with brief descriptions:

what was mentioned above is configured in the camera driver called by the "Camera" button
image
image
image

In this tab, you can adjust the sensitivity of the axes. That is, turning the head really to a minor angle, the game will turn to a more significant angle. And so for every degree of freedom.
image

I forgot to say. This program emulates the protocol of communication with the games "TrackIR", as well as supports its own. On this tab, it is selected. You need to look here for a list of supported games and which protocol for which game you need to exhibit.
image

With these parameters, I did not understand, to be honest, so I left everything "by default". The only thing I realized is that with the help of these parameters you can adjust the turning boundary of the virtual head along the axes.
image

Here, too, left everything as is
image

Similarly
image

And on this tab you choose which frame scheme with LEDs will be applied.
image

Conclusion

Feelings such: Test Drive Unlimited, even with 2 degrees of freedom is very cool to play. Also with the wheel. And in Live For Speed, it supports 6 degrees of freedom, that is, you can move forward and see the dashboard, tilt your head, look out the window, etc. etc. It feels great, but you need to get used to and correctly adjust the sensitivity along the axes, choose the “middle ground”. Otherwise there will be either very sharp movements or very insensitive ones.

And finally, a video from LFS.

Source: https://habr.com/ru/post/127082/


All Articles