Page 1 of 1

Mapping Streamed Skeleton data to rigs in unity

Posted: Wed May 18, 2016 7:30 pm
by BaronScreenKiller
Hi,

I'm using the Unity Sample to stream data into the unity game engine. I've got the data passing to the correct transforms in my rig, however, the rotations are all flipped.
Screenshot.jpg
Screenshot.jpg (73.31 KiB) Viewed 12002 times
I believe this is because Unity is a left handed system and Motive is a right handed system? I've tried editing the part of Body.cs from the samples that handles the conversion from right to left handed but haven't been able manipulate the data in the right way. To be honest, Quaternion math is a bit beyond me.

If anyone has any hints as to how to edit the incoming rotation data to fix this I would really appreciate it.

Re: Mapping Streamed Skeleton data to rigs in unity

Posted: Sat Sep 03, 2016 7:01 pm
by bteitler
I have the same problem. Using the included prefabs straight out of the box with no changes, I just get a mess when streaming a recorded walking animation from Motive (see attached screenshot). I tried all bone naming conventions (making sure to match in Motive and on Unity client prefab), and also tried both "Up Axis" conventions.

Using Motive 1.8.0 Beta 1. Using Unity 5.5.0b1

Re: Mapping Streamed Skeleton data to rigs in unity

Posted: Tue Sep 06, 2016 9:14 am
by steven.andrews
Hello bteitler,

Thank you for reaching out to the community regarding your issue.
If you are streaming into Unity with the NatNet sample, you might be more interested in the Unity plugin that we have released recently.

You can find information on the plugin, and how to use it in Unity, here.
http://wiki.optitrack.com/index.php?tit ... ity_Plugin

Best regards,
Steven
--
Steven Andrews
OptiTrack | Senior Customer Support Engineer

Re: Mapping Streamed Skeleton data to rigs in unity

Posted: Tue Sep 06, 2016 9:47 am
by bteitler
I am using that plugin. And so is the original poster from what I understand.

Re: Mapping Streamed Skeleton data to rigs in unity

Posted: Wed Sep 07, 2016 9:49 am
by steven.andrews
Hi bteitler,

Thank you for the confirmation.

For the plugin that you are using, there are certain settings that must be used in the Motive Streaming Pane. Can you please confirm that these were in use when you encountered the odd solve you displayed in your screenshot?

Steven
--
Steven Andrews
OptiTrack | Senior Customer Support Engineer

Re: Mapping Streamed Skeleton data to rigs in unity

Posted: Wed Sep 07, 2016 10:13 am
by bteitler
Edit: I've fixed it. Local Rigid Bodies was the issue - I do not have any rigid bodies in the scene so I feel like this is slightly misnamed :(

Thank you.

Re: Mapping Streamed Skeleton data to rigs in unity

Posted: Wed Sep 07, 2016 11:33 am
by steven.andrews
Thanks bteitler, my initial guess was that Local Rigid Bodies might not have been set.

I agree that the name for this setting may be confusing. We will consider renaming this to something that makes it clearer what is being done.

Cheers,
Steven
--
Steven Andrews
OptiTrack | Senior Customer Support Engineer