This is a step by step tutorial on how to setup Zigfu with Unity Engine for both window and mac users.
Zigfu is a set of libraries and scripts to provide a platform for apps and games using the Microsoft Kinect. Zigfu was originally developed by Amir Hirsch, Ted Blackman, Roee Shenberg, Shlomo Zippel.
Zigfu provides following SDKs:
1- Open NI,
2- Sensor Kinect
3- Primesense's NITE
You can find some articles on how each of these libraries work by googling them.Make sure to look at the documentation that comes with these libraries to find out how they actually work. They also provide you with the sample codes so you can get some ideas how things run.
Alright, let's get started:
WINDOWS 7
Step 1:
Following requirements are needed for this tutorial:
1- Microsoft's Kinect Device
2- Unity3D Engine(http://unity3d.com/)
3- Zigfu (http://zigfu.com/devtools.html)
Note: Do not install Microsoft Kinect SDK. The SensorKinect driver that comes with Zigfu conflicts with KinectSDK. You can find more information regarding this here (http://zigfu.com/news/?m=201108)
Check out the following link for pros and cons between Microsoft Kinect SDK and the PrimeSense OpenNI SDK:
http://www.brekel.com/?page_id=671
Uninstall Microsoft Kinect SDK in case you have it installed before.Connect your Kinect device to your machine and follow step 2.
Step 2:
Download both DevBundle for window and Unity3d Bindings from Zigfu website.
Step 3:
Run ZigFuDevBundle_v2.0b.exe. After installation is over, you should have two folders OpenNI, PrimeSense in your installation folder.
Step 4:
Now you need to install the SensorKinect driver. Simply go to driver's folders and run dpinst depending on your Windows 7 version. In my case, I am using windows 7 64 bits so I chose dpinst-amd64.exe
\PrimeSense\SensorKinect\Driver\dpinst-amd64.exe
Step 5:
Your Kinect device is now recognized by window.Just check the device manager to make sure your device is installed properly.
simply type devmgmt.msc in Start->SearchBox
Try to check out some of the samples that come with these SDKs. For instance, go to
C:\Program Files (x86)\OpenNI\Samples\Bin\Release\ and run UserTracker.net.exe
Step 6:
At this moment we are going to run Unity3D engine (I assume you have a basic understanding of how the engine works).
First, we make a new project ( File->New Project ). I called mine "KinectFun".
Then you need to import the lovely Unity Package that you earlier downloaded from Zigfu website into your project (Assets->Import Package->Custom Package)
Once imported you should see all the assets provided by zigfu under project.
Time to have some fun. Let’s open up the AvatarFrontFacing scene under “_Scene” folder. You should see a soldier in a T-pos.
Run the game. Once in the game, you need to calibrate the device by following the instructions in the game.
That's all. I would recommend that you look at the scripts and sample scenes that is provided by Zigfu to better understand how the code works.
MAC
Step 1:
Following requirements are needed for this tutorial:
1- Microsoft's Kinect Device
2- Unity3D Engine(http://unity3d.com/)
3- Zigfu (http://zigfu.com/devtools.html)
Following requirements are needed for this tutorial:
1- Microsoft's Kinect Device
2- Unity3D Engine(http://unity3d.com/)
3- Zigfu (http://zigfu.com/devtools.html)
Step 2:
Download both DevBundle for Mac and Unity3d Bindings from Zigfu website.
Step 3:
Step 4:
Once the installation is completed. you should see the following in your terminal:
Step 5:
Try to check out some of the samples that come with these SDKs. For instance, to run the UserTracker.net demo example you need to type the following command in the terminal:
sh test.sh
Step 6:
This part is exactly similar to part 6 above.