|
Hi,
I’m working on FBX import-export using FBX SDK.
I have a simple Maya 2013 example. It’s a box with two joints. Joints are connected, one is the root joint, the other is its child. Working scene units are meters.
Here’s the problem.
I export this example in Maya 2013 to FBX, and specify meters as export unit (the same as the working scene unit). The FBX dialog, under Units options, shows Scale Factor 1 (makes sense, meters to meters, no scale needed).
When reading the file via FBX SDK, the root joint’s translation data from FbxAnimCurve::KeyGetValue() is indeed in meters (I get exact values as shown in the Maya 2013 animation graph editor), but the translation data for the child joint (joint’s FbxNode > LclTranslation.GetCurve > KeyGetValue) is a hundred times larger than the values displayed in the Maya graph editor. As if the child joint’s values were exported in centimeters.
Get this! If I change the Maya working units to centimeters, and export to FBX in centimeters, (again, Scale Factor 1) then both, root joint’s and child joint’s data is in centimeters (just as you would expect). Now both joints are exported in the same units.
Maya 2013 imports this FBX file just fine. Even though values from FbxAnimCurve::KeyGetValue() are a hundred times larger, Maya 2013 somehow detects these are in centimeters, not meters like for the root joint.
Question:
How can I detect units for animation translations (translation data from FbxAnimCurve::KeyGetValue)? Until now, I used the FbxScene->GetGlobalSettings().GetSystemUnit() to detect the scene system unit but this is not enough. With this FBX example, I get scene units in meters, keyframe data for the root joint’s translation in meters, yet the child joint’s translation in centimeters.
(edited: added problematic FBX export and the Maya Binary source)
|