Meshes make up a large part of your 3D worlds. Aside from some Asset store plugins, Unity does not include modelling tools. Unity does however have great interactivity with most 3D modelling packages. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons.
3D formats
Unity supports importing Meshes from two different types of files:
Exported 3D file formats, such as .fbx or .obj. You can export files from 3D modeling software in generic formats that can be imported and edited by a wide variety of different software.
Proprietary 3D or DCC (Digital Content Creation) application files, such as .max and .blend file formats from 3D Studio Max or Blender, for example. You can only edit proprietary files in the software that created them. Proprietary files are generally not directly editable by other software without first being converted and imported. An exception to this is SketchUp .skp files, which both by SketchUp and Unity can read.
Unity can import and use both types of files, and each come with their own advantages and disadvantages.
Exported 3D files
Unity can read .fbx, .dae (Collada), .3ds, .dxf, .obj, and .skp files. Refer to your 3D modeling software documentation for information about exporting 3D files.
Advantages:
Instead of importing the whole model into Unity, you can import only the parts of the model you need.
Exported generic files are often smaller than the proprietary equivalent.
Using exported generic files encourages a modular approach (for example, using different components for collision types or interactivity).
You can import these files from software that Unity does not directly support.
Exported 3D files (.fbx, .obj) can be reimported into 3D modeling software after exporting, to ensure that all of the information has been exported correctly.
Disadvantages:
Models must be re-exported manually if changes are made to the original file.
Extra care must be taken to keep track of versions between the source file and the files imported into Unity.
Proprietary 3D application files
Unity can import proprietary files from the following DCC software: Max, Maya, Blender, Cinema4D, Modo, Lightwave & Cheetah3D. Files imported this way are converted into .fbx files by Unity during the import process.
Advantages:
Updates made to the original model are automatically imported into Unity.
This is initially simple - but it can become more complex later in development.
Disadvantages:
A licensed copy of the software used must be installed on all machines using the Unity project.
Software versions should be the same on each machine using the Unity project. Using a different software version can cause errors or unexpected behavior when importing 3D models.
Files can become bloated with unnecessary data.
Big files can slow down Unity project imports or Asset re-imports, because you have to run the DCC software you use as a background process when you import the model into Unity.
Unity exports proprietary files to .fbx internally, during the import process. This makes it difficult to verify the .fbx data and troubleshoot problems.
Note: Assets saved as .ma, .mb, .max, .c4d, or .blend files fail to import unless you have the corresponding DCC software installed in your computer. This means that everybody working on your Unity project must have the correct software installed. For example, if you use Maya to create ExampleModel.mb and copy it into your project, anyone else opening that project also needs to have Maya installed on their computer.
Here are some guidelines for directly supported 3D applications, others can most often export file type listed above.
Unity will attempt to find the textures used by a mesh automatically on import by following a specific search plan. First, the importer will look for a sub-folder called Textures within the same folder as the mesh or in any parent folder. If this fails, an exhaustive search of all textures in the project will be carried out. Although slightly slower, the main disadvantage of the exhaustive search is that there could be two or more textures in the project with the same name. In this case, it is not guaranteed that the right one will be found.
Place your textures in a Textures folder at or above the asset’s level
For each imported material Unity will apply the following rules:-
If material generation is disabled (i.e. Import Materials is unchecked), then it will assign the Default-Diffuse material. If it is enabled then it will do the following:
Unity will pick a name for the Unity material based on the Material Naming setting
Unity will try to find an existing material with that name. The scope of the Material search is defined by the Material Search setting.
If Unity succeeds in finding an existing material then it will use it for the imported scene, otherwise it will generate a new material
Colliders
Unity uses two main types of colliders: Mesh Colliders and Primitive Colliders. Mesh colliders are components that use imported mesh data and can be used for environment collision. When you enable Generate Colliders in the Import Settings, a Mesh collider is automatically added when the mesh is added to the Scene. It will be considered solid as far as the physics system is concerned.
If you are moving the object around (a car for example), you can not use Mesh colliders. Instead, you will have to use Primitive colliders. In this case you should disable the Generate Colliders setting.
Animations
Animations are automatically imported from the scene. For more details about animation import options see the section on asset preparation and import in the Mecanim animation system.
Normal mapping and characters
If you have a character with a normal map that was generated from a high-polygon version of the model, you should import the game-quality version with a Smoothing angle of 180 degrees. This will prevent odd-looking seams in lighting due to tangent splitting. If the seams are still present with these settings, enable Split tangents across UV seams.
If you are converting a greyscale image into a normal map, you don’t need to worry about this.
Blendshapes
Unity has support for BlendShapes (also called morph-targets or vertex level animation). Unity can import BlendShapes from .FBX (BlendShapes and controlling aninimation) and .dae (only BlendShapes) exported 3D files. Unity BlendShapes support vertex level animation on vertices, normals and tangents. Mesh can be affected by skin and BlendShapes at the same time. All meshes imported with BlendShapes will use SkinnedMeshRenderer (no mater if it does have skin or not). BlendShape animation is imported as part of regular animation - it simply animates BlendShape weights on SkinnedMeshRenderer.
There are two ways to import BlendShapes with normals:
Set Normals import mode to Calculate, this way same logic will be used for calculating normals on a mesh and BlendShapes.
Export smoothing groups information to the source file. This way, Unity will calculate normals from smoothing groups for mesh and BlendShapes.
If you want tangents on your BlendShapes then set Tangents import mode to Calculate.
Hints
Merge your meshes together as much as possible. Make them share materials and textures. This has a huge performance benefit.
If you need to set up your objects further in Unity (adding physics, scripts or other coolness), save yourself a world of pain and name your objects properly in your 3D application. Working with lots of pCube17 or Box42-like objects is not fun.
Make your meshes be centered on the world origin in your 3D app. This will make them easier to place in Unity.
If a mesh does not have vertex colors, Unity will automatically add an array of all-white vertex colors to the mesh the first time it is rendered.
The Unity Editor shows too many vertices or triangles (compared to what my 3D app says)
This is correct. What you are looking at is the number of vertices/triangles actually being sent to the GPU for rendering. In addition to the case where the material requires them to be sent twice, other things like hard-normals and non-contiguous UVs increase vertex/triangle counts significantly compared to what a modeling app tells you. Triangles need to be contiguous in both 3D and UV space to form a strip, so when you have UV seams, degenerate triangles have to be made to form strips - this bumps up the count.
Did you find this page useful? Please give it a rating:
Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.unity3d.com.
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thanks for helping to make the Unity documentation better!
Mesh Components
Material
By clicking “Accept Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.
Privacy Preference Center
Your Opt Out Preference Signal is Honored
Your Privacy
Functional Cookies
Performance Cookies
Targeting Cookies
Strictly Necessary Cookies
Your Privacy
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
Functional Cookies
Active
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
Performance Cookies
Active
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
Targeting Cookies
Active
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
Strictly Necessary Cookies
Always Active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.