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.
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.
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):
Can't find what you're looking for? Ask the community or share your knowledge.