OpenNI official Unity wrapper

2,153 views
Skip to first unread message

Ziv Hendel

unread,
Dec 28, 2010, 6:30:55 PM12/28/10
to OpenNI
Hi Everyone!

We have released the first alpha of our Unity wrapper!

You can find it in:
https://github.com/OpenNI/UnityWrapper

As always, don't forget to check out the README file.

Enjoy :-)

Ziv.

P.S.
Thanks Shlomo for working on this!

SteveElbows

unread,
Dec 29, 2010, 6:46:25 AM12/29/10
to OpenNI
Great work, thanks so much to all involved with this :)

My main dev environment is mac-based so I will have to wait for OS X
NITE to really get into it, but I did give this wrapper a quick try on
Windows last night and it worked great straight away :)

Cheers

Steve

Mike Slinn

unread,
Dec 29, 2010, 9:48:50 AM12/29/10
to OpenNI
Pardon my ignorance, but which Unity is this for? Is it
http://en.wikipedia.org/wiki/Unity_(game_engine) or something else?

Mike

SteveElbows

unread,
Dec 29, 2010, 10:35:25 AM12/29/10
to OpenNI
Yes thats the Unity that this is for. Specifically I assume its for
the Pro version of Unity because the free version of Unity does not
support plugins.

People using the free version of Unity will still be able to get
OpenNI stuff into Unity by some other bridge, eg a separate program
such as OSCeleton that sends joint positions as OSC messages, which
can then be picked up inside Unity using some OSC scripts. This
solution is probably too much of a fudge to be useful for people who
are using Unity to make & distribute games etc (they should get Unity
Pro and use the excellent OpenNI wrapper), but is good enough for
people who just want to experiment or use Unity for other purposes
such as realtime 3D visual shows/VJing/art installations etc.

Cheers

Steve

On Dec 29, 2:48 pm, Mike Slinn <msl...@micronauticsresearch.com>
wrote:
> Pardon my ignorance, but which Unity is this for?  Is ithttp://en.wikipedia.org/wiki/Unity_(game_engine) or something else?
>
> Mike

Shlomo Zippel

unread,
Dec 29, 2010, 3:06:10 PM12/29/10
to OpenNI
Hey,

This wrapper will work with both the pro and the free versions of
Unity.

It is not an actual plugin - it is a DLL with a simple interface which
is PInvoke-ed from within unity (see class NiteWrapper in Nite.cs)

This DLL is definitely not limited to the Unity engine and can be used
from many environments which support simple DLL binding: Any .NET
language, MatLab, Python, etc.

The UnityInterfaceTester (Part of the package) is a command line
program written in C using the same exact wrapper DLL.

Cheers,
Shlomo

Sam Muscroft

unread,
Dec 29, 2010, 6:53:31 PM12/29/10
to OpenNI
Hey Shlomo,

Very nice work, I'm looking forward to using this with some of my own
biped models. I'm also interested in using some of the other OpenNI /
NITE functionality from within unity such as hand tracking and gesture
recognition. Presumably if I wanted to register a gesture in Unity I
would need to write a relevant function in UnityInterface.cpp and then
call it via the Nite.cs interface? I'm new to unity so am unsure then
how to take the data from the wrapper and use it in Unity. Would you
be able to give me any pointers?

Cheers,

Sam.


On Dec 29, 8:06 pm, Shlomo Zippel <shlomo.zip...@primesense.com>
wrote:

SteveElbows

unread,
Dec 30, 2010, 8:52:23 AM12/30/10
to OpenNI
Hello,

Sorry for getting that important detail completely wrong, its great to
hear that it works on the non-pro Unity too :)

Is this suppose to work on Windows 7 64-bit at the moment? Someone on
the Unity forum was saying that it crashed for them on that OS, but I
havent had any problems myself on 32-bit Vista.

I havent done much with the wrapper yet, just been playing around with
the code a little to get rid of the smoothing and see how noisy the
unsmoothed (but less laggy) joint rotation data is. It certainly feels
better to me if I turn things down a bit compared to how things are
set in the example, although of course this is a balancing act and
tastes will vary.

Thanks again for the great work.

Steve

On Dec 29, 8:06 pm, Shlomo Zippel <shlomo.zip...@primesense.com>
wrote:

SteveElbows

unread,
Dec 31, 2010, 12:23:26 PM12/31/10
to OpenNI
Please disregard my question about someone having problems with this
stuff & 64 bit Windows, they have it working now and it seems it was
the old 'xml file license key' stuff that was causing them problems.
Reply all
Reply to author
Forward
0 new messages