How to import 3D models into Unity

Unity is a popular, conditionally free, cross-platform engine released by Unity Technologies in 2005. The engine is still being developed and is constantly growing with new technologies. Thousands of games and applications have been developed on Unity by both independent developers and well-known studios worldwide. Let's take a closer look at the basics of working with the engine, specifically how to import existing 3D models into Unity.

This instruction is based on the English version of Unity Hub, as the majority of supporting materials for any engine and programming language are in English.


Content

Settings menu for importing models

The main format for models supported by Unity is FBX. However, the engine also supports other formats, such as .max, .blend, .mb, etc. For these files, the engine uses a special plug-in module that exports FBX for file import. A 3D modeling program must be installed on the device. We recommend exporting the 3D model in FBX format immediately to avoid any potential issues.

To import models into Unity, you need to:

  • Open an existing or create a new project that supports 3D models.
  • By default, the "Project" window will be opened at the bottom of the editor, and the "Inspector" window will be opened on the right.
  • In the "Project" window, go to "Assets," right-click, and select "Create -> New Folder." Enter any convenient name for the folder.
  • Go to the folder, right-click on the screen, and select "Import New Assets." A regular window will open, navigate to the folder where the 3D models are stored. Select them and click the "Import" button.
  • The models will be added to the project. When you click on any of the added files in the "Inspector" window, the main settings of that file will be displayed.

Import settings for models - specific and common

The settings for 3D models displayed in the "Inspector" window depend on the file. For example, the settings for models created using the SpeedTree technology are fundamentally different from models created in 3D Max and other modeling packages.

Among the common parameters that you will encounter in your work, it is worth highlighting:

  • Scale Factor - conversion of units from other programs to Unity units. For example, in 3D Max, one unit is 10 cm, while in Unity, it is 1 meter.
  • Mesh Compression - mesh compression and related settings to reduce the size of the imported data and the project file size.
  • BlendShapes - enable/disable for models from 3D editors like Maya/3DS Max, which contain transformation animation.
  • Generate Colliders - create colliders for the object's mesh.
  • Visibility, Cameras, and Lights - import visibility, camera, and lighting settings for the model.
  • Preserve Hierarchy - import with hierarchy preservation for files containing animation.
  • Generate Lightmap UVs - create a map for light source effects on static objects.

Animation import settings for models

For 3D models containing animation files, you should go to the "Rig" tab in the "Inspector" window to check the recommended settings. Then, in the "Animation" folder, select the type of animation. For example, Unity has strict requirements for animation for humanoid models. For them, you need to select the skeleton structure and define the "root node". You can read more about importing models with humanoid animation at "https://unityhub.ru/manual/ConfiguringtheAvatar".

Some models, such as objects based on SpeedTree, may not have settings in the "Rig" and "Animation" tabs.

Working with textures and materials of objects

For exported 3D models with material and texture files, you can specify usage conditions. To do this, go to the "Materials" tab in the "Inspector" window. In the "Material Creation Mode" section, specify the method of importing files that are responsible for the model's materials.

In the "Location" section, select "Use Embedded Materials" to use the embedded materials that come with the model. To apply the settings, click "Apply"; to cancel, click "Revert."

Where to find texture files

The Unity engine has its own logic for automatically searching for textures for the imported 3D model. First, it looks for a "Textures" folder. If it doesn't exist, Unity scans all textures in the loaded project. During a full scan, conflicts may arise when multiple different texture files have the same name. In this case, it is recommended to rename the files.

Importing normal maps

3D models created based on high-polygon versions usually have normal maps, which can be selected in the "Inspector" window in the "Materials" tab. The import conditions are 180-degree smoothing angle. This will prevent seams from appearing when applying lighting.

Importing 3D models into the scene

The imported added models are done by dragging the file from the "Project" window to the "Scene" window. If the models have animation files, you can also drag them to the "Animation window," which will be located in the left part of the editor window. In this case, the animation controller will be created automatically and connected to the model.

Понравилось
0 голосов0
Comments
Comments on article