3D MESH • UV MAPPING

Unity UV Mapping Texture Stretched or Distorted

Fix smeared textures, inverted decals, and normal map lighting bugs on imported vehicles, aircraft, and environment models.

Quick Diagnostic Solutions

  • Non-Uniform Scaling on Transform: If your GameObject scale is X: 1, Y: 1, Z: 5, the texture stretches 500% along the Z axis. Freeze transformations in Blender/Maya (Ctrl+A → Apply Scale) before exporting FBX.
  • Texture Wrap Mode: If textures pinch at UV borders, select the Texture in Project window and set Wrap Mode from Clamp to Repeat.
  • Normal Map Type: Ensure normal textures have Texture Type: Normal Map in import settings so Unity decodes the blue channel tangents correctly.

Solving Stretched Textures and Seam Artifacts in Unity 3D Models

UV mapping translates 2D bitmap textures onto the 3D polygon surfaces of a mesh. When importing assets created in Blender, 3ds Max, or Maya into Unity, developers frequently encounter severely warped camouflage textures, inverted normal maps, or strange pixelated seam lines dividing adjacent polygons.

Top Causes of UV Distortions in Unity

  • Non-Uniform Scaling in Blender: In 3D modeling programs, if you resize a mesh in Object mode without applying transforms (Ctrl + A → Apply All Transforms), the UV unwrapping math is calculated based on old proportions, producing severe stretching along scaled axes in Unity.
  • Overlapping UV Islands on Lightmaps: For baked lighting, Unity requires non-overlapping UV channel 2 data. Check Generate Lightmap UVs in the model's Inspector import settings under the Model tab with a Pack Margin of at least 4 pixels.
  • Texture Mipmap Bleeding at Seams: When textures downscale at distance via mipmapping, adjacent pixels from outside the UV island boundary bleed into the border. Ensure a minimum of 8 to 16 pixels of island padding during the texture baking process.
  • Tiling and Offset Misconfiguration: In the Unity Material Inspector, verify that the Tiling parameters (X and Y) are set to (1, 1) and Offset is (0, 0), unless intentional texture repetition is required.
UVDebugViewer.cs (Shader / Material Diagnostic)
using UnityEngine;

[ExecuteInEditMode]
public class UVDebugViewer : MonoBehaviour
{
    // Programmatically generates a 512x512 high-contrast UV alignment test grid
    [ContextMenu("Generate UV Test Texture")]
    public void GenerateTestTexture()
    {
        int size = 512;
        Texture2D tex = new Texture2D(size, size, TextureFormat.RGB24, false);
        for (int y = 0; y < size; y++)
        {
            for (int x = 0; x < size; x++)
            {
                bool isBorder = (x % 32 == 0 || y % 32 == 0);
                Color c = isBorder ? Color.cyan : ((x / 64 + y / 64) % 2 == 0 ? Color.black : Color.white);
                tex.SetPixel(x, y, c);
            }
        }
        tex.Apply();
        GetComponent<Renderer>().sharedMaterial.mainTexture = tex;
        Debug.Log("<color=cyan>[UV Checker Applied]</color> Inspect mesh for stretching or skewing.");
    }
}