Hi! I’m playing around with Microsoft Kinect SDK and 3dsMax, building a cheap mocap system.
It’s very simple to have some dummies moving in 3dsMax viewport, but I’m stuck on a performance issue sending to max the data for the two Kinect tracked skeletons.
This is my scenario:
I have a dotnet form showing the video and depth feed from kinect and a 2d screen space view of the tracked skeleton. When I send the data of the first (default) skeleton to 3dsMax, both the video feed and the 3d viewport run smoothly. When I send the data for the second skeleton too, the 3d viewport is still running at a good framerate, but the interface of both max and my dotnet form become inusable.
I’ve tried to send the data to 3dsMax using another thread, but it’s even worst, crashing all the time.
I’m suspecting that the problem is in the way I send the tracked data to max, using maxscript:
ManagedServices.MaxscriptSDK.ExecuteMaxscriptCommand("$dummy_" + prefix.ToString() + JointID.ShoulderLeft.ToString() + ".pos = [" + (skeleton.Joints[JointID.ShoulderLeft].Position.X * skeletonSizeMultiplier).ToString(NumberFormatInfo.InvariantInfo) +
"," + (skeleton.Joints[JointID.ShoulderLeft].Position.Z * skeletonSizeMultiplier).ToString(NumberFormatInfo.InvariantInfo) +
"," + (skeleton.Joints[JointID.ShoulderLeft].Position.Y * skeletonSizeMultiplier + skeletonZoffset).ToString(NumberFormatInfo.InvariantInfo) + "]");
the code above is the simplest way to move somthing in space, but seems to works…for one skeleton at least
Any suggestion to improve the data transfer from c# to 3dsMAx?
thanks,
Alessandro