Download

Texture not being properly mapped to the mesh in UE4 after importing from blender

I’m using blender to create my minecraft model and everything imports to UE4 without any warnings or errors. The only problem is that it seems that the model that I textured in blender using the UV image editor does not have it’s texture properly aligned when I import from UE4. The only thing I can think that would cause this problem would be scaling both the mesh and the armature. I had to scale it up by 100 given that 1 unit = 1 cm in UE4 but I’m not sure if that is even the problem at all. Here is how it looks in blender and unreal. I tried texture titling using the material graph but I didn’t get very far.

a5185d42fd617bfe0e7d360967a09174601cdb18.png
600b2c34129405adbdb2009e997963a059f41595.jpeg

If anybody can give some clues as to way this happening, I would strongly appreciate it.

try re-export mesh from blender and then import it to UE. only idea what i have is you probably exported model and then you reworked UV/texture and forgot to re-export model again.

I’ve tried that multiple times but nothing changed. What I’ve noticed is that the texture might not be properly scaled considering how big the character’s eye in the unreal engine is and how far it is from the face. From what I’ve read on the forum, to scale the texture I would have to tilt the u and v coordinates but that repeats the texture if I go over 1.0 on either u or v so that is not a solution.

Ok then if u want send me your character in blender file, i can look at it tomorow (in 24 hours)

Your texture file is square, right? Because looking at the Blender screenshot it does not look square.

The texture file which is a png file, is 64 by 32. So no, it is not square.

Previewing the texture file as a cube in unreal, I found something that I thought was quite peculiar(it may be something normal that unreal does but I don’t know). If you take a look at the texture file in blender, you’ll notice that each part of the texture is properly sized but when you look at the preview mesh in the shape of a cube, you will notice that every piece of the texture is not properly scaled and also not in the correct spot. I not sure if it looks like that because of unreal removing all the excess padding there is in the texture file but it doesn’t look right to me. I even changing compute normal to import normals in my import to unreal and that didn’t change anything.

It’s not really peculiar, it’s default behavior, meaning the texture gets mapped to the UV space (0-1 box). You’ve got a wide texture so you’ll need to scale the UVs. You can do this using scalar parameters and a texcoord and doing something like this: UVTiling posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4 (you can copy the code and ctrl v in your project).

Then create a material instance and change the UTiling to 0.5 and the UVs will stretch so you get what you were seeing in Blender. Hopefully. :stuck_out_tongue:

Edit: and the result:

So I solved my problem. I changed the settings for power of two mode from none to pad. Though now I have to fix the lighting.