Calculate face direction from bvh or 3d skeleton data

Nibbie
Posts: 2
Joined: 2013.05
Post: #1
Hi,

i have a 3d skeleton with Head joint and neck joint , and i want to caculate where the face is looking at. Face direction vector.

Any ideas?

thanks
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
take the Z column of the matrix?
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2013.05
Post: #3
I have Rx=-13, Ry=-3, Rz=4 for the rotations of the head in local cordinates.

Do you mean that i should calculate the transformation matrixes for all axes and multiply them to create R=Rx*Ry*Rz and take the 3rd column of matrix R?

Thanks
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
Once you've turned the bones into matrices and multiplied them all together to get the final matrix for the transformation of the head, one of the columns of the matrix will represent the head's direction.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  glDrawElements and Face indices Ashford 8 13,018 Nov 11, 2009 03:03 PM
Last Post: Ashford
  Simple ray-face intersect optimization NYGhost 8 6,348 Aug 17, 2007 12:01 PM
Last Post: NYGhost
  Indexed Face Sets (meshes) wyrmmage 4 4,175 Dec 15, 2006 11:18 AM
Last Post: wyrmmage
  Face Problems when Z-Near down!!! leodeus 5 4,964 Oct 31, 2005 12:14 PM
Last Post: OneSadCookie
  keep always visible a polygon face...!!! alert 5 5,253 Apr 14, 2005 09:46 AM
Last Post: alert