This is a question I've just kind of avoided asking because things have worked but I've never really understood why, now my folders are FAR too messy and things are going wrong and right and I don't know why, so I figure I'll ask as unity doesn't really seem to have extensive documentation on the subject. When importing a model what EXACTLY happens, and what is required? Does it import the materials with the model, but then you have to import the textures for those materials seperately? Do the textures get imported automatically too? Do materials all get imported into one place? Will a material only reference a texture in the same folder as it? In short what do you need to do to import a fully textured model, and is it different with animations?
Answer by Martijn Hendriks
Oct 01, 2011 at 05:42 PM
OK, a lot to be answered.
There are some changes that I've found in 3.4, but the official documentation can be found here.
In order to import a model in Unity you need to do several things:
Your textures need to be imported in a "Textures" folder in your project in Unity. The Textures folder is something like the Resources folder. It is possible to have multiple folders with the same name of these folders and Unity will put all the files in these folders together so it creates some sort of pool. For objects (prefabs, materials, etc) that you want to instantiate through code, you need to have these objects in a Resources folder. For an automatic texture-material match for the models you want to import, you need to put your textures in a Textures folder.
Your model needs to be somewhere in the Unity project (inside your main Assets folder) that you can locate it easily. Unity will then import all your materials and put them in a "Materials" folder next to the imported model. All the materials that have a texture that is inside a Unity "Textures" folder will be named as the texture and will be linked to that texture.
Unity will generate a prefab that includes your imported model. Depending on what type of compression/file (Maya, MAX, FBX, Blender, etc) you can set several import settings, like if you want to generate colliders for your model, or how to import your animations attached to the imported model.
What we usually do for our modelling pipeline, is to create a folder for the specific model in one Assets/Resources folder (this is done in explorer, without Unity open). This folder is named appropriately so that we can find it easily. In this folder, we create a Textures folder and put all the textures there. Then we place our FBX model also in main folder of the model. When starting Unity, it loads in all textures and then the model, creating the Materials folder and the prefab in the designated folder. This way we have all information of one model in one place.
Hopes this helps! :)
Answer by Deygus
Jul 12, 2012 at 04:49 AM
Also, a lot of the time, the image may not be imported on certain objects occasionally due to a glitch or error. Either way this is easily bypassed by locating the TEXMAP Image (a psd map of the painted image on the model which alot of modeling programs allow you to export separately usually) and dragging and dropping it into the " Materials " folder that was created when your model was imported into unity. You can then click on defaultMAT located in that folder, select your TEXMAP Image and apply it, it will then be applied appropriate to the UV Map within unity and added to your Model. Now your Model will have the texture you originally created for it and you will be able to visually see it in unity as well.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
4 People are following this question.
Blender to Unity textures are blurry.
Cinema 4d material importing?
Models referencing textures
3d model editing and multiple textures per material
Why do my imported textures look a lot darker with odd shadows?