상세 컨텐츠

본문 제목

Bvh Files Breakdance The Movie

카테고리 없음

by posttifira1978 2020. 2. 13. 22:56

본문

  1. Bvh Dance Animation Files
Capture

TanukiSan':Hi,i’ve worked a lot in MAX and now i’m passing to blender. I’d like to save the animations i made in max, so just 2 questions:1 - can i import.bip files in blender?2 - when i import a.bvh, it comes with an armature of its own, can i use the mocap on an armature i made?thanx!I don’t know about.bip but for the.bvh files, if you already have an armature model whose bones match up to the bones in the.bvh file, you can write some python code to just load the motions from the.bvh file into the Actions of the armature. I’ve already done this for the. Have a look if you like.-D.

Hi, Everyone. I met an abjective problem when I try to convert motion files from fbx to bvh. I constructed the skeletonal hierachy for bvh by calling GetDefaultT of every node in fbx skeletonal node. The code are as followings:KFbxVector4 v4;KFbxNode. pNode;MotionJoint. pJoint; (My data structure to hold data in bvh file)pNode-GetDefaultT(v4)pJoint-setXOffset(v4.GetAt(0))pJoint-setYOffset(v4.GetAt(1))pJoint-setZOffset(v4.GetAt(2))And it seems OK for this part.

Because I compared this part in my saved bvh file with the bvh converted with MotionBuilder. So next work is to compute the orientation in Euler angles. The problem rises here. I compute the local orientation of each node using the following code:KFbxXMatrix lParentGlobal, lGlobal, mat;KFbxVector4 lLocalRotation;lParentGlobal= pNode-GetParent-GetGlobalFromCurrentTake(currenttime)lGlobal= pNode-GetGlobalFromCurrentTake(currenttime)mat = lParentGlobal.Inverse.lGlobal;lLocalRotation = mat.GetRHowever, it doesn't work. It seems like that it's caused by the wrong set of RetationOrder in some place.

But I used the default RetationOrder of XYZ and didn't change it in any place. Is my code to compute local rotation of each node right? Do I need to consider other rotation (e.g. PreRotation, PostRotation)? And could you please explain what's the difference between my code and the function GetLocalTFromCurrentTake to compute local rotation? Hi, pumadenny, I think I got it.If I remembered correctly, it is not unique to use the Euler angles to represent orientation in 3D space.

Bvh Dance Animation Files

And also the conversion between quaternion and Euler is not unique. But they do present the same orientation in 3D space.So I made two BVH files from a same fbx, but one is using Euler value from mat.GetR, the other one is using Euler value converted from the quaternion I got from mat.GetQ.Import the two BVH files into MotionBuilder, the are visually identical.So mat.GetR is not wrong, just it may use different standard as your math lib.I attached the fbx and two bvh files for your to take a look.Thank you. Here is the code of the two methods. The first uses mat.GetR to get the Euler angles. The second uses Euler angles conveted from my Quaternion which is constructed from the quaternion mat.GetQ. I have just tested the results of the two methods in MotionBuilder. The result of the first method is wrong, while the result of the second is right.

So I'm really puzzled. I think the only explanation to this problem is that mat.GetR doesn't provide the right Euler angles.// The first methodVector3 vec; //The Vector3 used in my mathlibKFbxVector4 vec2 = mat.GetRvec.setvalues(vec2.GetAt(0), vec2.GetAt(1), vec2.GetAt(2))// The second methodKFbxQuaternion kq;Quaternion q; //The quaternion used in my mathlibVector3 vec; //The Vector3 used in my mathlibkq = mat.GetQq.setvalues(kq.GetAt(0),kq.GetAt(1),kq.GetAt(2),kq.GetAt(3))euler = q.toEuler(Euler::XYZ)vec.setvalues(euler.x, euler.y, euler.z).