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 https://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.
blend file to the unity assets folder will not work anymore. Even though I have installed previous versions of Blender (2.65 up to 2.71), none of these worked and I always get “Blender could not convert the .blend flile to .FBX file” in Unity. Does Unity open the Blender version attached to .blend files and use its FBX Exporter ? Is there any workaround ?
Yeah, Unity does not actually support .blend files, it just opens them with Blender and export them with (old, deprecated and unmaintained 6.1) FBX exporter. So work around is to handle FBX export yourself (which is much recommended anyway) – and/or file a bug at Unity.
You have a typo under UE4->What doesn’t work:
Exporting whole levels (you’ll need to export individual assets and put them together in UDK)
Should read
Exporting whole levels (you’ll need to export individual assets and put them together in UE4)
In UE4 section, you copy and pasted “whole level..” thing but forgot to write UE4 instead of UDK.
Blender could not convert the .blend flile to .FBX file” in Unity. Does Unity open the Blender version attached to .blend files and use its FBX Exporter.. ?
I have a number of animations in Lightwave that I wish to export to blender.
In version 2.73, the import of LWO seems to be broken.
In particular the import of Endomorphs seems not to work. Even a very simple model of a Pacman with one base mesh and a single set of displaced points to open the mouth fails to import correctly.
Any ideas ?
Nice Information saol thank you address this issue very well have been something I hope everything gets better peanut subject of the system should work properly also have strong competitors in the meantime how many how many fulltime.
blend file to the unity assets folder will not work anymore. Even though I have installed previous versions of Blender (2.65 up to 2.71), none of these worked and I always get “Blender could not convert the .blend flile to .FBX file” in Unity. Does Unity open the Blender version attached to .blend files and use its FBX Exporter ? Is there any workaround ?
Weird. I’ve been able to export skeletal animations to UDK just fine. >.> … maybe that was an older version of Blender.
I exported a simple static mesh with collision and imported in UDK 3.
The player start object stopped working when attempting to play the level. After removing the mesh, the player start worked just fine.
Strange..
i have problem with baked animations, post here
http://blenderartists.org/forum/showthread.php?351555-baked-animation-not-exporter-property-into-fbx&p=2743615#post2743615
Thanks for helping us indie dev to make a cool game asset.
Btw, is there any working plugin to use with zbrush goz with this blender 2.71? i hv troubled when exporting/importing to one another.
Whatever i try, i’ve never succeeded exporting fbx files to UE4 without UV map issues!!!
This exporter makes every UV map MERGED.
Just tried with the beta 2.72 but still keys are there in Unity but all are 0.
What to do?
Oh yes I need blendshape animation for Unity, so I wait for 2.72 or could I help with testing? How?
Thanks
I have a question if you don’t mind. Is it possible now to export a model into unity from blender which stands from many mesh pieces and is not only animated by a skeleton but also by a mesh using the ‘mesh deform modifier’. If yes, how? If not will it be possible or shall I use only armature for rigging. Thanks!
First of all, great work and thanks für investing so much time to improve our beloved blender ! I ran into the same problem Arnaud described earlier, saveing a .blend file to the unity assets folder will not work anymore. Even though I have installed previous versions of Blender (2.65 up to 2.71), none of these worked and I always get “Blender could not convert the .blend flile to .FBX file” in Unity. Does Unity open the Blender version attached to .blend files and use its FBX Exporter ? Is there any workaround ? And is it possible to export the FBX of a scene in cycles where Unity picks up the materials ? Right now I have to go back to Blender Internal Renderer and convert the materials, so that after exporting in fbx, Unity creates a shader for each material. Using Cycles materials Unity creates only one material.
I’m really happy with this great update. Great job ! :D
Please add alpha VertexColor in blender and the fbx exporter. We really need that 4th channel.
Keep up the good work. :)
The update to the FBX exporter somehow broke the automatic import of .blend files in Unity. Could be a really painful surprise for people with lots of Blender assets in a Unity project
https://developer.blender.org/T40826
This is absolutely great and solves almost all of my problems when making game assets with blender. Thanks, developers!
triangulation is standard for all game engines i now its the grachics cards work even a poly (4 sides) is 2 triangles.
just tried RC2 no pre-fix on the bones, guys you are the best thankyou so much
When i import the fbx in to unity it works perfect except that the mesh its triangulated, this maybe no a great issue to unity (for obvious reasons) but if i have to send it the fbx to max its a problem also the importer imports fbx triangulated.
im not sure if this is a bug a limitation or simply something that its not part of the idea of the importer
by the way, thanks for your work it makes possible for me to start working as a game artists, a big “i have to” that i have since i was a child ^-^
Our exporter does not triangulate meshes at all, we export plain polygons (and the same goes for our importer, it reads polygons if there are some).
Unity seems indeed to systematically triangulate its meshes, no idea about other apps…
so about the importer this shouldn´t be working this way?
http://www.pasteall.org/pic/show.php?id=72798
The teapot was exported from 3dsmax and inported again in to max and blender as you see in the result blender teapot its triangulated.
this are the export option from 3dsmax
http://www.pasteall.org/pic/72799
If you add android, ios and other mobile os exports it would be more helpful to game builders.
Problem. When try with standalone display or export for .exe file, the result is a black box only. I used windows7 and blender 2.7. The program no report error o display any message.
no problem in enbebed display
This is not really the place for BGE support since this article is talking about using Blender to export to other engines like Unity, UDK, and UE4. You can try to get help from the BlenderArtists forums or the #gameblender or #blender IRC channels on Freenode.
I tried exporting whole level of blender assets to UE 4.1 although I used the free FBX Converter 2013 and it exports with separate mesh.
Although it wasn’t the “Blender does it all” job.
And this news I’m happy that now it gets updated. :)
sorry for the double post i just realised the the prefix is the name of the armature plus | so i hope that clears things up and i do hope there’s a way to stop it adding the name, thanks
I’ve talked with Bastien about this issue. We’ve agreed that it is worth investigating, but it is better to leave it until after 2.71 is released to avoid a last minute regression.
just tested the blender-2.70-b707b07-win64 version really nice to have the deform bones only back in great job :)
next issue when i export all the bones get prefixed with “rig|” this is fine if it’s the only rig your using but in a lot of game cases the rig comes from else where (max/maya/fbx)
in my case when trying to use anims that are all ready in a game engine (UE4) it’s important that the bone names stay the same.
as mentioned fantastic job so far you are a HERO
thanks a lot ! Just what I was looking for!
Interesting, especially about animation baking. We needed to make our own in Blend4Web
Great work, testing now!
There is still an issue with lightmap baking. You can either bake direct diffuse lighting, indirect diffuse lighting, and combined which for some reason bakes the diffuse color too. This isn’t usefull for lightmap baking. An option is needed to bake a combined bake with direct and indirect without the diffuse color. The diffuse influences rays but shouldn’t be simply be baked over.
i tried the test build a few days back to find that with the “new” fbx 7.3 exporter you can’t select “deform bones only” which means if you try using the rigify or makehuman rig it will export all the bones in the file.
would it be possible to add it back into the options, btw its still there for the 6.1 version
tested on UE4.1
Thanks for pointing that out. It should now be available as of commit Aba7f4237ef75.
Keep up the great work! Also if I’m not mistaken, I do believe Unity 5 will have runtime access controls for shapekeys /BlendShapes. Something to look into/forward to.
~Metal
Thanks! :)
Current Unity already can handle shapekeys (including animations), though it’s not that easy to set up?
Good stuff, glad to see that FBX export getting some love finally! I’d like to see a lot more attention paid to import as well, however. Many (most?) workflows involve jumping between multiple packages multiple times, and it’s currently a game breaker that there is NO reliable way to get rigged characters from other packages into Blender. As another note, a really simple fix would be to allow importing multiple objects at once. The Steam Workshop, for example, gives character files that come in pieces, and some of them have 20+ .fbx files. Importing them one by one is a hassle.
The importer has been getting some love too, but I think most of the goodies are waiting for after 2.71.
Yep, in 2.72 you should get armature + shapekeys + animation (loc/rot/scale of objects and bones) import hopfully.
I’ve got a question. Will be someday “workable” the actually non-workables features listed here? (specially interested in Unity ones)
Some of these are limitations on Unity’s end. For example, Unity doesn’t read object animations, nor do I think it has a way to get collision mesh information (UDK/Unreal make use of the a special naming convention to find meshes that are intended to be used for collision). As for shape key animations, that’s something we can work on for the exporter (Unity will read the data if we write it out correctly). The first step is to get shape keys exported in such a way that Unity reads them in as BlendShapes.
Regarding shapekeys and animations, there will be supported in 2.72 (code already written, just waiting a bit after 2.71 release in case of crucial bugs, and it will go into master).
In order to prevent spam, comments are closed 7 days after the post is published. Feel free to continue the conversation on the forums.