Jump to content



Photo
* * * * * 2 votes

Head tracking + Vpx gl (with guide)

tutorial head tracking BAM kinect guide

  • Please log in to reply
53 replies to this topic

#1 chuckydown

chuckydown

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: Spain

  • Favorite Pinball: Batman66

Posted 30 November 2023 - 09:28 AM

Hi, after spending a couple of weeks fighting with BAM and KINECT 2, I want to try to make a tutorial for those who haven't succeeded and in the process gather all the followers of this system here.
 
I have read for a long time BAM is only useful for showing it to friends or uploading a demonstration video, I don't see it that way, once it's on I can't play without it, I've also tried VR and it's fantastic but I made my pinpall as a social hobby, not to be isolated, its possible that it has improved compared to previous VR or non-GL versions, the fact is now It works perfectly for me, finding the right POV ...... is another story.
 
Please feel free to suggest changes in my English translation or in the steps I made,  in this time I have installed, deleted and reinstalled many times and each time I have dealt with the BAM configuration, is possible that I wont transfer it here too.
 
My computer is an i7 13700, 32Gb, rtx 3070 and KINECT 2 (kinect one)
 
 
 
 IMG-20231122-074033-398.jpg
 
 
===================================TUTORIAL================================================
* I will explain it for WIN10 x64x , It will also work on win11
 
-1 The first thing we need is a device to track our head or eyes, it does not have to be a Kinect, can be any of the devices available in the bam tracker list, the "trick" is they are all cheap /old but KINECT 2 is more advanced and for example follows the head (not the eyes, which could cause more problems)
 
The list of devices (you only need one of them) that you can use to test are:
-Simple Cam
-Simple PS3Eye
-Kinect
-HT with PS3Eyes
-Free Track
-TrackIR
-Kinect 2
I will focus on "Kinect 2" in this tutorial, so we will need a Kinect 2 AND a USB3 power supply for Windows, it is very easy to find for example on Aliexpress for about 18-20 dollars/euros
 
I don't know if I can put a link to Aliexpress, please tell me
 
* very important, you MUST have a USB3 port, USB2 will not work and if the more modern USB3 is possible it will work or not
 
**IMPORTANT NOT TO CONNECT ANY KINECT OR ITS POWER SUPPLY UNTIL IT IS TIME.
WE MUST CHECK THAT WE HAVE A USB 3.0 PORT, IF IT IS 3.1 OR HIGHER IT MAY WORK OR IT MAY NOT
 
-2 Download this software
 
2.1 https://www.ravarcad...P-BAM-setup.exe
This is the future pinball with BAM, unfortunately we cannot "at the moment" configure VPX HEAD TRACKING without FP although it is only a first configuration and then we will not use it anymore.
(if you use BALLER installer, it will also install FP BAM)

NOTE: It seems that bam tracker is missing from the last baller install, in that case, download it from here
https://www.ravarcad...AM_v1.5-365.zip
 
Latest version is BAM_v1.5-365.zip, [17 jun 2023]
 
  install it and restart
 
2.2 Kinect for Windows Runtime 2.2.1905
https://www.microsof....aspx?id=100067
 
  install it and restart
 
2.3 Kinect for Windows SDK 2.0
https://www.microsof...s.aspx?id=44561
 
  install it and restart
 
You may need or be asked to install things like:
-Visual Studio 2012 or Visual Studio 2013
-.NET Framework 4.5
 
2.4  Kinect Configuration Verifier tool
https://go.microsoft.../?LinkID=513889
 
So we place KINECT in one of these 2 positions, above the backglass or a few cm / inches above the playfield.
 
kinect-placment.jpg
 
 
Now connect in this order:
1 power supply to adapter
2 usb to pc
3 kinect to the power supply, now kinect should update the firmware. If it does, it may turn off and on several times in the first few minutes.
 
RESTART
 
3  CHECKING
3.1 open the device manager and look for "Kinect sensor devices" to check that it exists and is correctly installed,
      Also look at the version of the driver, in the second tab "driver" it should be 2.2.1905.16000. 
      If not, we can tell it to update Windows the driver or we do it with the file from step 2.2
 
20231129-155454.jpg
 
 
Now before starting, check if KINECT 2 works with these 2 programs installed with the previous packages:
- we look for the program "Kinect v2 configuration Verifier"
Once in it we wait a minute for it to check everything, then the symbols will appear that everything is correct OR NOT,
 
