Search Unity

Official Microsoft Kinect SDK Released

Discussion in 'Formats & External Tools' started by bocs, Jun 17, 2011.

  1. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
  2. oOZerOo

    oOZerOo

    Joined:
    Mar 1, 2011
    Posts:
    12
    greate! U3D can use it?
     
  3. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    C#, so yes.
     
  4. oOZerOo

    oOZerOo

    Joined:
    Mar 1, 2011
    Posts:
    12
    but is .net 4.0+ ?
     
  5. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Oh. Need to check it
     
  6. saymoo

    saymoo

    Joined:
    May 19, 2009
    Posts:
    850
    Doubt it can be used, since we don't have the Unity sourcecode (for integration)
     
  7. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    We can always buy it
     
  8. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    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)
     
  9. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    You are right but unfortunately I don't think current Unity's Mono version is updated to .net 4
     
  10. PetarJ

    PetarJ

    Joined:
    Nov 2, 2010
    Posts:
    15
    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 <filename unknown>:0

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

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

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

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

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

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

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

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

    at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0

    at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
     
  11. amir

    amir

    Joined:
    Oct 5, 2010
    Posts:
    75
  12. agentleo

    agentleo

    Joined:
    Jan 2, 2011
    Posts:
    56

    I will be sure to join .
     
  13. killerdynamo

    killerdynamo

    Joined:
    Jun 19, 2011
    Posts:
    3
    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.
     
  14. ModesttreeMedia

    ModesttreeMedia

    Joined:
    Nov 16, 2010
    Posts:
    10

    You Should Consider sharing your .dll file.
     
  15. PetarJ

    PetarJ

    Joined:
    Nov 2, 2010
    Posts:
    15
    Bumping for greatness!
    Post your code and then we can all work on it,OpenSource.
     
  16. killerdynamo

    killerdynamo

    Joined:
    Jun 19, 2011
    Posts:
    3
    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.
     
  17. killerdynamo

    killerdynamo

    Joined:
    Jun 19, 2011
    Posts:
    3
    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
     
  18. fergu00

    fergu00

    Joined:
    Feb 20, 2011
    Posts:
    2
    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
     
  19. Claudio Torres

    Claudio Torres

    Joined:
    Jun 26, 2011
    Posts:
    15
    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.
     
  20. carllooper

    carllooper

    Joined:
    Aug 8, 2009
    Posts:
    64



    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
     
  21. Gius

    Gius

    Joined:
    Aug 26, 2012
    Posts:
    2
    Hi Carl!
    I'm trying to get video stream from kinect using http://wiki.etc.cmu.edu/unity3d/index.php/Microsoft_Kinect_-_Microsoft_SDK.
    I attach DisplayColor script on a cube, for example, but if I use MSRKINECTNUI.DLL nothing happens, just remains gray; if I use Kinect10.dll I got an array index out of range error:

    IndexOutOfRangeException: Array index is out of range.
    KinectSensor.extractColorImage (Kinect.NuiImageBuffer buf) (at Assets/Kinect/KinectSensor.cs:258)
    KinectSensor.Kinect.KinectInterface.pollColor () (at Assets/Kinect/KinectSensor.cs:208)
    DisplayColor.Update () (at Assets/Kinect/DisplayColor.cs:22)

    I need to get video stream from kinect, like in your images... where is the error?

    Thanks!
     
  22. markpdolby

    markpdolby

    Joined:
    Oct 15, 2012
    Posts:
    24
  23. Uoho

    Uoho

    Joined:
    Dec 18, 2012
    Posts:
    12
    I have the same problem, did you get to fix it? How? Greetings.