Change font size
It is currently Mon Jul 15, 2024 8:44 pm


Post a new topicPost a reply Page 1 of 1   [ 6 posts ]
Author Message
PostPosted: Thu Dec 10, 2020 7:58 am 

Joined: Thu Dec 10, 2020 7:53 am
Posts: 11
Hi,

I managed to get the streamed tracked pose by using the Unity plugin source code. However all I get are the quaternions. What do the quaternions represent? Are they the local rotations of the joints with respect to their parent joint? If that is the case, which is the "base" pose for the transform tree? Where can I get that?

I am interested in getting the angles between the different joints. How can I achieve that?


Top
 Profile  
 
PostPosted: Sun Dec 13, 2020 7:04 am 
iPi Soft

Joined: Wed Jan 11, 2012 6:12 am
Posts: 2355
Location: Moscow, Russia
Hi
Yes, quaternions in a pose represent rotations relative to parent joints. Joint hierarchy is defined by a character in Unity to which CharacterAnimator script is attached. And it should correspond to motion transfer profile set in the export settings of Mocap Studio.
Explore methods in Unity's Quaternion struct, they should help you to calculate angles
https://docs.unity3d.com/ScriptReference/Quaternion.html


Top
 Profile  
 
PostPosted: Mon Dec 14, 2020 3:46 am 

Joined: Thu Dec 10, 2020 7:53 am
Posts: 11
Thanks for your feedback.

What about the default character rig? How can I know the "base" pose configuration (T-pose)? I mean what is each joint base coordinates in global coordinates (at least relative to the parent joint) when each joint has an identity quaterion applied to it (which is the T-pose I guess).


Top
 Profile  
 
PostPosted: Tue Dec 15, 2020 1:32 am 
iPi Soft

Joined: Wed Jan 11, 2012 6:12 am
Posts: 2355
Location: Moscow, Russia
The purpose of streaming to Unity is to transfer motion onto a target character in Unity. For this, rotations are quite enough.
If you are interested in joint coordinates of a character in Unity then you can get them using transform objects there.
If you are actually interested in joint coordinates of an actor tracked by Mocap Studio then you can use Biomech addon to export coordinates, angles, velocities in various coordinate systems and file formats. This is not available in Unity and it's not realtime though.
http://docs.ipisoft.com/iPi_Biomech_Add-on


Top
 Profile  
 
PostPosted: Tue Dec 15, 2020 8:28 am 

Joined: Thu Dec 10, 2020 7:53 am
Posts: 11
Thanks! Right now rotations are enough. I managed to make a wrapper in C# using the unity code that streams the poses through a websocket to an HTML listener, so I can render a character using three.js and works great.

For the time being, we will use only angle information to extract joint angle data (no linear quantities, which I guess would require a more accurate measurements of body lengths), but I will take a look to the biomech addon, thanks.


Top
 Profile  
 
PostPosted: Tue Dec 15, 2020 8:43 am 

Joined: Thu Dec 10, 2020 7:53 am
Posts: 11
I just realised that in order to draw the skeleton in a RGB image (related to my other thread) I will need the joint positions, so my question is:

How can I get the "Default iPi Rig" skeleton joint coordinates for a given actor setup (the parameters that I can set in the Actor tab or via 'set-actor-props' automation command)?

I am aware that if I export the animation to a BVH file I could parse it and get the initial T-pose, so I have access to each bone offset, but I would like to know if there is a better way.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 6 posts ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB® Forum Software © phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net