Kinect + Unity on Mac

1,371 views
Skip to first unread message

Qiuming Li

unread,
Feb 21, 2011, 6:10:49 PM2/21/11
to OpenNI
Hi everyone,
I'm working on a project which potentially I'm planning to use Unity3D
and Kinect, ideally on a Mac.Hope you guys can help me out.

The idea is basically using Kinect to track a flying plastic toy
flying up in the air, knowing its depth (distance from the sensor) and
its speed, when the toy reaches its peak and stops to move up, I'll
trigger Unity to do something based on the distance from the sensor.

I'm pretty new to hooking up kinect and unity, I found a link from a
discussion of our group, which is here:
http://planetmatt.com/integrate-kinect-unity3d-on-mac/
I dont quite know how to use MacPort, is it necessary to install
libusb? Also the "unstable OpenNI" download link from that site is
dead I think.

Any ideas for implementing my idea will be great. Any help is
appreciated.

Thanks in advance!

Amir Hirsch

unread,
Feb 21, 2011, 7:01:13 PM2/21/11
to openn...@googlegroups.com, Qiuming Li
I am not having any trouble getting the OpenNI and NITE unstable from OpenNI.org.

MacPorts and libUSB is a requirement. I have had some experiences on other people's Macs where despite repeated attempts, libUSB's dependencies would not cooperate.

Let me know when you have OpenNI working and I can help you get my Unity projects running. 


Amir


--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To post to this group, send email to openn...@googlegroups.com.
To unsubscribe from this group, send email to openni-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.


Qiuming Li

unread,
Feb 21, 2011, 7:38:44 PM2/21/11
to Amir Hirsch, openn...@googlegroups.com
Thanks for your reply.
I'm totally new to MacPorts. I actually have installed it already, but it seems not like a normal mac app that I can click and get an interface. Shall I type in something and install libUSB in Terminal? Can you give me an instruction on that as well? 
--
Qiuming Li / Qiu qiu qiu qiu - Ming
-----------------------------------------------------------
"stay hungry, stay foolish"

Amir Hirsch

unread,
Feb 21, 2011, 7:43:01 PM2/21/11
to Qiuming Li, openn...@googlegroups.com
You need to run it in terminal.

if you have macports installed just type "sudo port install libusb-devel +universal" and then wait for a while.

for one of the dependencies it might error and tell you to get xcode and java from apple and it will give you a URL for that.



Amir

Qiuming Li

unread,
Feb 21, 2011, 9:28:33 PM2/21/11
to Amir Hirsch, openn...@googlegroups.com
Hi Amir,
I did get macport working. The key turned out to be restarting my computer and then run it...... But I got these error as well, which I dont think has anything to do with Xcode or Java. Not sure what it means, something about "openssl". I attached a screenshot, hope you can help me fix this.

Also, from the link you recommended, step 3 install unstable OpenNI, the link directed me to an invalid url ( I attached what showed up as well). I searched OpenNI website, does it mean this one "OpenNI Unstable Build for MacOSX 10.6 Universal x86/x64" from the link below?


Thanks!
2011-02-21 6.19.10 PM.png
屏幕快照 2011-02-21 6.24.59 PM.png

Qiuming Li

unread,
Feb 22, 2011, 11:08:52 AM2/22/11
to Amir Hirsch, openn...@googlegroups.com
Hi Amir,
Thankfully, I got all the components installed. Here's the Unity thing I guess. It's not working right now, just wanna make sure I did the correct thing from the tutorial.

1. As it's instructed, I assigned the soldier and floor color and normal texture, but what does it mean "12. Cube object to Nite.cs (Nite5.cs in this case)"?
I didn't find Nite5.cs, so I just assigned the Nite.cs script to the cube, does it matter?

2. "13. Relink transforms to Nite script". I found your explanation from the other post, but not sure if I got it right.

"assign it to a gameobject and drag the transforms in your hierarchy corresponding to the torso, the root, the elbows, arms, hips and knees into the corresponding public variable in the inspector. 

The root will be translated based on your position, so you need to set a scale and bias, all others joints will be rotated based on your skeleton orientation. "

This is what I did, I created an empty gameobject, and simply assign the Nite.cs script to this gameobject, and then I specify each public var to corresponding "joint" from the soldier object. I attached an image to show what I got.

3. Since we are using the same Nite.cs script, I'm wondering do I need to specify corresponding "joints" also in the cube - Nite.cs? Basically the same thing with last step I did.

4. I did assign the smooth camera script to the main camera, but it turns out to give me back of the model all the times. How can I fix this? I attached what happens as well.

5. When I got all these done, and hit play, unity keeps giving me this error in the Nite.cs. I don't know how to fix this or what I did wrong.


Sorry to bother you with so many questions, I really really appreciate your help.

2011-02-22 8.00.15 AM.png
2011-02-22 8.06.17 AM.png
2011-02-22 8.11.20 AM.png
Reply all
Reply to author
Forward
0 new messages