Unity Fbx Exporter - Export Meshes, Skinned Meshes, Terrains and Textures

The Unity Fbx Exporter - windows only!
Price: 100$ on the asset store

The Unity Fbx Exporter is an easy to use powerful fbx exporter that will allow you to export models and even scenes from Unity. It works on skinned meshes, regular static meshes, cloth and even terrains!

In addition it can export baked textures from any standard lighting material. This means you can bake your substances, uma atlasses or custom shaders! Please note that space aware shaders doesn’t work at this time. (tri-planar, worldspace, reflection, refraction, etc.)

The Unity Fbx Exporter uses the powerful fbx sdk from Adobe to deliver you robust compliant fbx files both binary and ascii!

Supported 3rd party tools
The resulting fbx files has been successfully tested with the following tools.

  • Maya and Maya LT

  • 3d Studio Max

  • Blender

  • Poser Pro

  • Unity

If you wish to test my tool against a particular 3rd party tool not on the list please check the known issues and pm me in advance.

How to use
Simply open the Fbx Exporter Window by clicking on the “Window|Unity Fbx Exporter” Menu item.


As you can see there is three export buttons

  • Export Entire Scene
    This button will export every transform, mesh and skinned mesh in your scene as a single fbx file.
  • Export the selected object(s) - as a single Fbx
    Simply select what you wish to export and press this button.
  • Export the selected objects - as multiple Fbx
    Simply select what you wish to export and press this button.

Best Practices
Fbx files are not designed for unity scenes so when exporting scenes only the transforms and the geometry are saved, all components are lost. Also the meshes are duplicated for each position as there is no instancing support.

While you can export multiple rigged characters into one fbx file, please note that Unity will still import the entire thing into ONE prefab and so you can only get one Mecanim Avatar from each fbx file. Making this a bad idea for characters intended to be imported back into Unity. It works fine to export multiple characters but one character per fbx file is recommended!

Does this work from inside my game?
This works inside both 64 bit and 32 bit standalone builds. All you have to do is select the native dll inside the DLL folder and

Known Issues
This list was updated: 06-11-2016

DAZ Studio
Not supported.

Unity Import scale 100
As with most other fbx files from Adobe tools you need to set the Unity import scale to 100

Unity Materials only have diffuse texture set up
This is I set up the materials with all information and other tools can link the file textures, but not unity. If someone has an example of this working that I can use for reference I’d be happy to fix this.

Windows only!
I plan to add mac/linux support at some point.

No Animations
The Fbx Exporter does not export animations, there is no immediate plans to add this functionality.

Future Plans
Progressing very slowly!

  • Keep it running without bugs!

  • Investigate how to support static mesh blendshapes

  • Add unity Lightmap export

  • Improved Terrain export (export huge terrain as LOD chunked tiles, with a texture for each)

  • Support worldspace shaders like Megasplat and models without uv (typical voxel generated terrain)

  • Add mac support

Feedback and Support
Please use this forum thread for feedback and support requests!

Generated Sample Fbx for compatibility testing: UMA_Female_Unified_FbxExporter.fbx

1 Like

Just had confirmation that the outputted fbx files works in Blender and Poser Pro!

Opening week sale 50% off!

Offers runs until 10-10-2016.

Version 1.0.3 released
Changelog
Fixed a problem with static mesh placement.

Using the Unity Fbx Exporter I took this scene and exported it as an fbx, then I imported it back into Unity and Maya.

Please note that the materials are bound to loose some properties when exporting to fbx and importing back into various tools. So the tree leaves lost both their color tint and their transparency. And all specular parts lost their reflection cube maps. The effect of this is clearly visible in the difference between the first and the second Unity screenshots.

In the third screenshot I’ve imported the fbx into maya and positioned the camera, I made sure that the textures resided in a Textures folder right next to the fbx file so that Maya could find the textures but other than that I’ve made no tweaks!


As you can see the Maya lighting is very different and so is the field of view, but other than that everything was imported correctly.

Tomorrow I’ll add a similar set of screenshots for skinned meshes.

I’ve just purchased your FBX exporter, but it doesn’t work.
I don’t know the reason why there’s no happening, when I tried Export Entire Scene and others.

I would like to refund and cancel my purchase. Please reply me ASAP

