Version: 5.5
Art Asset best practice guide
Guía para exportar FBX

Cómo importo modelos de mi aplicación 3D?

Hay dos formas de importar modelos 3D en Unity:

  • Arrastre el archivo del modelo 3D desde su buscador de archivos directamente a la ventana de Unity Project.
  • Copie el archivo del modelo 3D en la carpeta de assets del proyecto.

Seleccione el archivo en la vista Project y vaya a la pestaña Model en la ventana Inspector para configurar las opciones de importación. Consulte la documentación de Modelos para obtener más información sobre las opciones de importación.

Unity admite la importación de modelos de las aplicaciones 3D más populares. Para obtener más orientación sobre cómo importar desde paquetes 3D específicos, consulte las siguientes páginas:

Texturas

Debe almacenar Texturas en una carpeta llamada Textures, ubicada dentro de la carpeta Assets (junto al Mesh exportado) dentro de su Proyecto de Unity. Esto permite que el Editor de Unity encuentre las Texturas y las conecte a los Materiales generados. Para obtener más información, consulte la documentación sobre Importing Textures.

Formatos 3D

Importar mallas a Unity se puede lograr mediante dos tipos de archivos principales:

  1. Formatos de archivo 3D exportados, como: .FBX u .OBJ
  2. Archivos propios de aplicaciones 3D como formatos .Max y .Blend, de 3D Studio Max o Blender por ejemplo.

Cualquiera de estos tipos de archivos deberían dejar importar sus mallas a Unity, pero, existen algunas consideraciones a tener en cuenta de acuerdo al tipo que se elija:

Archivos 3D exportados

Unity puede leer archivos .FBX, .dae (Collada), .3DS, .dxf y .obj, los exportadores FBX se pueden encontrar aquí y exportadores obj o Collada se pueden encontrar en muchas aplicaciones.

Ventajas:

  • Solo se exportan los datos que se necesitan
  • Los datos son verificables (se re-importa en el paquete 3D antes que en Unity)
  • Generalmente son archivos más pequeños
  • Fomenta un enfoque modular - p. ej. diferentes componentes para tipos de colisión o interactividad.
  • Soporta otros paquetes 3D para cuyo formato propietario no tenemos soporte directo

Desventajas:

  • Puede ser un flujo de trabajo más lento para la creación de prototipos e iteraciones
  • Es más fácil perder la pista de las versiones entre la fuente (archivo de trabajo) y los datos del juego (un FBX exportado por ejemplo)

Archivos propietarios de aplicaciones 3D

Unity también puede importar, mediante conversión archivos : Max, Maya,Blender, Cinema4D, Modo, Lightwave & Cheetah3D, e.g .Max, .MB, .MA etc.

Ventajas:

  • Proceso rápido de iteración (al guardar el archivo fuente, Unity re-importa automáticamente)
  • Simple de usar al principio

Desventajas:

  • Una copia licenciada del software debe estar instalada en todas las máquinas que usan el proyecto de Unity
  • Los archivos pueden llenarse de datos innecesarios
  • Los archivos grandes pueden ralentizar las actualizaciones de Unity
  • Menos validación, por lo tanto es más difícil solucionar problemas

Modelos

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.

Propiedad Función
Meshes
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 & Tangents
Normals Define si y cómo las normales deberían ser calculadas. Esto es útil para optimizar el tamaño del juego.
Import Opción por defecto. Importa las normales del archivo.
Calculate Calcula las normales basándose en el Smoothing angle. Si está seleccionado, el Smoothing Angle se vuelve activo.
None Disables normals. Use this option if the Mesh is neither normal mapped nor affected by realtime lighting.
Tangents Define si y cómo las tangentes y bi-normales debería ser calculadas. Esto es útil para optimizar el tamaño del juego.
Import Importa las tangentes y bi-normales del archivo. Esta opción está solo disponible solo para archivos FBX, Maya y 3dsMax y solo cuando las normales sean importadas del archivo.
Calculate La opción por defecto. Calcula las tangentes y bi-normales. Esta opción está disponible solo cuando las normales son importadas o calculadas.
None Disables tangents and binormals. The Mesh has no Tangents, so won’t work with normal-mapped shaders.
Smoothing Angle Configura qué tan afilado una esquina debe ser con el fin de ser tratadas como una esquina dura. También es utilizado para separar tangentes normal map.
Split Tangents Enable this if normal map lighting is broken by seams on your Mesh. This usually only applies to characters.
Materials
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.

Ver también

Art Asset best practice guide
Guía para exportar FBX