When exporting your models from blender to unity, many problems can arise. The model can have an incorrect orientation or maybe it is displayed differently after export or your teammates find the model difficult to use because of incorrect pivot position. To solve such issues, there are some steps that need to be taken before you can export your model to unity. You will learn about resolving common issues in your model and how to correctly export your model to Unity.
Before you export your model:
Combine multiple objects to one if applicable. Select the objects you want to merge and use
CTRL+J to merge them into one object.
Clean up your mesh by deleting loose or overlapping vertices. Select your mesh and go to
Edit mode, then select all vertices using
Clean Up. Here you can find different options to clean up your mesh.
Delete Loose will delete any vertex without an edge.
Degenerate Dissolve will dissolve zero-length edges and zero area faces.
Fill Holes will fill any open boundary edge loops.
Merge by Distance can be used to merge multiple vertices into one that is in close proximity to one another. Make sure the distance value is low when using
Merge by Distance as a higher value will merge faraway vertices together.
Reset the object rotation and scale. Press
CTRL+A to bring the option and hit
Rotation and Scale. You can also reset the
Location if you want the object at the origin.
Set pivot position of characters and standing objects at the base. This makes it easier to put the object in-floor properly. Press
Shift+C to reset the 3d cursor to the origin and adjust the object's transform along with the origin as shown in the figure below. Use right mouse click to bring the context menu and
Origin to 3D Cursor.
You can use the
Backface Culling option to toggle how the object will appear in unity. Use the
Face Orientation option to see face normal information. Any faces shaded Red are flipped and will not display in Unity.
You can use only one of these options at a time. As you can see the faces with wrong normal data is not visible when Backface Culling is turned on. Those faces will be displayed
Red when Face Orientation is turned on.
To resolve this issue simple select such faces then,
Flip. You can also use the
Recalculate Outside or
Recalculate Inside while selecting all faces to recalculate the normals and make them all face inwards or outwards.
Now, finally to export your model to unity, select the objects you want to export then,
F and use the options shown below. This will make sure the exported
fbx will have the correct orientation, scale and apply any modifiers.
You can also save these settings as presets for quick access to these settings in the future. Simply use the
+ sign to add new preset. Existing presets can be accessed using the
Operator Presets drop-down menu.