20231130-092326.jpg
 
Here we can check : (green is ok, orange something can't be checked (but it can work))
1 -first we physically see kinect 2 lights up (3 ir leds, logo and camera)
2 -Update configurations...... I think is obsolete as it does not have support but is ok
3 -USB Controller; It may appear orange, this is because our USB is more modern than the one you need, BUT IT WORKS
4 -Verify Kinect Depth and Color Streams; We should see what the camera and sensors see AND the FPS (30).
5 -then close 
 
20231129-155147.jpg
 
 look for the "KinectStudio v2.0" program and open it, click on connect under the MONITOR tab, we should see what KINECT is focusing on, if so IT WORKS!!!
 
20231129-155252.jpgâ
 
 
close kinectstudio.
 
4 FUTURE PINBALL BAM
At this moment we cannot have vpx with head tracking without going through FP BAM, vpx gl has implemented tracking but unfortunately it uses the BAM configuration and you must have it before using it in vpx gl (I hope this changes soon, it is a burden and a complication for setup)
 
4.1 -Now download a FP table (I think it's a good idea that we all download the same one to compare)
https://www.vpforums...340&hl=universe
 
4.2 -If everything works  will open the fploader shortcut (we cannot open FP with its original launcher)
 
4.3 -Once in FP BAM we will open a table with BAM,
4.4 -when we are in the game/table press the letter "Q" to open the "BAM" menu
 
4.5 -Here we will go through the plugins (camera types) with the left/right keys (that is, the head tracking devices we can have), we will go to "kinect 2" and go down to "CALIBRATE". Then we press "enter"
 
-a chess board will appear at the top and then at the bottom.
-At this point we have to make KINECT see our head and 40% of the screen if we have it on top of the backglass OR 80% of the screen and our head if we have it on the part of the backglass attached to the screen.
 
Whether the calibration is successful or not depends on many factors, the size of the screen, the height of the backglass, our height or position, if we have a glass and there is a separation between the glass and the screen...
 
20231130-095238.jpg
20231130-095222.jpg
 
tutorial.png
 
(I have been able to verify that after having configured the tracking we can let KINECT track only the head  ¿?)
 
4.6 -Once this is done, we have to configure the size of the table, we go down in the same Kinect 2 menu to "config" and go to "reality"
 
There we must say the size and distances of our pinball:
-size of our playfield (screen)
-distance between screen and glass and screen and top edge of the table and finally distance to the floor of the top edge of the pinball
 
4.7 Now we must configure the POV, this is the part that I cannot get right, the most important thing to keep in mind is that we must try not to break the horizontal/vertical scale since when moving it will become more distorted.
 

I have been thinking about it in this guide, I could talk about the translation of the table on the X and Y axes,  In fact, there are several tutorials that you can follow, the problem is that I have followed them all and none of them will give us thePOV we are looking for, another problem is each table is different.
 
At this point, after many tests, I am not sure about saving the configuration without touching the pov since when entering vpx gl we have to touch the parameters again
 
 
4.8 -Once we have it, even without configuring the pov we can save it as default, and exit FP (the generated file will be the one needed by BAM Tracker for the VPX)
 
 
 
Now, we need to open the bam-tracker program before vpx, this is located in the BAM folder within FP and will show us a window next to the clock every time it is opened. If we open it, it will show us a window with some coordinates that SHOULD move with our movement.
 
20231129-160007.jpgâ
 
I have discovered that sometimes the Kinect fails by turning itself off and on several times in a row, so we can go to the bam-tracker menu and change to another plugin (even though we don't have it) and put the Kinect back on, it seems to work
 
Capture-de-cran-2021-02-26-a-13-31-09.pn
 
 
4.9 -Then  go to vpx gl,  (I am testing the latest 10.8 beta)
 
5 VPX GL x64
 
5.1 -first let's configure vpx for head tracking
20231130-101242.jpg
go to preferences/Cabinet layout area:
-In Preferences  select  BAM head tracking, We will enter the physical measurements of our screen, the inclination and the distance between the screen and our eyes (Player Z cm)
 

5.1 -Enter a table,  when it loads, it may look more or less good or the screen looks bad, or shrunken or black, if we press the escape key and the menu appears, the table is there, we just have to change the POV parameters so that it appears or looks good, although the modes POV windows do not allow you to be changed in the latest vpx 10.8 versions, is possible to press the "launch" button in this mode to reset the pov, sometimes it works and after that we can work from that image
 

https://www.reddit.c...5d55d68e76cc353
 
so,  press "escape" now we will have a "head tracking" menu in which we can configure our POV.
 
20231129-160249.jpgâ
 
20231114-172550.jpgâ
 
It is easy to see what each parameter does, the difficult thing is to find the appropriate numbers, even more so if vpx will act depending on what we have done before with FP (for this to work, I remind you that it is taking the config files from BAM)
 
 
 
I would love to gather all the head tracking users in this thread to see how far we can go, unfortunately Mr. Rafal, (ravalcade) has told me that he is no longer working on this project, but I have seen initiatives on the forum and I would like   the work continue, including financially supporting.
 
Head tracking works very well, it has aspects to polish such as direct support in vpx gl or the z axis, it can also get messed up if another person is next to the player, but it is the best toy of all, and in my case I have them everything, I can tell you

Edited by chuckydown, 17 December 2023 - 11:22 AM.


#2 sdivodul

sdivodul

    Hobbyist

  • Members
  • PipPip
  • 39 posts
  • Location:NY

  • Flag: United States of America

  • Favorite Pinball: Indiana Jones PB Adventure

Posted 30 November 2023 - 02:13 PM

Nice write up! Too bad the player has to be sitting, as effective nudging will be difficult.



#3 chuckydown

chuckydown

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: Spain

  • Favorite Pinball: Batman66

Posted 30 November 2023 - 03:03 PM

Nice write up! Too bad the player has to be sitting, as effective nudging will be difficult.

 

no, no, This was just an example, what matters is that it is inside the camera, I never sit down to play pinball



#4 Pete248

Pete248

    Enthusiast

  • Platinum Supporter
  • 58 posts

  • Flag: Germany

  • Favorite Pinball: LOTR

Posted 06 December 2023 - 05:38 PM

Great write up. Just set up a new vpin with the latest baller installer (beta version).

 

Setting up Kinnect V2 for Future Pinball was easy. But I struggle with the perfect POV. The table is always moving when moving my head. Ideally the table should be static but all the elevated stuff, ramps etc. should move. Have you nailed this in Future Pinball?

 

When trying to set it up for VPX, my first problem is, that I do not have a Bam-Tracker.exe in the BAM folder of Future Pinball. Something must have changed in the latest baller installer. Maybe it hast been integrated into the FPlauncher. Any idea, where I can find it?

 

UPDATE: Terry Red added the Bam-Tracker.exe to the FP and BAM Essentials so it should be installed by default with Baller Installer now.


Edited by Pete248, 01 January 2024 - 05:47 PM.


#5 MajorFrenchy

MajorFrenchy

    Enthusiast

  • Members
  • PipPipPip
  • 256 posts
  • Location:Canada

  • Flag: Canada

  • Favorite Pinball: The Flintstones

Contributor

Posted 06 December 2023 - 07:18 PM

thanks for the tutorial, this will come very handy



#6 Pete248

Pete248

    Enthusiast

  • Platinum Supporter
  • 58 posts

  • Flag: Germany

  • Favorite Pinball: LOTR

Posted 06 December 2023 - 08:45 PM

Was able to find BAM-Tracker.exe in this archive: https://www.ravarcad...AM_v1.5-365.zip

Have to play a bit more with the settings.

#7 Halen

Halen

    Enthusiast

  • Platinum Supporter
  • 209 posts
  • Location:Belo Horizonte - Brasil

  • Flag: Brazil

  • Favorite Pinball: Shark - Taito

Posted 10 December 2023 - 02:43 PM

Great tutorial but I absolutely can't calibrate the Kinect 2. I've tried everything. FPLOADER in Admin mode and  the calibration standing, sitting and if necessary I can try lying down but it always shows calibration failure. If anyone can help me ?



#8 chuckydown

chuckydown

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: Spain

  • Favorite Pinball: Batman66

Posted 17 December 2023 - 11:14 AM

Great tutorial but I absolutely can't calibrate the Kinect 2. I've tried everything. FPLOADER in Admin mode and  the calibration standing, sitting and if necessary I can try lying down but it always shows calibration failure. If anyone can help me ?


Hi Halen, I don't understand very well... everything works but you can't calibrate? I struggled through the tutorial for this point.
Where do you have the kinect? My ideal position unfortunately has been to raise it 50cm above the backgkass. Why? because BAM needs to see your head and almost half of the playfield in the calibration (the entire chess board) try one thing, if you can place someone sitting in a playing position and do calibrations followed by different positions with kinect in your hands.

#9 Halen

Halen

    Enthusiast

  • Platinum Supporter
  • 209 posts
  • Location:Belo Horizonte - Brasil

  • Flag: Brazil

  • Favorite Pinball: Shark - Taito

Posted 20 December 2023 - 05:25 PM

Hi chuckydown

 

Yes, my problem is the calibration. I thought calibrating while sitting would work, but i have the fail calibration. I was able to do the calibration in Pinball Arcade but I can't do it in Future Pinball. I can see the camera in the FP but when I do the calibration it shows fail.


Edited by Halen, 20 December 2023 - 05:28 PM.


#10 Pete248

Pete248

    Enthusiast

  • Platinum Supporter
  • 58 posts

  • Flag: Germany

  • Favorite Pinball: LOTR

Posted 01 January 2024 - 05:38 PM

I've put mine on top of the backbox looking downwards at maximum angle it allows. And it has to be flush with the front of the backbox. Even 1 cm shifted backwards and calibration failed.

 

But until headtracking works together with 3D in VPX I only use it in Future Pinball. Real 3D is much more immersive than 2D with headtracking.


Edited by Pete248, 01 January 2024 - 05:41 PM.


#11 txvepr

txvepr

    Hobbyist

  • Members
  • PipPip
  • 12 posts

  • Flag: United States of America

  • Favorite Pinball: Black Knight

Posted 11 January 2024 - 03:40 AM

Great writeup on setting BAM Headtracking up with VPX.

#terryred

Background:

I have setup and can run BAM with VPX 1.08.1785 GL and it does work really well on single tables.

I did have to setup the headtracking and can share my settings if interested.

 

Problem:

I do not think BAM is saving individual Headtracking settings per table in VPX.

 

1. I can start AC/DC, the table shows correct, plays good.  Tweak table width, etc. slightly.  Hit Save.

2. Start up Creature, and the table is showing rotated horizontally(messed up). 

Set Headtracking to 90 rotate and it is then working great.  Hit SAVE.   Play away. close.

3. Go back to AC/DC, the table is now messed up, have to set Rotate back to 0, HIt Save.   

The settings do not appear to apply to individual tables as far as I can tell.

 

Anyone have a fix or what Im doing wrong?



#12 Gravy

Gravy

    Pinball Fan

  • VIP
  • 1,082 posts

  • Flag: Australia

  • Favorite Pinball: Simpsons pinball party



Posted 11 January 2024 - 03:52 AM

Hi chuckydown

 

Yes, my problem is the calibration. I thought calibrating while sitting would work, but i have the fail calibration. I was able to do the calibration in Pinball Arcade but I can't do it in Future Pinball. I can see the camera in the FP but when I do the calibration it shows fail.

It's been a long time since I have used BAM headtracking but I do remember having issues with calibration due to screen reflection, so if you have any lights on above the screen it may be worth turning them off and trying again. Remember that what the camera sees is completely different from your own viewing angle so you might not notice any screen reflection from your position.


Pinball Addict


#13 chuckydown

chuckydown

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: Spain

  • Favorite Pinball: Batman66

Posted 17 January 2024 - 11:42 AM

txvepr, is possible, I'm testing different versions all the time and I'm not worried about that while vpx is beta, I am looking for a configuration that does not give me problems and my main complaint is Z axis does not work much and I do not understand why. In a few days I will continue testing, now I am completely dedicated to integrating a topper with Kinect

20240106-143337.jpg


Halen, I also assume that you have removed the playfield glass and any lights around the pinball.

#14 Halen

Halen

    Enthusiast

  • Platinum Supporter
  • 209 posts
  • Location:Belo Horizonte - Brasil

  • Flag: Brazil

  • Favorite Pinball: Shark - Taito

Posted 17 January 2024 - 11:51 AM

chuckydown

 

My cabinet doesn't have playfield glass, just the TV screen. After trying several times i I did the calibration. I try to calibrate again I still get the error. I turned off all the lights. I'm practically in the dark. One last question: how I reset the calibration on the FP and start from scratch?



#15 griffindodd

griffindodd

    Enthusiast

  • Members
  • PipPipPip
  • 117 posts

  • Flag: ---------

  • Favorite Pinball: A fair few

Posted 18 January 2024 - 05:14 PM

Thanks for this write-up. I have a Kinect 2 on hand so it will be fun to give this a try once I have the rest of my rig dialed in properly.


Software: VPX 10.8b7, VPinMAME 3.6, B2S 2.1.0, FlexDMD 1.9.0, Freezy 2.2.1, Pinup Popper 1.5
Cabinet: PF: Sony X85K 4k 120hz Portrait, BG/FullDMD: 1080p LCD, Topper: UHD LCD 
Computer: Alienware Aurora R15 - Ryzen 9 5900X, 96GB, RTX 4080 Super, NVME, Win 11


#16 Cadorna

Cadorna

    Enthusiast

  • Members
  • PipPipPip
  • 134 posts

  • Flag: Argentina

  • Favorite Pinball: Too many to choose ...

Posted 19 January 2024 - 12:14 AM

 
20231114-172550.jpgâ
 
It is easy to see what each parameter does, the difficult thing is to find the appropriate numbers, even more so if vpx will act depending on what we have done before with FP (for this to work, I remind you that it is taking the config files from BAM)
 
 
My two cents about finding the appropriate values: 

 

1 - Put your mouse pointer over the field that you want to change

2 - Click and hold the left mouse button

3 - Move your mouse (while holding the left mouse button) to the left/right to increase/decrease the value.

4 - Release the left mouse button to recover your mouse pointer.


chuckydown

 

My cabinet doesn't have playfield glass, just the TV screen. After trying several times i I did the calibration. I try to calibrate again I still get the error. I turned off all the lights. I'm practically in the dark. One last question: how I reset the calibration on the FP and start from scratch?

 

Try increasing the light in the room or increasing/decreasing the TV brightness/contrast/backlight levels when calibrating. After a successful calibration, you can return to the previous state. Changing the room light level always worked for me.


Edited by Cadorna, 19 January 2024 - 12:13 AM.


#17 txvepr

txvepr

    Hobbyist

  • Members
  • PipPip
  • 12 posts

  • Flag: United States of America

  • Favorite Pinball: Black Knight

Posted 20 January 2024 - 04:50 PM

txvepr, is possible, I'm testing different versions all the time and I'm not worried about that while vpx is beta, I am looking for a configuration that does not give me problems and my main complaint is Z axis does not work much and I do not understand why. In a few days I will continue testing, now I am completely dedicated to integrating a topper with Kinect

20240106-143337.jpg


Halen, I also assume that you have removed the playfield glass and any lights around the pinball.





It's all good, this stuff just takes time and patience. I'll post my tracker settings in a bit.

To the guys with calibration issues, the room lighting may very well be the issue if there is reflection on your playfield glass. It has to be able to see that checkerboard image in FP to get set.
My unit is mounted to the top of backglass angled down.
You can confirm what kinect can see by running the Kinect Configuration verifier or the developers tool.

#18 h0pp4z

h0pp4z

    Hobbyist

  • Platinum Supporter
  • 18 posts

  • Flag: Germany

  • Favorite Pinball: Star Jet, Red & Ted's Road Show, Monster Bash, Star Trek TNG

Posted 25 January 2024 - 12:07 PM

Is the screen orientation important in cabinet scenario? Is it required to have it in portrait mode?



#19 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,006 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 25 January 2024 - 01:20 PM

Great tutorial/write up.  I have been away from VP for a few months and incredibly this is one thing that I wanted to play with again as I never got it working write with VPX on FP.  Thanks



#20 trippingale

trippingale

    Neophyte

  • Members
  • Pip
  • 8 posts

  • Flag: United States of America

  • Favorite Pinball: Mars attack

Posted 25 January 2024 - 07:10 PM

Thank you very much for the information, I have been able to have VPX open with head tracking with consistently. Now the next objective....

 

I have noticed that once Bam head tracking is running in the back ground you can launch the table using the VPX_GL 64,

My end objective and still trying to figure this out how to launch in Pin Up Popper, unfortunately My command of Code and Script is non existent.

 

1.) This requires windows Batch file to start up Kinect 2 heat tracking during windows booting or Pin up start up.

 

2.) A launch script, open and close for the XPX_GL OR VPX10.8_64  that would needed since the current Pin up script isn't working.

 

3) As an advance option have an "Alt launch" with or without the head tracking during the Game selection.

Best regards


Edited by trippingale, 05 February 2024 - 11:11 AM.






Also tagged with one or more of these keywords: tutorial, head tracking, BAM, kinect, guide