How to export from Blender to Unity3d? Part 1

Part 1. How to preserve pivot point (origin)?

Unity 4.3.1, Blender 2.69

In this series of tutorials, we’ll take a look at some problems during export from Blender to Unity3d and the ways to solve them.

When we’re making game with Unity3d and Blender, we’re exporting/importing assets all the time. This process can be exciting and rewarding, but also can be confusing, time consuming and very technical. Of course, we’d like to focus on making something that matters – interactive content, beautiful levels, cool characters and not worry about weirdly rotated geometry or moved pivot point during import.

export_from_blender_to_unity3d_v2_01

Problems:

1. Origins not imported to Unity.
2. Scale of imported fbx models is 0.01 by default.
3. X axis rotation problem (Unity imports model already-rotated 270 degrees in X axis)

In this chapter, we’ll solve the problem of:

1. Origins not imported to Unity. In another words, pivot point is reset to 0-0-0 coordinates.

export_from_blender_to_unity3d_01

If we develop a habit of having one blend file per model, it’s totally fine. But sometimes it’s more convenient to have a full scene in the blend file. For example, we need to swap textures and model parts across our objects.

So, if we’re used to this workflow, we’re often find ourselves:

* placing a model at 0-0-0 coordinates,
* exporting it
* restoring position

Huh? This is not ideal, at least, to move every object back and forth just to export it. So what could be done to speed up the workflow?

STATIC MESH

To import origin as pivot point from Blender to Unity3d, Blender object needs to be parented to an empty. In case of static objects (not skinned meshes), empty would serve as a pivot point in Unity.

Benefits:

* pivot point won’t be placed at the center of coordinates

* no need to parent model to empty game object inside Unity3d
* no need to center object in blender before importing
* group of models can be exported this way

So, we’re parenting object to an empty in Blender, and exporting empty AND the object using fbx exporter.

export_from_blender_to_unity3d_v2_02

Examples from Drum game in development.

Part 2. Fixing scale being reset to 0.01 on FBX import.

Part 3. Fixing X axis rotation (Unity imports model already-rotated 270 (or -90) degrees in X axis).

8 comments

  1. Merci l’ami,

    C’est un très bon conseil mais je ne sais pas comment je vais devoir faire avec 1760 objects. Mais ta remarque me place en bonne position pour réfléchir….
    Ciao
    Spirou4D

  2. Ho excuse me, you’re english…
    Thank you friend,

    This is a very good advice but I do not know how I’m going to do with 1760 objects. But your remark puts me in a good position to reflect ….
    Ciao
    Spirou4D

  3. thanks! 1760 objects mean that you want to export a whole scene, am I right?

  4. Anonymous

    thanks very much

  5. Please, the part 2. =)

  6. juan

    Hello. I’m looking for a method to publish interactive assembly CAD models (with articulations and movements) on a web site. Do you think it could be a good idea to transform it to unity o unreal? Any other method?

    • Hi Juan, I’d suggest to try exporting to Unity web-player.

      • juan

        OK, I’ll try to find the way to convert it. Would it allow to “move” components inside an assembly?. Regards

Comments are closed.