More Fun with Unity and Kinect

(tinkerheavy.com) This is a demonstration of the Unity wrapper for OpenNI. My skeleton is tracked as I move in front of the Kinect. My feet are rigid-bodies that can kick the boxes. The boxes are also carryable if two hands interact with it simultaneously.

If you already have OpenNI+NITE working with your kinect, the binary for this project (pc and mac) is here: http://tinkerheavy.com/unityskeleton.zip
To get the others working you’ll need to get OpenNI and NITE from OpenNI.org (to use the kinect get sensorkinect from GitHub - avin2/SensorKinect: PrimeSensor Modules for OpenNI instead of the openni.org sensor module)

The code and unity project are available on my git:

Great Work Amir!!!
I am very excited about the various potential of Unity with Kinect…

Is the kinect running on an xbox or a pc. I can’t tell from the video. Very cool though.

Nice work :sunglasses:

JP

Very cool! Just got my kinect home, I’ll start right away!

If I may ask a silly question: How do you “connect” to the Kinect when running this? When I run this the scene with the boxes comes up but nothing else. My Kinect works with all of the OpenNI and NITE samples just fine. Any tips?

EDIT: I got it, you have to do the pose. I was impatient. Works great, good work!

I just raise my hands to the air, look up and say “please god make it work” and then it does. Every testing moment is a miracle.

Kyuss: this works on OS X or PC. I don’t even own an Xbox!

I’m watching this with great interest, as we are looking to use the kinect for mocap into unity3d (at Film Academy). I’ve setup openNI/Sensor/NITE, the NITE examples work fine here including skeleton tracking.

If I open this project in Unity3D, the floor and cubes are all bright magenta (missing texture/material?), the boxes have a missing script in the Mono Behaviour (I think the carryable goes here?). Also the first 2 spheres have a missing script (would the hand script go here?)
Also the camera is missing a script (which one?).

If I open the executable I see the floor and boxes textured fine, but striking the pose all I want, I don’t see a character appearing… any tips would be highly appreciated.

OK I think the Nite3 script goes on the camera, when I do that i get DllNotFoundException: OpenNI

Hi Amir… I installed all the libraries and dependencies as wrote on readme, and I got it working with the precompiled unityskeleton (and unitiskeleton2 found on your website)… but I can’t make working the unity project because it has lost all the links to the monobehaviours (and also shaders and materials…)…

I think you should use the “export package” feature to keep the logical links between the assets inside the project…

btw, thank you for your work!.. we will start expreimenting it really soon!

PS: I found a shorter way to install the libusb-1.0 library, downloading the roxlu openNI repo through github and manual copying the content of /Source/External/LibUSB/Mac/ inside the /opt/local/bin/ folder in my mac.

Only a last question… (I’m talking about OSX unityskeleton build): I noticed that the axis are inverted… I changed the mirror option to true inside OpenNI.xml and I get the right X movement, but I still have the wrong Z axis orientation…

I’m sorry I suck at sharing Unity Projects! I’ll learn how to use export package now!

if you want it to be looking at you and mirror image i think you should just put a negative sign somewhere in there. also will do this to the project when i learn to export packages

looking at this,…my mind start to think about my new challenger!

good job!

Here is a video showing what I’ve been able to do with the info I found in this forum. Just using FAAST to drive a character in unity. very simple yet very cool
(I already posted this in another thread but I thought it fits here too)
Thanks to all!

We are trying to get this to work here, but both on windows and Mac the error message that comes from running the binary is

DllNotFoundException: OpenNI
at (wrapper managed-to-native) xn.OpenNIImporter:xnEnumerationErrorsAllocate (intptr)
at xn.EnumerationErrors.Create () [0x00000] in :0
at xn.EnumerationErrors…ctor () [0x00000] in :0
at xn.Context.InitFromXml (System.String xmlFile) [0x00000] in :0
at xn.Context…ctor (System.String xmlFile) [0x00000] in :0
at Nite3.Start () [0x00000] in :0

(Filename: Line: -1)

Any clue on whats wrong?

/Thomas

REALLY awesome job, this will be so much fun to look forward once I know enough (and have gotten a kinect =) )
One thing though: with such bg music and such an avatar, you should have done the robot dance instead! :open_mouth:

/Kweiko

Great job amir!

Using your project example I was able to develop this Penalty Kick “game”! It’s not a game yet but it’s still very fun!!!

Nice work…Thanks for the info abt setting it up.

First Thanks for your work. Your ReadMe (for MacOS X) works really good. (Only thing that not work or i had to do also - i guess this is installed on your maschine was: *****1.1 sudo port install git-core *********** after 1) Intall MacPorts from: http://distfiles.macports.org/)

The Tests and your Skeleton-Programm (compiled) works perfectly on MacOSX.

But my Problem is now the Unity-Project. If I download the whole thing over git. I get a folder with the Assets Folder etc. If i open for example skeletontest-project. there a lot of Missing-Scripts on the gameobjects. And i can’t even compile it.

What can i do to fix this? Do you have also a simpler version? Than i could start to bring all together again. Or am i the only one with this problem?

Thanks for any help

René Bauer