So! After hours and hours of tries and failures, desperation and cursing at FBX format, since I could definitively not find any valuable difference between code generated by Blender and by FBXConverter regarding animation, I finally decided to dive into ugly hacking and have a look at binary files themselves…
Well, at least, it was rewarding: I found out some stupid FBX anim-related elements need a specific handling at binary level to be understood by the FBX SDK! I won’t hold forth on a format that needs such ugly tricks (the joys of vault development I presume…).
I’d rather summarize quickly current Blender’s FBX 7.4 binary exporter status:
Implemented and expected to be working!
- Objects, and simple parent relations between objects (not through constraints, though).
- Meshes, including:
- Smooth groups (edges or faces).
- Faces’ material indices.
- Materials (Phong or Lambert shading).
- Textures (only image/video type, embedding should work, needs ‘COPY’ path mode).
- Materials <-> Textures relations: textures can affect:
- DiffuseFactor, DiffuseColor.
- TransparencyFactor, TransparentColor.
- EmissiveFactor, EmissiveColor.
- SpecularFactor, SpecularColor.
- Shininess, ShininessExponent.
- ReflectionFactor, ReflectionColor.
Implemented, but status unsure (needing testing!)
- Armature linked to mesh. Binding code itself seems to work OK, but bone’s orientations are usually completely wrong when I import back, still have to figure out what happens here. Although I got feedback from testers saying it imports OK under official FBX apps, so…
- Meshes’ (Split)Normals, tangents and bitangents (does not handle the 7.4-new “weights” for those, though). 7.4 seems to use 4D vectors, however I’m not quite sure about the compatibility of those with older apps, I might revert it to previous format (3D vectors) for now.
Implemented, but unfinished
- Animation: basic object baked animation (loc/rot/scale).
I.e TODOs that need to be addressed before we can consider the exporter finished.
- Add option to export other geometries (curves, texts, metaballs) as meshes.
- Finish animation.