Jump to content
  • Advertisement
Sign in to follow this  
harisz

Calculate face direction from bvh or 3d skeleton data

This topic is 1849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

 

Share this post


Link to post
Share on other sites
Advertisement

What's the difficulty? You have the vector in the frame of reference of the head, so you can map it to world coordinates using the same model-to-world matrix that you use for rendering. Since you are converting a vector, not a point, use a `0' as the fourth coordinate.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

You should do whatever it is you are doing to place the head in the world. This is probably representable as a 4x4 matrix. Now take the forward-looking vector in the head's model, append a `0' to it and apply the matrix to it.

 

If your rotation for the head is expressed as a composition of rotations around coordinate axes then sure, do what you describe. But if that fails it doesn't mean I gave you bad advice: It means you don't know how you are transforming your model.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!