Previous topicNext topic

NI mate + Kinect into Magic via OSC ?

Questions, comments, feedback, etc.
Post Reply
Slavi
Posts: 54
Joined: Thu Mar 31, 2016 7:15 am

NI mate + Kinect into Magic via OSC ?

Post by Slavi »

Hi Friends,

I am trying to import live data captured from Kinect Sensor (via NI Mate) and to stream this data into Magic via OSC. My goal is to map Magic effects on top of a real person (since the NI mate would stream the person's hand coordinates via OSC). More or less I want the person to shoot magical effects from his hands :D

NI mate captures and streams the data just fine, however I am new to OSC and I am not sure how/if I can imported this data into Magic. I've made the following and it somewhat works:
Magic_1.jpg
Magic_1.jpg (64.99 KiB) Viewed 5280 times
The result is not satisfying since moving my hand on any of the axis cause the polygon to move.

However I cannot specify that I only want the X values of the incoming OSC signal. It seems the incoming data is like a merged value of all coordinates ?
On the NI mate help page, they have some info:
NI_mate.png
NI_mate.png (23.44 KiB) Viewed 5280 times
But I have no understanding on how I can specify only the X values in Magic.

I've tried with other software, but they all have some build in module for handling such incoming OSC signals:
Izi_example.jpg
Izi_example.jpg (151.39 KiB) Viewed 5280 times
As mentioned above I am concerned that all incoming data is one big number with build in logic behind and that's why all other software I've seen have special module to translate it...

Any OSC experts that can give me an advise ?
Here is a link to the NI mate's OSC details page: https://forum.ni-mate.com/t/documentati ... pic_id=284 + this info http://prntscr.com/l8f6nc if someone can understand what they are saying :D

Thank you for your time!

Regards,
S.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: NI mate + Kinect into Magic via OSC ?

Post by Sadler »

I'm no expert but here's my understanding, if only to assure you you're not mad or being dense...

Ni Mate will send out Joint data - one stream of OSC for each joint. This can be restricted to various positional data using the Ni Mate script values identified in the link you gave. However, if you use one Joint restricted to Y for instance, there's no way to then send the same Joint restricted to X. I couldn't get this to work though - if you've got any tips?

If you don't use any scripting then all the positional data gets sent but Magic will only read the first float value. As far as I can tell, there's no way for us users to choose which OSC value gets applied to the parameter. You can get a sense of the granularity Magic would need to provide from this Isadora tutorial. If Magic could access the parts of the message or combine parameters to respond to a multipart message that would be a way forward.

TouchOSC and Resolume don't split the dimensions for OSC either - this has been asked for on the TouchOSC forum but no response from the dev in many years.

BTW, thanks for the impetus to try out Ni Mate again - it is quite good fun - even if it is not quite there for us Magic users (yet!).
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: NI mate + Kinect into Magic via OSC ?

Post by Magic »

I’m traveling this weekend so I don’t have access to test OSC, but if I remember correctly I set it up so you can just add 0 or 1 or 2 after the command to specify x, y, or z, respectively.

For example:
/1/faderB 0
/1/faderB 1

If that doesn’t work lemme know and I’ll take a look when I get home. But for sure there is a way to do it. I guess I forgot to put it in the Users Guide but I will update it.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: NI mate + Kinect into Magic via OSC ?

Post by Sadler »

By Jove it works! - at least with TouchOSC XY pad.
Slavi
Posts: 54
Joined: Thu Mar 31, 2016 7:15 am

Re: NI mate + Kinect into Magic via OSC ?

Post by Slavi »

Hallelujah!

Thank you Eric and Sadler (once again :oops: ! )

It worked!!!!
working.png
working.png (187.96 KiB) Viewed 5236 times


Once again Magic fulfilled and exceeded my expectations!!! 8-) 8-) 8-)

My biggest gratitude towards you Eric!!!

Regards,
S.

P.S. If I win the project I am definitely gonna reply back with the results :)
Post Reply