Hi jikkim55

I’m sorry you had a bad experience. Perhaps you could send me the error messages in the console, that way I could probably fix it. It says there is a null reference of some sort.

Come to think about it, I forgot to add defensive checks against mesh renderers with null meshes and meshes with null materials, this is most likely the cause of your problems. I will correct these mistakes immediately, you can expect a 1.0.4 update in a couple of hours.

If you still wish to get a refund, please pm me the invoice number and I will contact unity to get you a refund.

I’ve submitted version 1.0.4, I hope this will fix your problem.

If my update does not fix your problem please post a screenshot showing your console window with the top most error selected.

does it export vertex color information?

@TechDeveloper yes, vertex colors are saved too.

The normal uv is saved, but not additional uv channel. I haven’t checked how complex it would be to add multiple uv channels.
The only thing that is not exported is tangents, I’ll try to add that later but since the fbx format is in a different world space than unity I deliberately postponed it.

Also please note terrains are currently not supported, but I am gonna add a basic terrain support later.

Works great!
Being a ProBuilder user, I am really interested in exporting my prototype levels to build upon and refine in other modelling packages. So far, the output from this exporter has worked in every package I’ve thrown it at.

Here’s a unity scene made with ProBuilder:

And in 3dsmax:

And in Maya LT:

And in 3dCoat:

And in Blender:

And in XNormal:

Very happy, with the results so far, also happy how the object hierarchy comes across intact.

I’ve known UnLogick for a while now, (mostly asking him for help), and have always found him to be keen to help and a bit of a perfectionist with what he does.

Brilliant work UnLogick,… Keep it up.

2 Likes

Thanks man! I can’t help but think of the disaster this would have been without you and the other beta testers, throwing all your tools at this. :slight_smile:

I tested out my clockwork based test scene in blender, at first everything was strangely transparent, apparently the textures alpha channel held data in them. After disabling the transparency and adding some lighting, but without doing anything else it ended up looking like this.


Moving on to making screenshots for skinned meshes / rigged meshes.

I started with the free Goblin Ranger package by Shunsuke Yamamoto exported one of the goblins as a binary fbx. I made sure to place the textures inside a Textures/ folder right next to the fbx file itself. This is the relative path that the Fbx Exporter writes into the generated fbx files.

Blender
I imported my fbx into Blender. It was tiny so I scaled it up by a factor of 100 (shortcut s for scale, and then while in scale mode just type “100” and press enter). It now had the right scale but was semi transparent so I went to the material and unchecked the entire Transparency group, this made it solid. But now I could see that the colors were wrong, it was quite gray so I move on to the texture and unchecked “Use Alpha”, boom all the colors appear. Jobs Done! The rest was just setting up lighting.

Maya
I imported the fbx file into Maya and at a glance everything looked right, the scale was good the model was opaque. On closer inspection I could see the normal map was all horrible wrong. I found the material an followed the reference into the Bump Mapping, I notice the color space is set to sRGB which is technically incorrect so I set it to raw for good measure, that didn’t fix the problem so I moved on and notice the “Alpha Gain” is set to 1, I set it down to 0 and boom everything looks good. Jobs Done!

Unless I get any bug reports I’ll just move on to adding terrain support.

I’m still working on the terrain, but I thought I’d show you a couple of screenshots.


First we have a very simple terrain made with Gaia.


Then we have the same simple terrain now all in one fbx file. Both the terrains, trees, rocks and houses. Adding terrain texture support is a challenge of it’s own that I’ll be attacking later, right now I just offer a number of subsampling options.

The true subtle trick of the screenshots is however is that Gaia terrains uses LOD, there is a lot of far off invisible trees, rocks and houses and the far away tree has lower quality than the trees closer to the camera. I have duplicated how Unity resolves the LOD and can offer the exact same results in the fbx export.

The default LOD option is of course to export everything at maximum quality. But for big scenes this LOD option will allow you to capture the atmosphere of a location, without completely killing your system.

Similarly while I give you the option to export the terrain at 1:1 resolution, the default option is to sub sample it down to whatever fits inside Unity’s 64k triangle limit for a single mesh. The reason you want this is simple math, a terrain can often be a 2k x 2k heightmap, this translates into 4m quads or 8 million triangles! Believe me neither Maya, Max, Blender or Unity likes that. :slight_smile:

