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: 

For Evaluator to use Quat interp, FACN::SetQuaternionInterpolation must be used

0 REPLIES 0
Reply
Message 1 of 1
rajkosto
337 Views, 0 Replies

For Evaluator to use Quat interp, FACN::SetQuaternionInterpolation must be used

FbxNode has SetQuaternionInterpolation function, and it is documented usage that setting it (with FbxNode::eSourcePivot, or using FbxNode::QuaternionInterpolate.Set() directly) will enable Quaternion Interpolation for that node.

However, this has NO EFFECT when using the Evaluator.

For the Evaluator to actually use Quaternion Interpolation (either directly with FbxAnimCurveNode->Evaluate, or with GetGlobalTransformationMatrix or similar functions), the Quaternion Interpolation mode must be set DIRECTLY on the FbxAnimCurveNode for LclRotation or similar. The problem with this is that FbxAnimCurveNode::SetQuaternionInterpolation is an INTERNAL function that the docs say SHOULD NOT BE USED. Another problem with that is that FbxAnimCurveNode::GetQuaternionInterpolation state is NOT SAVED to the output .fbx file, so you have to do something like this in the IMPORTER:

 

    if(rotCurveNode->GetQuaternionInterpolation() != theFbxNode->QuaternionInterpolate.Get())

        rotCurveNode->SetQuaternionInterpolation(theFbxNode->QuaternionInterpolate.Get());

 

Which is impossible unless you have the source code of the application importing (so, for example MAYA has options to let it properly apply quaternion interpolation with nodes which have it set, but MAX does not)

 

The expected behaviour is:

      1. When making a new FbxAnimCurveNode for export purposes, have it inherit QuaternionInterpolate value from it's parent node. This will make evaluation work properly in the exporter application.

      2. When importing a FBX file with FbxImporter, and it instantiates FbxAnimCurveNodes internally when loading the file, it set their Quaternion Interpolation mode to match it's parent node. This will make evaluation work properly in the importer application.

 

^ If both of those are fixed, then there should be no need to call the internal FbxAnimCurveNode::SetQuaternionInterpolation method.

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report