Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is the unit of rotation in animation key frame? (FbxAnimCurve)

1 REPLY 1
Reply
Message 1 of 2
ysoh880710
529 Views, 1 Reply

What is the unit of rotation in animation key frame? (FbxAnimCurve)

Refer to the "ImportScene" sample, animation key frame can be obtained from FbxNode->FbxAnimCurve->KeyGetValue.

 

For example,

lAnimCurve = pNode->LclRotation.GetCurve(pAnimLayer, FBXSDK_CURVENODE_COMPONENT_X);

for (lCount = 0; lCount < lKeyCount; lCount++)
{
    lKeyValue = static_cast<float>(lAnimCurve->KeyGetValue(lCount));
}

 

The confusing part is that the value obtained is 30.2517166.

If the value is radian, it doesn't make sense of having value greater than 2 pi because value greater than 2 pi repeats.

If the value is degree, it makes sense but I wonder why there is nowhere that mentions the value unit is degree.

 

http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/index.html?url=cpp_ref/class_fbx_anim_cu...

 

The value could also be quaternion I doubt.

 

Can anyone please explain what is the unit of animation rotation key?

Also, can anyone please explain whether the value is "added" to bone scale, rotation, and translation value or "substitutes" bone scale, rotation, and translation value?

Thank you in advance.

Labels (4)
1 REPLY 1
Message 2 of 2
regalir
in reply to: ysoh880710

the value of an FbxAnimCurve is typeless because it depends on the type of the property it is applied to. For example, if you have the same curve with a value of 30.25 that is simultaneously affecting the FbxNode::LclRotation.x and LclTranslation.y. (yes, with the FBX SDK you can connect the same FbxAnimCurve to multiple properties 😊) then, the 30.25 will represent "scene units" (mm, cm, m, km, etc...) in the first case and 30.25 degrees in the second case because the LclRotation property store, by default, EULER rotations expressed in degrees. However, if your curve is connected to a property of type quaternion, then the value(s) need to be interpreted as quaternion components.

The FBX SDK evaluate the property values in the following order (each next step "substitute" the previous value):

 

  1. get value from the FbxProperty
  2. if an FbxAnimCurveNode is attached,  get value from the CurveNode property
  3. if an FbxAnimCurve is attached to the CurveNode property, get the value from the animation curve

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report