For the 2.71 release, we’ve been working on improving support for game developers using Blender with external engines. To this end, Bastien Montagne has been working on a new FBX exporter, and I have been evaluating workflows to various external engines. Dalai Felinto has also been hard at work with Cycles baking. Below you’ll find some information on the new goodies you can expect in 2.71 for game developers.

New Binary FBX Exporter

Blender can now export binary FBX files (version 7.4). Some benefits of this new exporter includes:

  • Smaller filesize
  • Quicker exports
  • Custom properties
  • Real materials with textures linked to their properties (specular, diffuse, etc.)
  • Textures can be embedded directly in the FBX file (instead of copying to a sub-folder)
  • New “bake space transform” (only recommended for static models for now, though should work for animated ones too), which allows to get the same rotation values in exported data as in Blender, even though the coordinate system (i.e. up/front axes) do not match. So, for example, your monkey is null-rotated in Blender (-Y, Z) space, with this option, even if you export to Unity (-Z, Y) space, the monkey will still have a null rotation (in other words, the corrective rotation is “baked” into mesh data itself).
  • Writing correct axes and scale data in the FBX file (not many other apps really make use of this info yet)
  • Exporting tangent space data (normal and bitangent vectors) for meshes
  • Baked animation for both bones and objects. Note “baked” animation means that the animation is played in Blender, and all loc/rot/pos are recorded, hence all indirect animation work, even complex ones based on constraints or drivers (resulting animations are cleaned up, to remove unnecessary keyframes and curves). There are three animation baking modes:
    • When NLA Strip option is enabled, it will export each strip as an anim stack, gathering everything that is animated by this strip. (i.e. can generate animation for several objects).
    • When All Actions option is enabled, it will check each action against each object, and if they match, generate an anim stack *only* affecting that object with that animation.
    • If none of previous options are enabled (or if they do not generate any animation), the whole scene is baked into a single animation stack.

In order to stress-test the new exporter, I got together some assets to create a simple level and a couple of characters. I then tried exporting to Unity, Unreal Development Kit (UDK), and Unreal Engine 4 (UE4). The results are summarized below, for the full notes please check out http://wiki.blender.org/index.php/User:Moguri/ExportDocs.

Unity

What works:

  • Static meshes (including UVs)
  • Skeletal meshes
  • Skeletal mesh animations (including IK constraints)
  • Flat and smooth shading
  • NGons
  • Exporting whole levels
  • Exporting materials (materials will be created in Unity with the name and color of the exported material, and embedded diffuse textures will be setup)

What doesn’t work:

  • Collision Meshes (these have to be setup in Unity)
  • Shape key animations
  • Object animations

Notes:

  • The default scale and axis options work well (Scale: 1.00, Forward: -Z Forward, Up: Y Up). Just make sure to set the scaling in Unity (it defaults to 0.1).

UDK

What works:

  • Static meshes (including UVs)
  • Exporting materials (materials will be created in UDK with the name and color of the exported material, and embedded diffuse textures will be setup)
  • Exporting meshes as collision meshes (they must be named UCX_XX, where XX is the name of the mesh that the collision mesh is for)

What doesn’t work:

  • Exporting whole levels (you’ll need to export individual assets and put them together in UDK)
  • Skeletal meshes and animations (use the PSK/PSA export instead, it is much more reliable)
  • Smooth vs flat shading doesn’t seem to work well
  • Object animations
  • Shape key animations

Notes:

  • Textures must be powers of two and a support image format (JPEG isn’t supported, but PNG is)
  • The default axis options work (Forward: -Z Forward, Up: Y Up)
  • Set the scale to 100.0
  • UDK complains about an incompatible FBX version (UDK uses 7.3.0 while Blender exports 7.4.0), but the models still load.
  • Collision meshes can also be created in UDK (i.e., you don’t have to rely on importing a collision mesh)

UE4

What works:

  • Static meshes (including UVs)
  • Skeletal meshes
  • Skeletal mesh animations (including IK constraints)
  • Flat and smooth shading
  • NGons
  • Exporting materials (materials will be created in UE4 with the name and color of the exported material, and embedded diffuse textures will be setup)
  • Exporting meshes as collision meshes (they must be named UCX_XX, where XX is the name of the mesh that the collision mesh is for)

What doesn’t work:

  • Exporting whole levels (you’ll need to export individual assets and put them together in UDK)
  • Shape key animatons
  • Object animations

Notes:

  • Textures must be powers of two and a support image format (JPEG isn’t supported, but PNG is)
  • The default axis options work (Forward: -Z Forward, Up: Y Up)
  • Set the scale to 100.0
  • UDK complains about an incompatible FBX version (UE4 uses 7.3.0 while Blender exports 7.4.0), but things seem mostly fine
  • Collision meshes can also be created in UE4 (i.e., you don’t have to rely on importing a collision mesh)

Limitations

One currently known limitation (compared to the ASCII version) is that the binary exporter does not export shape keys, which can be imported into Unity as BlendShapes.

Cycles Baking

2.71 will also include Cycles baking. There was already a full blog post on Cycles baking, which you can find here.

How You Can Help

Grab a build from the buildbot and report issues you are running into to the tracker. You can also make suggestions on the bf-gamedev mailing list for how we can help you improve your workflow.