EvaluateLocalTransform/EvaluateGlobalTransform return nan values

EvaluateLocalTransform/EvaluateGlobalTransform return nan values

Anonymous
Not applicable
591 Views
2 Replies
Message 1 of 3

EvaluateLocalTransform/EvaluateGlobalTransform return nan values

Anonymous
Not applicable

when I am use fbx 2019 sdk to convert fbx to csb,  EvaluateLocalTransform/EvaluateGlobalTransform return 

FbxAMatrix whose elements is nan.  The code is as fallowed.  The error only happen on the 3th/4th keyframe(time=0.233333/0.266667) in the "Bone_Hair_05".
FbxAnimLayer *layer = animStack->GetMember<FbxAnimLayer>(l);
FbxAnimCurveNode *curveNode = layer->GetSrcObject<FbxAnimCurveNode>(n);
FbxProperty prop = curveNode->GetDstProperty(o);
FbxNode *node = static_cast<FbxNode *>(prop.GetFbxObject());
 for (float time = (*itr).second.start; time <= last; time += stepSize) {
                        time = std::min(time, (*itr).second.stop);
                        fbxTime.SetMilliSeconds((FbxLongLong)time);
                        FbxAMatrix *m = node->EvaluateLocalTransform(fbxTime);
}
Then, I try to use "GetNodeLocalRotation/Translation/Scaling" to get data. The first element of FbxQuaternion data is nan. And This is the 3d max file.
0 Likes
592 Views
2 Replies
Replies (2)
Message 2 of 3

regalir
Autodesk
Autodesk

It looks like the file is not attached.

Something worth looking for is objects/keys that will produce a scaling of 0, causing a division by 0.

 

FYI, I did see people using a scale of 0 to hide objects. The FBX does not support this "technique", instead the Visibility flag must be used.

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you for your reply. About 0 scale, I try to check it and The problem about 0 scale show the all data is nan.

0 Likes