Skip to content

3.2 Creating your model's material with multiple textures

Jacky Mooc edited this page Sep 30, 2022 · 8 revisions

While inside the _Model folder, right click on the empty space and create a new empty folder (Create > Folder). You should name it after your model.

Importing your model's mesh and textures

Drag your obj, mtl, and all texture files into the Unity editor.

Adding_Obj_Mtl_Etc

Afterwards, select every texture file and adjust its import settings. For reference, here is our import setting for our project's texture. The most important setting is Max Size, where you should set it to be equal or greater than your image's resolution. Values lower will reduce the fidelity of your texture, and any values higher than the textures' resolution will default it to use its actual resolution. If you do not know your textures' exact resolution, we recommend simply selecting the largest value.

  1. Select every texture file
Selecting_Multiple_Textures
  1. In the inspector (right side), be sure to set its max size field

Texture_Import_Settings

Creating materials

  1. Inside the folder where your model is located (i.e.obj file), create a new folder called "Materials"
  2. In Unity, click on the model (i.e. obj file). If you don't which one to click on, select the files until your inspector settings match up with the image below
  3. In the inspector window, go to the "Materials" tab and select "Extract Materials..." In the popup, the "Materials" folder you created

Extract_Materials

Lots of material files will be added to the folder. Select them all before continuing to the next step

Selecting_Materials

In the inspector window, convert them from lit materials to unlit. This prevents the in-world lighting from having any effect on how the model looks.

Switching_Materials_To_Unlit

Adding your model to your scene

In your "project" window, simply drag your model's mesh into the hierarchy window, where all the scene objects are located. We recommend placing your object into the Environment object, but that is optional.

AddingModelToScene

You will now see your model in your scene. However, it is very likely that your model is incorrectly rotated and has an elevation offset in the y-axis.

Unrotated_Model

NOTE: the back side of your model will not be rendered.

Rotating your model

Often, you will need to rotate its X-axis by either +-90 degrees. Depending on how it was authored, you may need to tinker around with its rotation to make it upright and facing the correct direction.

Rotated_Model

Rotated_Model_Scene

NEXT STEP: Finishing the model