Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How to export from Blender?

Discussion in 'External Tools' started by dragonice501, Oct 25, 2019.

  1. dragonice501

    dragonice501

    Joined:
    Dec 2, 2015
    Posts:
    130
    I have a scene in blender with multiple objects but only want to export a character mesh, its rig, and animations.

    What's the best way to handle this?

    Capture.PNG
     
  2. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    41
    Try blender fbx export, search on this forum for a free blender plug in script to assist with 90 degree rotation when exporting from blender to unity. Also note fbx export scaling options in blender to avoid scaling to x100 when importing. Good luck!
     
  3. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    41
    P.s. blender fbx export has 'export selected' option to limit what is exported
     
  4. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    382
    Select the character mesh, armature and possible empty root objects you might have added etc and export as fbx. If there’s Unity preset, select it. Enable selected objects, and other options that might be needed (empty objects for example). Also remember that Blender resets these settings when you change scene or restart Blender so save a preset when you find good settings.

    And remember to apply the transforms to remove unnecessary scaling, offsets etc.
     
  5. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    99
    For me, proper export from Blender takes 2 important parts:
    1. Export Settings
    2. Correctly Applied Rotation (in Blender)





    1. Export Settings:
    For the export settings: I wrote extensively about my specific export settings here! The good news is, you can save these export setting presets for a long time, and not worry about setting these every time you export.



    2. Correctly Applied Rotation: (in Blender)
    When I am ready for export, this is how I prepare my 3D models in Blender. These steps allow my Blender characters to have completely zeroed out position and rotation, while maintaining the model's correct orientation:

    2.1. Whenever exporting a rigged character, I always setup my hierarchy in Blender with extra empty parent objects, so that I don't need to add any extra Transforms in Unity. If you're just modeling a simple object that is one Mesh, one object -- you can skip this step 2.1.. I tend to use something like the following structure, for example, if the character's name is Mark: (

    Mark Hierarchy in Unity.png

    2.2. Over the months (maybe years?), I found these steps to completely remove all cases of weird -90 rotation issues in Unity, depending on what kind of object(s) you're exporting:

    Exporting From Blender To Unity.png

    (Once you perform these steps, you can export to FBX with settings similar to those described in Step 1., and it should be all-good in Unity!)

    NOTE: The only object I have still never been able to fix is the Armature itself, which always has (-90, 0, 0) rotation in my exports. This is because if you try to apply rotation to the Armature in Blender, it WILL mess up your bone constraints and animations. Don't do it. Leave your Armature at its default (0, 0, 0) rotation in Blender. The "Armature" is buried somewhere in my character models' hierarchies anyway, and my bones (thanks to the 1. Export Settings part above) export with the correct +Z forward, +Y up axes, so it's not a big deal for me being that every other object is completely correct!

    And last bit: I hope this helps you. It took a really long time to figure this out. Now that it's figured out for me and my workflow, the rotation issues are never that much of a problem anymore! :D
     
    Last edited: Oct 30, 2019
    jamespaterson and konsic like this.
  6. jamespaterson

    jamespaterson

    Joined:
    Jun 19, 2018
    Posts:
    41
    Thanks this is really helpful!
     
    ModLunar likes this.