Connecting MAX/MSP to Optitrack

Gina Adita's icon

Hello, everyone. I'm a Multimedia Design student and I've just recently started using MAX/MSP so I'm still no where too far from beginner level, but I understand pretty much how it works and have made some patches before. My research project is about interactive room that involves projection mapping with its visual reacting to a moving gesture of an object (how it is rotated, swung, etc.). I will be using Optitrack Flex 3 (or 13) as the sensor and attach the Motion Capture Makers to that object. My university has the Optitrack kits but nobody has ever really touched MAX/MSP before so I am a bit in the dark here. I have searched for some tutorials too but none seemed to answer my question directly or usually it'd already gotten to advance level.

I would like to know how do you connect MAX/MSP with Optitrack and get motion capture feedback data from Optitrack? Do I need to involve other softwares (such as Unity or OpenFrameworks) as a medium? If anybody knows the tutorials for that too, I'd really appreciate it!

Thank you
Gina

Graham Wakefield's icon

We hooked up Optitrack to Max in the Transvergence lab at UCSB using some VRPN objects -- there's a code repository here:

Gina Adita's icon

Hello Graham,

Thank you very much! This looks very helpful. I will test it out immediately when I get my hands on the Optitrack in a few days. Just a quick question before that, I noticed that it's made for Max 6.1. Does it work on Max 7? Or is there anything I have to look out for this?

Thank you
Gina

Graham Wakefield's icon

I believe it still works for Max 7.

Peter Dodds's icon

Hi Graham. Thanks for these scripts. Is there a build of this work that is compatible with Windows?

thouldcroft's icon

Hi everyone, I have been trying to get these objects to work with our OptiTrack system, but I have not been successful.

I will be the first to admit that, compared to my knowledge of Max, I am nowhere near an expert in the OptiTrack system, in fact we just recently purchased it for our university. We using it in a New Media research group and I would really love for the branch I oversee to investigate control of media with the OptiTrack.

I have attempted to follow the directions outlined in the software respository to a tee (though the instructions seem to be written for an older version of the Motive software). Regardless, I don't get any information reported when running a stored capture, after selecting the 3 points, creating a rigid body, turning on VRPN broadcast, etc. I have also made sure to set the name of the rigid body in the Max object (I have not been able to find a place to change the name of the rigid body in Motive, so I have used the default names assigned by Motive). I have also made sure that the two computers (our OptiTrack computer and my Macbook Pro) are all in the same IP range, as is our LAN router (this is the extent of my networking knowledge unfortunately, as this is also an area I am not incredibly knowledgeable in).

Does anyone have any suggestions where pitfalls might occur? This area is of great interest to our students and most of them are familiar with Max and would like to use the two!