Kinect v2 Examples with MS-SDK is a set of Kinect-v2 (aka ‘Kinect for Xbox One’) examples that use several major scripts, grouped in one folder. The package contains over thirty demo scenes. The avatar-demo scenes show how to utilize Kinect-controlled avatars in your scenes, gesture-demos – how to use the programmatic or VGB gestures, fitting room demos – how to create your own Kinect dressing room or character overlays, etc. You can find short descriptions of all demo-scenes in the K2-asset online documentation. This package works with Kinect-v2 and Kinect-v1 (aka Kinect for Xbox One & Kinect for Xbox 360), supports Windows 32- and 64-bit builds and can be used in both Unity Pro and Unity Personal editors.
Free for education:
This package is free for academic use (i.e. in schools, colleges and universities, by students, teachers or researchers). If you match this criterion, please e-mail me to get the K2-asset directly from me.
My only request is NOT to share the package or its demo scenes in source form with others, without my explicit consent, regardless of whether you purchased it from the Unity asset store, or got it from me free of charge for academic use. Please respect my work.
* First, please check if you can find the answer you’re looking for on the Tips, tricks and examples page, as well as on K2-asset Online Documentation page. See also the comments below the articles here, or in the Unity forums. If it is not there, you may contact me, but please don’t do it on weekends or holidays. This is the only time I can have some rest.
* If you e-mail me, please include your invoice number. I provide free e-mail support for the first 3 months after the product purchase (limited to max 10 issues). More information regarding e-mail support can be found here.
* Please mind, you can always update your K2-asset free of charge, from the Unity Asset store.
How to run the demo scenes:
1. Install the Kinect for Windows SDK v2.0 or Kinect Runtime. The download link is below.
2. If you want to use Kinect speech recognition, download and install the Speech Platform Runtime (both x86 and x64 versions), as well as the needed language pack. The download links are below.
3. Import this package into new Unity project.
4. Open ‘File / Build settings’ and switch to ‘PC, Mac & Linux Standalone’, Target platform: ‘Windows’.
5. Make sure that ‘Direct3D11’ is the first option in the ‘Graphics API’-list, in ‘Player Settings / Other Settings / Rendering’.
6. Open and run a demo scene of your choice from a subfolder of the ‘Assets/KinectDemos’-folder. The short descriptions of all demo scenes are available here.
7. To build Windows store UWP-10 project, follow the steps in this tip.
* The official online documentation of the K2-asset is available here.
* The official release of the ‘Kinect v2 with MS-SDK’ is available at the Unity Asset Store.
* Kinect for Windows SDK 2.0 (Windows-only) can be downloaded here.
* MS Speech Platform Runtime v11 (32- and 64-bit versions) can be downloaded here. Please install both x86 and x64 versions, to be on the safe side.
* Kinect for Windows SDK 2.0 language packs can be downloaded here. The language codes are listed here.
* If you get compilation errors like “Type `System.IO.FileInfo’ does not contain a definition for `Length’”, you need to set the build platform to ‘Windows standalone’. For more information look at this tip.
* If the Unity editor crashes, when you start demo-scenes with face-tracking components, look at this workaround tip.
* If the demo scene reports errors or remains in ‘Waiting for users’-state, make sure you have installed Kinect SDK 2.0, as well as the other needed components, and the sensor is connected.
* Here is a link to the project’s Unity forum: http://forum.unity3d.com/threads/kinect-v2-with-ms-sdk.260106/
* Many Kinect-related tips, tricks and examples are available here.
* The official online documentation of the K2-asset is available here.
* These examples were developed with Kinect for Windows SDK v2.0 – dev preview 1404-1407, public preview 1409 and release 1410. To run the latest version of the K2-asset, please install the latest release of Kinect v2 SDK.
* If you get compilation errors, like “Type `System.IO.FileInfo’ does not contain a definition for `Length’“, open the project’s Build-Settings (menu File / Build Settings) and make sure that ‘PC, Mac & Linux Standalone’ is selected as ‘Platform’ on the left. On the right side, ‘Windows’ must be the ‘Target platform’, and ‘x86’ or ‘x86_64’ – the ‘Architecture’. If Windows Standalone was not the default platform, do these changes and then click on ‘Switch Platform’-button, to set the new build platform. If the Windows Standalone platform is not installed at all, run UnityDownloadAssistant again, then select and install the ‘Windows Build Support’-component.
* If you experience Unity crashes, when you start the Avatar-demos, Face-tracking-demos or Fitting-room-demos, this is probably due to a known bug in the Kinect face-tracking subsystem. In this case, first try to update the NVidia drivers on your machine to their latest version from NVidia website. If this doesn’t help and the Unity editor still crashes, please disable or remove the FacetrackingManager-component of KinectController-game object. This will provide a quick workaround for many demo-scenes. The Face-tracking component and demos will still not work, of course.
* Unity 5.1.0 and 5.1.1 introduced an issue, which causes some of the shaders in the K2-asset to stop working. They worked fine in 5.0.0 and 5.0.1 though. The issue is best visible, if you run the background-removal-demo. In case you use Unity 5.1.0 or 5.1.1, the scene doesn’t show any users over the background image. The workaround is to update to Unity 5.1.2 or later. The shader issue was fixed there.
What’s New in Version 2.13:
1. Added speech recognition support to the Windows Universal-10 builds.
2. Added KinectProjectorDemo scene based on RoomAliveToolkit calibration, to demonstrate 3D overlays over the real users, from projector point of view.
3. Added ‘Apply muscle limits’-setting to the AvatarController-component, to limit the avatar bone rotations to the muscle limits, as set-in-Unity avatar definitions.
4. Added support for pausing apps in Windows Universal-10 builds.
5. Added ‘Skip remote avatars’ and ‘Estimate joint velocities’-settings to KinectManager (courtesy of Andrew/Andrzej W).
6. Added ‘External head rotation’-setting to the AvatarController-component (courtesy of Andrzej W).
7. Added ‘Raised right horizontal left hand’ and ‘Raised left horizontal right hand’-poses to the KinectGestures-component (courtesy of Andrzej W).
8. Added UserHandVisualizer-script component, to allow 3d visualization of the user’s hands.
9. Updated FacetrackingManager-component, to optimize the HD face-model updates.
10. Fixed KinectHolographicViewer-scene, when the user moves forwards or backwards.
..a video by Ranek Runthal, created with Unity4, Kinect v2 and “Kinect v2 with MS-SDK”, v.2.3
..and a video by Brandon Tay, created with Unity4, Kinect v2 and “Kinect v2 with MS-SDK”, v.2.0: