Search Unity

Blender - FBX Export Settings

Discussion in 'External Tools' started by MichaelJT, Apr 12, 2017.

?

Did you find this helpful?

  1. Yes

    93.3%
  2. No

    6.7%
  1. MichaelJT

    MichaelJT

    Joined:
    Jan 28, 2015
    Posts:
    5
    Edit: Fixed missing image

    I'm well aware that you can simply use the FBX Exporter in Unity to do this, however I thought I'd share the settings I've been using to successfully get models from Blender to Unity as I know many people have problems with this.

    I have this specifically set up to be used only with selected objects because I use a lot of objects and non-deform bones as IK targets and helpers for rigging armatures.

    These settings result in a scale of 1 and no rotations or scaling on objects.


    If this doesn't work for you I'm not sure why.


    You'll find this panel in the Export FBX setting.

     
    Last edited: Apr 13, 2017
  2. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    24
    Thank you! This was very helpful.
     
  3. Kerff_CGartist

    Kerff_CGartist

    Joined:
    May 8, 2014
    Posts:
    3
    Been looking for this...

    Thanks :)
     
  4. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Well, I would recomend to check "Tangent space" on the geometry panel even if tangent space from blender and unity are the same (remember to triangulate your mesh before exports). This solves a lot of problems with workflows that involve more than Blender, like baking tools.
    Even is faster for Unity to import tangents than calculating them.
     
    MichaelJT likes this.
  5. IamKayrox

    IamKayrox

    Joined:
    Sep 7, 2017
    Posts:
    2
    Using this I still having rotation issues
     
  6. Volts

    Volts

    Joined:
    Apr 27, 2013
    Posts:
    1
    I works for me if I apply rotation and scale to everything before the export. Critical steps for me are to do this and to enable the "!EXPERIMENTAL! Apply Transform" option.
     
    syscrusher likes this.
  7. sablezubaja

    sablezubaja

    Joined:
    Dec 11, 2017
    Posts:
    1
    Hello, could you, please, explain the difference between "Main" and "Geometries" exporting options categories?
     
  8. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    109
    Main parameters apply to everything in the scene, Geometries - to polygonal meshes only
     
  9. verybinary

    verybinary

    Joined:
    Sep 23, 2015
    Posts:
    373
    I currently save my .blend files inside my assets folder, and Unity seems to know exactly what to do with them. I am also able to edit these models and save with Unity knowing how to work with the changes.
    What benefits are there to exporting to fbx first?
     
  10. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    109
    @verybinary Smaller project size I guess. No real nessessity unless you're working in a team using GitHub, and not all team members have Blender.
     
    verybinary likes this.
  11. verybinary

    verybinary

    Joined:
    Sep 23, 2015
    Posts:
    373
    Thank you. I didn't know if there was a difference within the engine for the two or not.
     
  12. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    460
    One Blend file can contain many many many different models. A character and all their clothes and weapons, for example. Wall parts and floor sections which you want to mix-and-match in your dungeon algorithm. A sample room with a character to judge the furniture scale. But you want separate FBX files for each specific controllable thing to import into Unity.
     
  13. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    460
    Once you have a group of settings you like, you should define them as a Preset. That's what the [+] button next to "Operator Presets" will do for you. Unfortunately, each existing blend file has its own presets. Fortunately, you can set up your favorite presets and include them in the default blend file so all new blend files you create will start with all these preferred settings.
     
    syscrusher likes this.
  14. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,473
    Unfortunately, checking "Apply Transform" messes up Unity's built-in Cloth weight paint tools:


    In that screenshot, the 3d model is very tiny (the one with yellow outline) since I had to zoom the scene view out a lot. For some reason the cloth paint tools project the cape of my 3d model really really big (and inverts it upside down).

    I got around all of this by exporting to Version "FBX 6.1 ASCII" instead of the default "FBX 7.4 Binary".
     
  15. verybinary

    verybinary

    Joined:
    Sep 23, 2015
    Posts:
    373
    So... Have you a .blend with an entire dungeon setup or clothing sets or whatever, and make prefab from pieces of them to mix and match?
     
  16. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,473
    He did say you'll want to export them each into their own fbx files. One disadvantage to having one big file that contains many objects inside is that, the moment you need to go back and edit one mesh inside that blend file, Unity has to reimport all of it, since it's all in one file. That really makes the reimporting time longer than it needs to. Same thing with a blend file that has many animations inside it. You edit one animation, Unity is forced to reimport everything in that blend file, even if the others weren't changed.
     
  17. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    460
    This is true, but having worked with Blender for many years, inside its Open Source code and also as a modeling user, I really really don't like to assume that any other app should try to import the file themselves. Even if Unity is launching Blender and asking Blender to export to FBX, it's expecting too much to assume I can tell Unity exactly how each FBX should be exported with all the settings available.

    I would much rather take a big old gnarly composite file such as one blend with a complete house or a complete character with an extensive wardrobe, and keep it OUT of the Assets folder. I can then decide manually which pieces get exported as separate FBX files, and then put those FBX files into Unity's clutches within the Assets tree. Maybe the house is made in Blender with 50 pieces, and I export them room by room into 4 FBX files. Maybe the dummy character is wearing all his clothes and holding several kinds of weapons.

    This goes for other big old gnarly composite or specialty files which I don't expect Unity to support directly, or the way I want them supported. Maybe I got some ALOS digital geography files and I need a special tool to export those to PNGs as height maps I can use in terrain building. Maybe I have a bunch of hundred-layer SVGs that I haven't rendered or imported into Spine yet, to be able to animate them. Maybe I have photographs which need to be processed by other tools before they come out as height maps. To me, Blender files are not for Unity directly, but Blender has a nice little Export to FBX capability of its own which exports a specific set of blender objects, and has lots of options I want to tweak each time as appropriate.

    That doesn't mean I don't version-control the big gnarly files, by the way, I just put them in a folder inside the project but outside the Assets folder.
     
    syscrusher likes this.
  18. Necronomicron

    Necronomicron

    Joined:
    Mar 4, 2015
    Posts:
    69
    Forward must be Z, not -Z.
     
  19. MOG_Hammer

    MOG_Hammer

    Joined:
    Dec 27, 2012
    Posts:
    3
    There is a huge benefit in a team if you are the modeler and someone else does the level layouts, allows to import a bunch of meshes into one scene, still allowing to use them as single objects. You could also create a full scene in Blender then export the whole scene with all transforms applied, like a complete set of assets (best example: modular pieces for some architectural design). It is way faster than having to import each one separately.
     
  20. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    899
    Agreed. When I make structural models in Blender, there are often variants with different pieces built on a common base. In Blender, these are separate objects, and I select or deselect them just prior to each export in order to create an FBX with the specific variant. I don't think there would be a good way to do this if I just put the .blend file into the Assets folder.

    Another common situation is when making modular pieces. In Blender, it's useful to make sets of these in a single project file because you can test-fit them and reuse geometry from one to another, but they typically need to be separate meshes made into separate prefabs in Unity.

    Like @halley, I also version-control my Blender files, but not within the Unity project. :)
     
  21. Cong37921

    Cong37921

    Joined:
    Aug 1, 2014
    Posts:
    48
    the exported Armature's Rotation and Scale have issuse.
    upload_2019-3-7_15-55-44.png upload_2019-3-7_15-55-58.png
    upload_2019-3-7_15-56-12.png upload_2019-3-7_15-56-27.png
    the Scale can solved by set Apply Scale: FBX All
    But the rotation, I have no idea.
    Anyone Can help?
     
  22. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    109
    Blender treats bone orientation in a specific way. While in most programs (or at least 3ds Max), the "main" longitudal axis of the bone is X, in Blender it is Y. So by default exporter puts a rotation to compensate it. Try playing with Primary and Secondary Axis setting in Armature tab of FBX exporter
     
  23. Cong37921

    Cong37921

    Joined:
    Aug 1, 2014
    Posts:
    48
    I have found that setting, but x, -x, y, -y, z, -z... primary and secondary, too many possibility.
    But I have tried some one, the rotation of the bone have no change.
     
  24. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    109
    I dont know the exact configuration; try different combinations
     
  25. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    109
    +X primary, +Y secondary most likely
     
  26. Cong37921

    Cong37921

    Joined:
    Aug 1, 2014
    Posts:
    48
    seems wrong
     
  27. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    109
    Sorry no idea then