Connecting Kinect + Unity with Official SDK

Hello people

for my thesis I have to make a Unity game with Kinect. However the resources I have found so far are EXTREMELY limited, and mostly focused on showcasing (or Mac’s, I own windows). I tried to figure it out on my own some time back, but being the Unity newbie I am, I couldn’t figure out the simplest thing.

I know most of my way around Unity, and even some UnityScript, but when it comes to making plugins work, hell no.

So any help? I know for a fact I do not want my future character to move exactly as the player, just respond to gestures. So how would I connect Kinect to Unity and then set it up for my future work?

Thanks in advance.

The simplest thing you could do right now is to go to http://zigfu.com/en/zdk/unity3d/

Samples are working on mac and windows. Should provde you enought information to get you going.

Good luck

1 Like

Found some info on 3rd party, but the supervisor asked me to work with the SDK (it is also stated in the topic name). When I asked for more info, he sent me links of 3rd party programs.

I’d like info (if not precise steps) to connect the SDK to Unity.

Well excuse me for wasting my own time trying to help you on your homework.

It seems that you dont grasp on what goes on behind the scenes in order to create a Kinect game. Do yourself a favour. Download the zigfu plugin and see if you can get it to work with Unity. (a lot easier then official SDK)
Then try to make the simplest kinect game there is. If you manage to do that, then it means you have enough coding skill to prototype your own game ideas. If these ideas are working and gameplay is fun then you already have something to work with.

Also that 3rd party program contained some gesture samples that you wanted.
If you are looking trough the sample projects you can find some very useful information that might give you an ideas on how to approach your own implementation.

Good luck

1 Like

I’m sorry, I didn’t mean to offend you!

I think I’m going to have to at least try zf, I see it almost everywhere. Supervisor said I should use the SDK because it can work without calibration, but I guess since he can’t help me with that I’m not obliged to use his suggestions. Thanks :slight_smile:

From memory I don’t think its possible to use the official kinect SDK directly in Unity because its built against .net 4, whilst Unity only supports up to .Net 2.4 or something. But you might want to check that.

Zigfu really is your best bet if you are a novice to writing and dealing with plugins, it will save you huge amounts of time and effort.

Zigfu is based around the openNI project and has been extended to include a ‘bridge’ that allows usage of the offical kinect for Windows drivers and possibly parts of the SDK itself (sorry my memory is fuzzy on that).

Alternatively you could just install openNI and use its c# wrapper in Unity. That is quite complex to set up and even more complex to explain, but i’d point you to the following links

OpenNI.org
OpenNI google group.
UnityKinect google group - started as a general group but is now focused and I beleive run by the zigFu guys
Using Kinect in Unity forum post. This is where I started kinect develop.

Hope this helps, but seriously if your project is about using the kinect and not how to get it running, start with zigfu trial.

Well the kinect itself doesn’t need calibration, if you mean the requirement for people to enter the ‘psi-pose’ that hasn’t been in openNI for about a year. Its pretty automatic now, though does take time for the skeleton to settle down. However I believe the Kinect skeleton tracking is still meant to be superior.

Amir @ Zigfu here…

We actually support Kinect SDK. we wrote our own .NET 3.5 compatible bindings to the Kinect SDK C++ API and exposed them through the same “ZigInput” interface through which the OpenNI bindings are exposed. It was a chore.

This ZigInput interface can also read data from our browser plugin (which can also take input from either KinectSDK or OpenNI) and so you can use Zigfu in the webplayer with our browser plugin. OpenNI works on Mac and PC, and so does our browser plugin, but Kinect SDK is PC-only. Our QA matrix is a disaster.

Both OpenNI (NITE middleware for skeleton tracking) and Kinect SDK support calibration-free skeleton tracking.

We also have a library of gesture control primitives to make hand-gesture UI, though it seems the majority of users are doing full body games. However, we have been experimenting with new sensors (from Leap Motion to name one) and the same hand-tracking gesture controls map very cleanly to finger tracking APIs, so it is likely that this use-case will pick up as new sensors come to market.

use FAAST,
no need for calibration…

http://wiki.etc.cmu.edu/unity3d/index.php/Microsoft_Kinect_-_Microsoft_SDK

contains a wrapper for unity and examples.

I found the Kinect Wrapper Package for Unity3D (the one that you mentioned) difficult to use, there are also problems like:

DisplayDepth - This script will get the depth image. Attach it to a game object with renderer. NOTE: In unity, you need to restart unity everytime after running your world, otherwise this script will not work (because of SDK issue).
DisplayColor - This script will get the RGB image. Attach it to a game object with renderer. NOTE: In unity, you need to restart unity everytime after running your world, otherwise this script will not work (because of SDK issue).

But you can solve it in a way that isn’t written in the official webpage -.-

Are you using it? I am interested in a comparison between the Zigfu ZDK for Unity3D and this Kinect Wrapper Package for Unity3D in terms of performance. I am new of this stuff but I tried Zigfu and it seems really good while with the script DisplayDepth provided in the kinect wrapper I found the fps rate lower then using Zigfu.

Zigfu apparently can’t pull the audio stream from Kinect…means it’s unusable for me. = P

hello,
i want to make an application using unity 3d and kinect i’ve download and install the zigfu plugin and it works… now i want to do something that i don’t know how to do ?? i want to replace a 3d character in one of sample scenes with another 3d object and make it move according to the movements of my body :wink:
any help in this problem, i really want to find a quik solution for it
thanks :slight_smile:

How do I enable movement? Currently moving forward and backwards makes the figure stay at the same position in space while displaying walking movements as I walk.

Don’t everybody speak up at once.

you would probably have to tie ur characters position to the position variable given by the kinect. I will know more specifics tomorrow when i finally get a kinect to experiment on.

Couple things:

To enable movement there’s a checkbox in one of the kinect scripts I want to say either on the camera or on the character.

You can compile the visual studio files and link to them from your own wrapper in Unity. The facetracking example on the asset store shows an example of implementing the kinect sdk facetracking example in Unity. But it’s not trivial.

Hi, I’m very interested in this issue, I need to move an avatar 3d model with my body using kinect detection, but, as “Sounds Wonderful” said, the kinect wrapper for unity only seems to record movement of bones from a fixed global position axis. it will be great if anybody knows how to get the position of the body relative to the kinect sensor to use in the 3d model,

anybody can help me with that?

Hola nuevo en esto y estoy batallando en cosas muy sencillas como si el movimiento realizado hace una colisión con el avatar y un objeto aparezca un mensaje

Mira aqui hay informacion de triggers y colliders para que detected cuando el avatar toca un objeto https://unity3d.com/es/learn/tutorials/modules/beginner/physics/colliders-as-triggers

Can I use Zigfu plugin for connecting Kinect v2 + Unity?