Version: 5.5
Art Asset best practice guide
Руководство экспорта FBX

How do I import models from my 3D app?

There are two ways to import 3D models into Unity:

  • Drag the 3D model file from your file browser straight into the Unity Project window.
  • Copy the 3D model file into the Project’s Assets folder.

Select the file in the Project view and navigate to the Model tab in the Inspector window to configure import options. See documentation on Models for more information about import options.

Unity supports importing models from most popular 3D applications. For more guidance on how to import from specific 3D packages, see the following pages:

Textures

You must store Textures in a folder called Textures, placed inside the Assets folder (next to the exported Mesh) within your Unity Project. This enables the Unity Editor to find the Textures and connect them to the generated Materials. For more information, see documentation on Importing Textures.

3D форматы

Importing meshes into Unity can be achieved from two main types of files:

  1. Экспортированные файлы 3D-форматов, таких как .FBX или .OBJ
  2. Собственные файлы 3D приложений, например такие как .Max и .Blend файлы из 3D Studio Max и Blender.

Either should enable you to get your meshes into Unity, but there are considerations as to which type you choose:

Экспортированные 3D файлы

Unity может читать .FBX, .dae (Collada), .3DS, .dxf и .obj файлы, obj или Collada экспортеры могут быть найдены для многих приложений, точно также как FBX экспортеры могут быть найдены здесь

Преимущества:

  • Экспортируйте только необходимые данные
  • Проверяемые данные (перед импортированием в Unity, переимпортируйте в 3D пакет)
  • Как правило файлы меньшего размера
  • Поддерживает модульный подход - к примеру разными компонентами для интерактивности и типов коллизий
  • Поддерживает другие 3D пакеты, чьи форматы не поддерживаются у нас напрямую

Недостатки:

  • Может замедлять процесс прототипирования и итераций
  • Легче потерять след между исходной (рабочий файл) и игровой версией данных (к примеру экспортированный FBX файл)

Собственные файлы 3D приложений

Unity также может импортировать, путём конвертации, файлы: Max, Maya, Blender, Cinema4D, Modo, Lightwave и Cheetah3D , например, .MAX, .MB, .MA и др.

Преимущества:

  • Быстрый процесс итерации (для повторного импортирования в Unity сохраните исходный файл)
  • Изначально просто

Недостатки:

  • На машинах, задействованных в работе над Unity проектом, должны быть установлены лицензионные копии данного программного обеспечения
  • Файлы, содержащие ненужные данные могут стать неоправданно большими
  • Большие файлы могут замедлить процесс автосохранения
  • Меньше проверяется, поэтому труднее устранить ошибки

Модели

Model files that are placed in the Assets folder in your Unity project are automatically imported and stored as Unity Assets.

A model file can contain a 3D model, such as a character, a building, or a piece of furniture. The model is imported as multiple Assets. In the Project window, the main imported object is a model Prefab. Usually there are also several Mesh objects that are referenced by the model Prefab.

A model file can also contain animation data, which can be used to animate this model or other models. The animation data is imported as one or more Animation Clips.

A Mesh Filter together with the Mesh Renderer makes the model appear on screen
A Mesh Filter together with the Mesh Renderer makes the model appear on screen

Import settings

The Import Settings for a model file is displayed in the Model tab of the FBX importer’s Inspector window when the model is selected. These affect the Mesh, its Normals, and the imported Materials. Settings are applied per Asset on disk, so if you need Assets with different settings, make (and rename accordingly) a duplicate file.

Property Function
Меши
Scale Factor Unity’s physics system expects 1 meter in the game world to be 1 unit in the imported file. If you prefer to model at a different scale then you can compensate for it here. Defaults for different 3D packages are as follows:
.fbx, .max, .jas, .c4d = 0.01
.mb, .ma, .lxo, .dxf, .blend, .dae = 1
.3ds = 0.1
File Scale This value field displays the scale Unity uses for your model.
Mesh Compression Increasing this value reduces the file size of the Mesh, but might introduce irregularities. It’s best to turn it up as high as possible without the Mesh looking too different from the uncompressed version. This is useful for optimizing game size.
Read/Write Enabled If enabled, Mesh data is kept in memory so that a custom script can read and change it. Disabling this option saves memory, because Unity can unload a copy of Mesh data in the game. However, in certain cases when the Mesh is used with a Mesh Collider, this option must be enabled. These cases include:
- Negative scaling (for example, (–1, 1, 1)).
- Shear transform (for example, when a rotated Mesh has a scaled parent transform).
Optimize Mesh Tick this checkbox if you want Unity to determine the order in which triangles are listed in the Mesh.
Import Blendshapes Tick this checkbox if you want Unity to allow BlendShapes to be imported with your Mesh.
Generate Colliders If this is enabled, your Meshes are imported with Mesh Colliders automatically attached. This is useful for quickly generating a collision Mesh for environment geometry, but should be avoided for geometry you are moving.
Keep Quads Unity can import any type of polygon ( triangle to N-gon ). Polygons that have more than 4 vertices are always converted to triangles. Quads are only converted to triangles if “Keep Quads” is off. Quads might be preferable over polygons when using Tessellation shaders. See documentation on Surface Shader Tessellation for more information.
Swap UVs Tick this checkbox if lightmapped objects are picking up the wrong UV channels. This swaps your primary and secondary UV channels.
Generate Lightmap UVs Tick this checkbox if you want Unity to create a second UV channel to be used for Lightmapping. See documentation on Lightmapping for more information.
Нормали и касательные
Normals Определяет должны ли, и если да, то как, вычисляться нормали. Это полезно для оптимизации размеров игры.
Import Настройка по умолчанию. Импортирует нормали из файла.
Calculate Вычисляет нормали, основываясь на Smoothing angle. Если выбран именно этот метод, Smoothing Angle становится включенным.
None Disables normals. Use this option if the Mesh is neither normal mapped nor affected by realtime lighting.
Tangents Определяет должны ли, и если да, то как, вычисляться касательные и бинормали. Это полезно для оптимизации размеров игры.
Import Касательные и бинормали импортируются из файла. Эта опция доступна только для FBX, Maya и 3dsMax файлов и только когда нормали также загружены из файла.
Calculate Настройка по умолчанию. Вычисляет касательные и бинормали. Эта опция доступна только когда нормали или импортированы, или вычислены.
None Disables tangents and binormals. The Mesh has no Tangents, so won’t work with normal-mapped shaders.
Smoothing Angle Данная опция устанавливает насколько острой должна быть грань, чтобы считаться жестким ребром. Это также используется чтобы разделить касательные карты нормалей.
Split Tangents Enable this if normal map lighting is broken by seams on your Mesh. This usually only applies to characters.
Материалы
Import Materials Disable this if you don’t want Materials to be generated. By default, a diffuse Material is used instead.
Material Naming Use this to define how Unity Materials are named:
By Base Texture Name The name of the diffuse Texture of the imported Material that is used to name the Material in Unity. When a diffuse Texture is not assigned to the Material, Unity uses the name of the imported Material.
From Model’s Material The name of the imported Material is used for naming the Unity Material.
Model Name + Model’s Material The name of the model file in combination with the name of the imported Material is used for naming the Unity Material.
Material Search Use this to define where Unity tries to locate existing Materials using the name defined by the Material Naming option:
Local Unity tries to find existing Materials in the “local” Materials folder only (that is, the Materials subfolder, which is the same folder as the model file).
Recursive-Up Unity tries to find existing Materials in all Materials subfolders in all parent folders up to the Assets folder.
Everywhere Unity tries to find existing Materials in all Unity project folders.

See also

Art Asset best practice guide
Руководство экспорта FBX