Motion capture server on mac OSX?

Anonymous

Motion capture server on mac OSX?

Anonymous
Not applicable

I would like to connect a mobile device as a motion capture device into maya. I just started diving into the motion capture API and it seems that most resources point to using the provided mayaClockDemo and mayaClockServer examples. However, I keep running into errors when attempting to run mayaClockDemo.

 

The following from the API documentation suggests that the Mac OS X environment does not have this demo included:

 

(Mac OS X) Doesn’t exist for the Mac. Its operating system has a .c file in the devkit/mocap directory of your Developer Kit installation.

 

Is there any other resources for starting a motion capture device server on a Mac OSX platform?

0 Likes
Reply
Accepted solutions (1)
1,323 Views
5 Replies
Replies (5)

zhong_wu
Autodesk Support
Autodesk Support

If you want to create motion capture device plugin, it’s suggested to use the class MPxThreadedDeviceNode, it can open a thread to catch the data from the device, you can refer the SDK help doc here , or we have some blog posts about the samples using this Api at http://around-the-corner.typepad.com, for example, use this Api to connect to Kinect(http://around-the-corner.typepad.com/adn/2013/02/initial-fooling-around-with-kinect-and-maya.html), or connect to perception Neuron device(http://around-the-corner.typepad.com/adn/2015/11/how-to-connect-perception-neuron-with-maya-part-2.h...

 

Hope it helps.


John Wu
Developer Technical Services
Autodesk Developer Network


0 Likes

Anonymous
Not applicable

@zhong_wu

 

This is great! I've been pouring over http://around-the-corner.typepad.com and the SDK. You guys have some excellent material so thank you!

 

However, I should have specified more clearly regarding my question. Maybe you can still help me. I would like to connect the rotation of a mobile device to the rotation of the camera. It sounded like from the SDK that the best way to do that is to define a deviceserver (Mocap SDK). which would connect the rotation axis of the device to the respective rotation attribute of the camera in maya. I've been looking at the mayaClockServer and mayaClockDemo on a windows machine to see how they work, but I would like to develop on my primary machine which is a Mac. However, after downloading the devkit I can't find the necessary libmocap.a file included in the Mac bundle or the mocap*.h files.

 

Is is safe to assume that the MacOS distribution never supported the mocap dev kit? Also, is the mocap deviceserver been more or less abandoned for the MPxThreadedDeviceNode approach instead? Should I be looking at writing a MPxThreadedDeviceNode that queries a server running from the mobile device instead?

0 Likes

zhong_wu
Autodesk Support
Autodesk Support
Accepted solution

Yes, the Mocap devkit is not supported on MacOS, and I also suggest you to use MPxThreadedDeviceNode to get the data from your mobile device and set to the rotation attribute of camera. There are several samples, and it should work for your case.

 

Also, if any questions while implementation, we can also discuss in the forum if you want.


John Wu
Developer Technical Services
Autodesk Developer Network


0 Likes

Anonymous
Not applicable

@zhong.wu

 

Been working on implementing a plugin that will use the MpxThreadedDeviceNode. Seems promising. Was attempting some server development in Python orginally, but now that I know that Maya is particular about threading, I'm staying with the C++ route. I guess in reality though, I should really be using the Motion Builder for motion capture correct?

 

I wanted to ask you about the possibility of running two ThreadedDeviceNodes in Maya at the same time. I would like to also continuously stream the view of the current camera to the device, so the user can see it directly as it changes. I can query the current camera view and export an image, but I am a little stuck on how I should continuously stream it. Again it seems like a ThreadedNode problem. Would you recommend attacking this by attaching a new MpxThreadedDeviceNode to the task of streaming the images once they change? The problem I forsee is that both of these would need to run at the same time, and would conflict with accessing the main thread, so it may not work well enough for real-time performance.

0 Likes

zhong_wu
Autodesk Support
Autodesk Support

I did not try with 2 threaded device nodes before, and I also don’t think Maya support multiple MPxThreadedDeviceNode well, It may cause some unexpected issues. I can check with my experienced colleague to confirm, and will update you if any different conclusion, but I double the result is positive:(.

 

Anyway, since you want to get the device data and the camera data, is that possible for you to create a data structure to cache both of them, and handle that within one MPxThreadedDeviceNode?


John Wu
Developer Technical Services
Autodesk Developer Network


0 Likes