FBX 7.4 Updates – III

Since last report, main missing feature was added to Export, and Import was greatly improved :

* Shapekeys export has been added, including animation (only for relative shapes, n o support for absolute ones’ animations currently).

* Armatures import was added (though there is a remaining unclear issue about bones’ orientation).

* Shapekeys import was added.

* Limited animation import was added, for loc/rot/scale of objects and bones, and values of shapekeys.

Last point needs some precisions – we currently always read FBX curves assuming linear interpolation. This means that if you FBX file has some fancy Bézier-like interpolated anim curves, results will be rather poor. In a word: bake your animations at export time! Note complete import support for FBX anim curves is a TODO, but not a top-priority one currently…

As usual, a bunch of more minor enhancements and bug fixes was done too.

And as usual, we need testing, testing and even more testing of the whole FBX io addon – complete feature should be in Blender nightly builds within a few hours. Just be kind, and if you find some failures, report them with a tiny FBX file illustrating the issue, not a whole multi-MB project one. 😉

GameDev Related Articles on code.blender.org

Hey, just a quick one, to share those two nice articles buy Dalai Felinto and Micthell Stokes, in case some of you did not saw them already. 😉

And if I may spoil a bit about 2.72, it should have more FBX feature support (noticeably ShapeKeys in both export and import, and basic import support for armatures and animations)… and who knows, maybe even some custom split normals? 😉

FBX 7.4 Updates – II

So, since last post:

* Armatures export has been finished.

* Export of baked animation (for both objects and bones loc/rot/scale) has been added, including current scene animation, strips from NLA and ‘All Actions’ compatible with exported objects.

* Export of curves/metas/text/etc. as meshes has been added.

* Export of dupli objects/groups has been added.

We are more and more close to a complete FBX 7.4 binary exporter for 2.71 release! Yet, more testing is always much welcomed. 😉

There was some work on the importer side too, fixing some issues, extending some existing features, like e.g. a new option to use FBX data for up/front axes and scale, instead of specifying those manually. And a first “armature import” feature was implemented as well (in a separated branch currently, fbx_io_development).

Note that in addition to Unity, which greatly supported FBX export work with their donation to the Blender Foundation, people from Unreal Engine also started showing some interest for Blender FBX support lately – gamedev community is very active on this topic! 😀

FBX 7.4 Updates – I

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).
  • Lamps.
  • Cameras.
  • Meshes, including:
    • UVs.
    • VCol.
    • 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.
    • AmbientFactor.
    • SpecularFactor, SpecularColor.
    • Shininess, ShininessExponent.
    • ReflectionFactor, ReflectionColor.
    • Normal/bump.

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).

TODOs, mandatory

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.