Official Microsoft Kinect SDK Released

For those interested:

greate! U3D can use it?

C#, so yes.

but is .net 4.0+ ?

Oh. Need to check it

Doubt it can be used, since we don’t have the Unity sourcecode (for integration)

We can always buy it

Its Microsoft, they likely have the SDK ready for .NET, so it might work with Unity’s Mono without need for Pro (I doubt you need Unity sourcecode, since at the very least it would probably come as DLLs)

You are right but unfortunately I don’t think current Unity’s Mono version is updated to .net 4

I get a weird error when Unity tries to Compile Microsoft.Research.Kinect.dll. Has anybody got this working or solved this issue?

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.TypeLoadException: Could not load type ‘System.Runtime.Versioning.TargetFrameworkAttribute’ from assembly ‘Microsoft.Research.Kinect’.

at (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType (System.Reflection.Module,string,bool,bool)

at System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError, Boolean ignoreCase) [0x00000] in :0

at System.Reflection.Assembly.GetType (System.String name) [0x00000] in :0

at Mono.CSharp.RootNamespace.GetTypeInAssembly (System.Reflection.Assembly assembly, System.String name) [0x00000] in :0

at Mono.CSharp.RootNamespace.LookupTypeReflection (Mono.CSharp.CompilerContext ctx, System.String name, Location loc, Boolean must_be_unique) [0x00000] in :0

at Mono.CSharp.GlobalRootNamespace.LookupTypeReflection (Mono.CSharp.CompilerContext ctx, System.String name, Location loc, Boolean must_be_unique) [0x00000] in :0

at Mono.CSharp.Namespace.LookupType (Mono.CSharp.CompilerContext ctx, System.String name, Location loc) [0x00000] in :0

at Mono.CSharp.Namespace.Lookup (Mono.CSharp.CompilerContext ctx, System.String name, Location loc) [0x00000] in :0

at Mono.CSharp.TypeManager.CoreLookupType (Mono.CSharp.CompilerContext ctx, System.String ns_name, System.String name, Kind type_kind, Boolean required) [0x00000] in :0

at Mono.CSharp.TypeManager.InitCoreTypes (Mono.CSharp.CompilerContext ctx) [0x00000] in :0

at Mono.CSharp.Driver.Compile () [0x00000] in :0

at Mono.CSharp.Driver.Main (System.String[ ] args) [0x00000] in :0

Join us on http://groups.google.com/group/unitykinect

I started this google group to work on Kinect with Unity. Many of the people on the group have been developing with the OpenNI bindings for Unity too.

I will be sure to join .

I don’t believe you can use the sdk directly, due to the .NET issue. However, I got it to work with unity by writing a plugin in c++ (unfortunately, this does require unity pro).
The plugin is pretty simple, practically just exposed functions to call the sdk functions. The hardest part was getting the Visual C++ project to compile into a .dll that I could use as a plugin (I ended up taking one of the sample kinect projects from microsoft and replacing the main file with the plugin code, then I changed the project to build to a .dll instead of .exe and it worked).

I don’t plan on putting up the plugin (compiled dll or code) since it’s just a quick fix so I can start developing, but I’d be happy to answer any questions about how I did it.

You Should Consider sharing your .dll file.

Bumping for greatness!
Post your code and then we can all work on it,OpenSource.

I’ll post it soon (hopefully early next week, but I make no promises), I just have to clean up some sections before I do.

Here’s a download link to get the current version of my kinect plugin / wrapper.
http://dl.dropbox.com/u/1149693/KinectPlugin.zip

I’m probably going to put it up in a more permanent place at some point, but I figure this’ll do for now.

I’ve included the c++ project used to expose some of the kinect sdk functions to unity and a unity package containing the compiled dll, three scripts for the wrapper and a test scene that lets you view the points that the kinect tracks in 3D.

I did not include a model that you can test the model-mapping with, the model I’ve been using really isn’t optimized for model mapping with the points that the kinect sdk gives you (the hip gets thrown out pretty badly). You should be able to test it out with just about any human model (it helps if it starts in T-pose, and the skeleton should be structured with the hip as the root).

Hope this helps.
-Peter Kinney

Hi Peter!
Awesome work! but do you have any tip of how can I calibrate with your code 2 players?
Thank you very much,

Sergi

PAY ATTENTION FOLKS

  1. MS Kinect is for Non-commercial applications for Windows 7 only.
  2. You can not run on XBOX.
  3. You are not free to distribute and show up. There are a lot of trick restrictions at the license agreement.
  4. Looks that Microsoft wants a lot of programmers working on Kinect but no one really using it for game or business.

Carefully read the license agreement and FAQ before waste your time developing applications.


These are running at 25 fps on my box (which has a fairly average CPU and graphics card).

Done using only the free Microsoft Kinect SDK and a Unity plugin written in C# (using the free Visual Studio Express 10). Works in Unity Indie (which is what I use). While the SDK is for non-commercial use this is not as limiting as you might expect. For example, you are allowed to use the SDK for an installation work for which you are being paid.

http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/faq.aspx