Mapping Streamed Skeleton data to rigs in unity

Post Reply
BaronScreenKiller
Posts: 1
Joined: Wed May 18, 2016 6:37 pm

Mapping Streamed Skeleton data to rigs in unity

Post 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 11193 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.
bteitler
Posts: 18
Joined: Thu Jun 12, 2014 12:57 am

Re: Mapping Streamed Skeleton data to rigs in unity

Post 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
Attachments
StreamingSkeletonBroken.png
StreamingSkeletonBroken.png (206.65 KiB) Viewed 10608 times
steven.andrews
NaturalPoint Employee
NaturalPoint Employee
Posts: 720
Joined: Mon Jan 19, 2015 11:52 am

Re: Mapping Streamed Skeleton data to rigs in unity

Post 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
bteitler
Posts: 18
Joined: Thu Jun 12, 2014 12:57 am

Re: Mapping Streamed Skeleton data to rigs in unity

Post by bteitler »

I am using that plugin. And so is the original poster from what I understand.
steven.andrews
NaturalPoint Employee
NaturalPoint Employee
Posts: 720
Joined: Mon Jan 19, 2015 11:52 am

Re: Mapping Streamed Skeleton data to rigs in unity

Post 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
Attachments
Capture.JPG
Capture.JPG (31.04 KiB) Viewed 10596 times
bteitler
Posts: 18
Joined: Thu Jun 12, 2014 12:57 am

Re: Mapping Streamed Skeleton data to rigs in unity

Post 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.
steven.andrews
NaturalPoint Employee
NaturalPoint Employee
Posts: 720
Joined: Mon Jan 19, 2015 11:52 am

Re: Mapping Streamed Skeleton data to rigs in unity

Post 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
Post Reply