I had to dive deep into tech land to add these newest features for the upcoming 1.1 release.

Texture Exporting!
Through shader magic I am now able to export diffuse, specular and normal textures for almost any unity material… this means that you will get decent results even in third party tools that does not support your special unity shaders. As you can see it generates artifacts on transparent edges so I’ll have to write some code that removes those.


This here is a nice and simple terrain I cooked up with Gaia.


And here is how it looks in Maya LT. Clearly it’s not a 1:1 representation yet, but I think most people will agree that it’s the same scene. And artists will be able to model stuff on top of this. Notice how the terrain has been converted into a 2k texture, horrible for nearby ground, but pretty good for distant mountains.

New Features

  • Terrain
    You can select terrain quality from the exporter window

  • LOD
    You can filter which cameras the LOD is based on, you can toggle if the exporter should also use culling to export exactly what is visible.

  • Logging
    You can set multiple log levels for more or less information about the export

  • Texture Export
    You can select to export textures for Meshes, SkinnedMeshes and Terrains independently.
    You can control what size the exported textures should have.
    And finally you can control what color space the textures should use.

  • Clean Api
    I’ve added a new clean api for all of these new features. I made configuration classes for the LOD and the Texture system.
    In addition I made key methods virtual so you can override the configuration classes and add your own code to select lod levels and texture resolutions on a per item basis.

Known problems

Blender imported the mesh pieces at incorrect locations.
I have several ideas on how to tackle this, the simplest would simply be to remove the deep hierarchy. I tried manually flattening the scene prior to export and that worked out nicely. Hopefully I’ll find a better solution but that is certainly a possible fix.

Maya running out of gpu memory.
One thing I noticed is Maya resource consumption, in the above scene we only have around 20 materials, but I managed to make Maya run out of memory on it. First I thought it was my fault as I wasn’t reusing the fbx materials among the meshes. I quickly fixed that but the problem continued and it seems Maya is loading the textures to the gpu on a per mesh basis.

If someone has some information on how to avoid this in Maya I’d love to hear from you. But it seems to me that I’ll have to include an export option where I combine the meshes that shares the same material into one, such preventing Maya from loading the textures multiple times.

Transparent textures have dark edges
I need to come up with a way to color the transparent pixels based on their nearest neighbors.

Problem exporting non square textures
This is a high priority issue for me, since it’s blocking support for uma characters.

1 Like

Hello UnLogick, i have a question for you. I´m interesting to export uv channel 2, that contains lightmap inside, but i don´t know if the exporter do it. All this is because i´m trying take the lightmap generated .psd in Unity and the Uv channel 2 with the model inside, trying that works in another engine.

Use Unity in this case to do lightmap and export all i need, to add all this in anothe engine.

The fbx exporter does not support exporting of uv2 at this point in time. I plan to add it in the future, but unless a multitude of users request this we’re talking at least a month into the future!

Ok, i´m very interesting in this point to buy it, if you can send me a message to know when you finish this, i appreciate that :slight_smile:

Thanks for the quickly answer.

Fbx Exporter v. 1.1 Released!
There is some major goodies in here.

  • Terrains
    I’ve showed you screenshots, but now it’s here!

  • LOD Groups
    You can now control which areas are exported in which qualities. Default is of course everything.

  • Texture export
    The Fbx Exporter can now generate Diffuse, Normal and Specular pbr textures for any standard lighting compatible material!

  • Please note this export generates edge artifacts on transparent textures.*

  • Dynamic Texture export!
    The texture export also works for dynamic materials like substances and UMA atlasses.

  • Please note this export generates edge artifacts on transparent textures.*

  • UV2, UV3 and UV4 support
    Allows you to export lightmaps, flowmaps, etc.

  • And of course a lot of bug fixes
    Most notably blender position bugs in nested hierarchies

Enjoy!

Hello, I post the review at the plugin.

Thanks for fast reaction!

I need that tiling that was set on textures, and there are two different tiling for two uvs. And it can be 1000 or 0.0001 and can be different for x and y.

Also if it is possible i need renaming from utf8to English only because I need to use models in SketchUp and it becomes broken if model contains non-English characters in textures names at least or textures folders.