- Home /
Textures not applied correctly to 3D objects
Hello. So I ordered a bunch of 3D objects and I was given files of these formats for each 3D object.
.fbx .obj .mtl .png
However, when I import these items to unity and try to create a material with the .png file and add it to the object, the textures are completely wrong. (see attachment)
This is the .png texture. (see attachment)
It's possible that the model doesn't utilize uv mapping but rather a shader-based solution, so in that case you'd have to use a custom shader. Just a guess though.
Hello. I asked the person i bought the models from and he said this: "Unity must have texturing/unwrapping solutions...Try finding where to scale and move the texture on a model". What do you think?
Answer by Bunny83 · Feb 09, 2018 at 11:17 AM
Well, i guess the object wasn't unwrapped. In other words it either doesn't have any UV / texture coordinates or they are all 0. The result will be the same.
Can you select the actual "mesh" object of your model and check the preview section at the bottom of the inspector? It tells you what vertex attributes the mesh has. Have a look at this example:
![![alt text][1]][1]
Thanks for your reply. This is what I got. @Bunny83 [1]: /storage/temp/110987-screenshot-21.png
Well, as you can see the mesh doesn't have any UV coordinates. So your model didn't get unwrapped at all. You usually want to unwrap your model in your modelling tool. Of course like Cherno mentioned in the comment above you could use a custom shader to do the texture lookup based on the vertex coordinates. However it's unusual to do that as you would need a seperate shader for each object. Also such an approach only works if you have such a simple mapping as in your case here.
Is it possible to unwrap my models in Unity as i do not have any modelling experience with modeling tools.
Answer by Entevily · Feb 09, 2018 at 02:45 PM
Download blender, it's a free modeling application. Use blender to open the model and unwrap it there.
A good YouTube tutorial can be found here on how to unwrap a model and export the UV map. Export/save your model once you are done unwrapping it.
Once you unwrap it and get a UV map exported, you then open that uv map in your photo editor and paint in your colors there. Bring that .png into unity and attach it to your unwrapped model.