Platform Page Template
- 1 What is <Platform Name>?
- 2 Installing <Platform Name>
- 3 Using Audience Interaction
- 4 Example Code and Drivers
- 5 Videos
What is <Platform Name>?
Description of platform goes here.
Installing <Platform Name>
Quick overview of what you need to install this platform.
Video Capture Card
- Before starting anything, make sure you have the Osprey Video Capture card installed on your machine. If not, find out if you SHOULD be installing it in the first place!
- If you have the go-ahead, shut down your machine and open up the case.
- Find an available PCI slot and GENTLY slide it into said slot. BE CAREFUL WHEN DOING THIS, WE IMPLORE YOU.
- Once seated properly, close your computer back up and turn it on.
Osprey Capture Card Drivers
- Download the Osprey Capture Card Drivers zip file from this page.
- Unzip the folder and run setup.exe
- Follow the installation prompts and finish installing these drivers.
- You can check if the drivers installed properly by checking the Device Manager by going to the Start Menu and searching Device Manager. Look for Osprey 2X0 under Sound, Video, and Game Controllers.
- Next, download the Audience Interaction Server and Drivers zip file.
- Unzip the folder and install both of the Java executables. The Audience Interaction drivers uses these older versions of Java, so you'll need to install them even if you have a more current version on your machine. You can hold off on restarting until both are finished.
- Reboot your machine.
- Once restarted, attach your camera to one of the component slots in the capture card.
- Try running the NetDiff batch file located inside of the Audience Interaction Server folder to see if it works.
- If the batch files don't seem to run, you will need to set your system path to recognize the newly installed Java versions. See instructions below.
Setting the Java Path
- Before starting anything, find out where your version of Java installed. Generally, it will be located at C:\Program Files (x86)\Java\j2re1.4.2_16\bin, but make sure you know where to find it and pay attention to the version you installed!
- On Windows 7, go to the Start Menu and type "System" in the search bar and find the System icon.
- Click on the System icon, and, once the Control Panel window opens, click on Advanced System Settings.
- When the System Properties Window appears, check to see you are on the Advanced tab.
- Look for a button with Environment Variables... and click it.
- Now, in the System Variables list, look for "Path" and click it. This will bring up the Edit System Variable window.
- In the Variable value field, if there is anything there, add a semi-colon (;) to the end of it - they are used as delimiters for multiple values.
- After the semi-colon, add the Java paths for the version we installed. Again, it will be something like C:\Program Files (x86)\Java\j2re1.4.2_16\bin.
- With that now set, close the system windows and try to run the NetDiff batch file. If it still doesn't work, make sure to check that you didn't add the wrong version of Java, and that the path matches exactly.
- If the NetDiff window opens, you are ready to start using Audience Interaction!
Integrating with Unity
As long as the NetDiff window is open, you are ready to start using Audience Interaction with Unity. Most of the code you will need to use is provided in the demos we have created for you.
To learn how to use it inside of Unity, see the example projects and instructions below.
Using Audience Interaction
- Before you can really begin using Audience Interaction, you need to first check whether the camera is properly connected.
- From the Start Menu, search for OspreyConfig and run it.
- Once there, you should be able to see a list of all connected devices - yours should be the Osprey 100.
- Expand that list item and select the Video Filter.
- Click on Show Properties for Selected Filter. This should bring up a window that lets you tweak your camera to work just right. Generally, you shouldn't need to change many of these settings, but they are there should you need to.
- In the Input tab, check to make sure the "Video Present" checkbox is checked - this lets you know whether the card thinks the video camera is on and working. If you think that it should be working, but it doesn't appear to be, make sure the camera is on and ready, and make sure you have plugged in the component cables properly.
- Close out of these settings once you are happy with the settings / the camera is working.
The Audience Interaction Server (NetDiff)
- In order to send messages from the capture card to Unity, you'll need to run the server that is provided.
- In the Audience Interaction Server and Demos folder, look for runNetDiff.bat - this will start the server and begin sending information about the images.
- runNetDiff should bring up a Controls window. Click the PreviewFilter checkbox to bring up a window with the cameras view - not only does this confirm that the camera is working properly, but it also can be used in case you don't have line of sight to the users.
- Leave this window up, and you can now begin using Audience Interaction within your projects. You should first start by running one of the demos we've provided for you, and then begin figuring out how you want to integrate that into your own project.
Using Audience Interaction with Unity
- Make sure that the Server (NetDiff) is currently running.
- Attach AudienceInteraction.cs to an object within the scene - this can be an empty node, or the main camera. This main script does all of the server requests for you, as well as contain the functions you need to access the image difference values.
- In order to get the values of the image differencing, you will first need to Calibrate - this simply takes a picture of what the camera sees at that point in time, and then compares the current image to the stored images. The AuidenceInteraction.cs script is set to use the following buttons for calibration:
- L = Left
- R = Right
- U = Up
- D = Down
- With the calibration finished, you will need to take the horizontalLeanPrecentage and verticalLeanPercentage from the object holding AudienceInteraction.cs and apply the values for movement. The Simple Audience Interaction Demo illustrates this very well.
- For reference, 0.0 = Left / Down, 1.0 = Right / Up.