| ipisoft.com https://forum.ipisoft.com/ |
|
| Extract angle information from streaming https://forum.ipisoft.com/viewtopic.php?f=2&t=10346 |
Page 1 of 1 |
| Author: | yengamatic [ Thu Dec 10, 2020 7:58 am ] |
| Post subject: | Extract angle information from streaming |
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? |
|
| Author: | vmaslov [ Sun Dec 13, 2020 7:04 am ] |
| Post subject: | Re: Extract angle information from streaming |
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 |
|
| Author: | yengamatic [ Mon Dec 14, 2020 3:46 am ] |
| Post subject: | Re: Extract angle information from streaming |
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). |
|
| Author: | vmaslov [ Tue Dec 15, 2020 1:32 am ] |
| Post subject: | Re: Extract angle information from streaming |
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 |
|
| Author: | yengamatic [ Tue Dec 15, 2020 8:28 am ] |
| Post subject: | Re: Extract angle information from streaming |
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. |
|
| Author: | yengamatic [ Tue Dec 15, 2020 8:43 am ] |
| Post subject: | Re: Extract angle information from streaming |
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. |
|
| Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|