You can use any webcam to track player's head position in real time. Players head is traced only in 2D. You can move "virtual cam" in X & Y axis. Cam Z value is fixed. On default it is above cab/display border closest to player.
Face detection is cpu power hungry. If You have 2 (or more) cores in Your machine it will not do big harm to FP frame rate.
This plugin is added to BAM as default. Merely, attach your webcam to your computer. You can place camera on top of , or in front of Back box.
For starters you can try:
- Run the program for your CAM from producer and try to:
- Disable automatic gain & exposure regulation
- Set it manually to make face clearly visible
Automatic regulation almost always has "gain"set too high and face on cam is like a big bright spot.
- Run BAM and test face recognition. If you don't see green box on "face" with default setting try again to set CAM params from previous point.
Set values in plugin menu:
- Detection pattern - LBP is fastest, but make more "jittering", I use "Haar 1".
- Min Face Size - green square displayed on "cam view" have width/height. You can set minimal accepted size. Try to increase value. If you increase this value too much, then "green" box will disappear. Then reduce value little bit. By doing this you will prevent detection of objects "smaller" than your face that may be interpreted as a "false face". It will increase performance too.
- Max Face Size - is maximal accepted size.
- Step Scale - lower value will incease detection accuracy but reduce performance.
Other Menu options:
- Cam Z - You can move virtual camera position in Z axis.
- Max threads - face detection can start multiple threads. More thread will increase CPU usage and number of processed frames from camera, but reduce whole game performance. Default value (2) is probably best.
- Face Detection - switch to enable / disable FD algorythm.
Once you have accomplished "good" tracking, go to "3 points" menu. BAM needs to know distance between left and right edge of your table, and how high they are in cam. You do this by showing BAM the first 2 points in "3 points" setup.
You can "put" face on points, but it is inconvenient. (But it can be done). I use an object (plastic tube) with known height and set these points at known distances (only verticaly) from screen. This distance is measured to "eye" level. Put one end of "plastic tube" on "red diamond" displayed on screen. Put the other end at your face/"eye". Then press "set point" (face detection is required). Do likewise for setting the second point.
BAM will ask for third point. This point is used only to trace in 3D. With "Simple Cam" it is unused. You shoud set "any" point. This point is not used in calculations.
About "distance" betwen screen and eye.
This is distance between "red diamond" displayed on screen and "eye" in the moment when You press "Set point".
When you finish "3 point" setup BAM recognizes the points as "level 0" (or CAM Y=0). Now you need to tell BAM, that "level 0" is lower. To do this You should set this distance with "Shift Y"under "Reality" Submenu
(Please remember to set size of your TV screen, because this value is used to translate values in CM or INCHes to Future Pinball Unit).
This mode is simplest way to test head tracking. You do not need any equipment except webcam. You can see how this works in the following movies:
by The Loafer